Skip to content

Commit 01fe369

Browse files
committed
added a third embedding in the cubeGraph method for oblique projection
1 parent f02cd01 commit 01fe369

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sage/graphs/generators/families.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,9 +1231,12 @@ def CubeGraph(n, embedding=1):
12311231
- Robert Miller
12321232
- David Coudert
12331233
"""
1234-
if embedding == 1:
1234+
if embedding == 1 or embedding == 3:
12351235
# construct recursively the adjacency dict and the embedding
1236-
theta = float(pi/4) if n == 3 else float(pi/n)
1236+
theta = float(pi/n)
1237+
if embedding == 3 and n > 2:
1238+
theta = float(pi/(2*n-2))
1239+
12371240
d = {'': []}
12381241
dn = {}
12391242
p = {'': (float(0), float(0))}

0 commit comments

Comments
 (0)