Skip to content

Commit a6f17fb

Browse files
committed
icosahedron similar to jiang data
1 parent b8b4264 commit a6f17fb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pygsp/graphs/nngraphs/sphereicosahedron.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ def __init__(self, level=5, sampling='vertex', **kwargs):
3535
raise ValueError('Unknown sampling value:' + sampling)
3636
PHI = (1 + np.sqrt(5))/2
3737
radius = np.sqrt(PHI**2+1)
38-
coords = [0, 1, PHI, 0, -1, PHI, 0, 1, -PHI, 0, -1, -PHI,
39-
1, PHI, 0, -1, PHI, 0, 1, -PHI, 0, -1, -PHI, 0,
40-
PHI, 0, 1, PHI, 0, -1, -PHI, 0, 1, -PHI, 0, -1]
38+
coords = [-1, PHI, 0, 1, PHI, 0, -1, -PHI, 0, 1, -PHI, 0,
39+
0, -1, PHI, 0, 1, PHI, 0, -1, -PHI, 0, 1, -PHI,
40+
PHI, 0, -1, PHI, 0, 1, -PHI, 0, -1, -PHI, 0, 1]
4141
coords = np.reshape(coords, (-1,3))
4242
coords = coords/radius
43-
faces = [1, 2, 7, 1, 7, 10, 1, 10, 9, 1, 9, 5, 1, 5, 2, 2, 7, 12, 12, 7, 8,
44-
7, 8, 10, 8, 10, 3, 10, 3, 9, 3, 9, 6, 9, 6, 5, 6, 5, 11, 5, 11, 2,
45-
11, 2, 12, 4, 11, 12, 4, 12, 8, 4, 8, 3, 4, 3, 6, 4, 6, 11]
43+
faces = [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11,
44+
1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8,
45+
3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9,
46+
4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1]
4647
self.faces = np.reshape(faces, (20,3))-1
4748
self.level = level
4849
self.intp = None

0 commit comments

Comments
 (0)