Repository: sagemath/sage

Issue:
pos_dict of CubeGraph(3) is not useful
### Steps To Reproduce

```sage
graphs.CubeGraph(3).plot()
```

### Expected Behavior

A plot in which each vertex appears in a different spot.
Better: a plot that looks like a cube.
(yes, I know the method `plot3d`)

### Actual Behavior

The vertices `010` and `101` appear at the same point in the drawing.
Indeed, this can be seen by checking `_pos`:
```sage
sage: graphs.CubeGraph(3)._pos
{'000': (0.0, 0.0),
 '001': (-0.4999999999999998, 0.8660254037844387),
 '010': (0.5000000000000001, 0.8660254037844386),
 '011': (3.3306690738754696e-16, 1.7320508075688772),
 '100': (1.0, 0.0),
 '101': (0.5000000000000002, 0.8660254037844387),
 '110': (1.5, 0.8660254037844386),
 '111': (1.0000000000000002, 1.7320508075688772)}
```

### Additional Information

This looks slightly more like what I would have expected:
```sage
{'000': (0,0), '001': (0,1), '010': (1,0), '011': (1,1), '100': (0.707,0.707), '101': (0.707,1.707), '110': (1.707,0.707), '111': (1.707,1.707)}
```

### Environment

```markdown
- **OS**: Ubuntu 20.04
- **Sage Version**: 9.0 (but also verified this on 9.5)
```


### Checklist

- [x] I have searched the existing issues for a bug report that matches the one I want to file, without success.
- [X] I have read the documentation and troubleshoot guide


Discussion:

Resolving patch:
diff --git a/src/sage/graphs/generators/families.py b/src/sage/graphs/generators/families.py
--- a/src/sage/graphs/generators/families.py
+++ b/src/sage/graphs/generators/families.py
@@ -1180,6 +1180,13 @@ def CubeGraph(n, embedding=1):
         vertices in each column represents rows in Pascal's triangle. See for
         instance the :wikipedia:`10-cube` for more details.
 
+      - ``3``: oblique projection of the `n`-cube. Oblique projection involves
+        aligning one face parallel to the viewer and projecting at a specified
+        angle, maintaining equal size for edges parallel to one axis while
+        applying fixed foreshortening to others. This method simplifies the
+        representation of a four-dimensional hypercube onto a two-dimensional
+        plane, offering a geometrically consistent visualization.
+
       - ``None`` or ``O``: no embedding is provided
 
     EXAMPLES:
@@ -1214,15 +1221,20 @@ def CubeGraph(n, embedding=1):
         sage: g.show(figsize=[12,12],vertex_labels=False, vertex_size=20)       # long time, needs sage.plot
         sage: g = graphs.CubeGraph(9, embedding=2)
         sage: g.show(figsize=[12,12],vertex_labels=False, vertex_size=20)       # long time, needs sage.plot
+        sage: g = graphs.CubeGraph(9, embedding=3)
+        sage: g.show(figsize=[12,12],vertex_labels=False, vertex_size=20)       # long time, needs sage.plot
 
     AUTHORS:
 
     - Robert Miller
     - David Coudert
     """
-    if embedding == 1:
+    if embedding == 1 or embedding == 3:
         # construct recursively the adjacency dict and the embedding
         theta = float(pi/n)
+        if embedding == 3 and n > 2:
+            theta = float(pi/(2*n-2))
+
         d = {'': []}
         dn = {}
         p = {'': (float(0), float(0))}
@@ -3264,7 +3276,7 @@ def GeneralizedSierpinskiGraph(G, k, stretch=None):
 
     - ``stretch`` -- integer (default: ``None``); stretching factor used to
       determine the positions of the vertices of the output graph. By default
-      (``None``), this value is set to twice the maximum Euclidian distance
+      (``None``), this value is set to twice the maximum Euclidean distance
       between the vertices of `G`. This parameter is used only when the vertices
       of `G` have positions.
 


Test patch: