Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Here is an animation of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the e...
Answer
#4: Post edited
[Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
- a0 = {x: 0, y: 0, z: side}
- a1 = {x: 1, y: 0, z: side}
- a2 = {x: 2, y: 0, z: side}
- b0 = {x: 0, y: 2, z: side}
- b1 = {x: 1, y: 2, z: side}
- b2 = {x: 2, y: 2, z: side}
- edges.extend([(a0, a1), (a1, a2), (b0, b1), (b1, b2), (a1, b1)])
- ```
- [Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.
- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
- a0 = {x: 0, y: 0, z: side}
- a1 = {x: 1, y: 0, z: side}
- a2 = {x: 2, y: 0, z: side}
- b0 = {x: 0, y: 2, z: side}
- b1 = {x: 1, y: 2, z: side}
- b2 = {x: 2, y: 2, z: side}
- edges.extend([(a0, a1), (a1, a2), (b0, b1), (b1, b2), (a1, b1)])
- ```
#3: Post edited
- [Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.
- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
l0 = {x: 0, y: 0, z: side}l1 = {x: 1, y: 0, z: side}l2 = {x: 2, y: 0, z: side}r0 = {x: 0, y: 2, z: side}r1 = {x: 1, y: 2, z: side}r2 = {x: 2, y: 2, z: side}edges.extend([(l0, l1), (l1, l2), (r0, r1), (r1, r2), (l1, r1)])- ```
- [Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.
- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
- a0 = {x: 0, y: 0, z: side}
- a1 = {x: 1, y: 0, z: side}
- a2 = {x: 2, y: 0, z: side}
- b0 = {x: 0, y: 2, z: side}
- b1 = {x: 1, y: 2, z: side}
- b2 = {x: 2, y: 2, z: side}
- edges.extend([(a0, a1), (a1, a2), (b0, b1), (b1, b2), (a1, b1)])
- ```
#2: Post edited
- [Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.
- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
v01 = {x: 0, y: 0, z: side}v02 = {x: 1, y: 0, z: side}v03 = {x: 2, y: 0, z: side}v11 = {x: 0, y: 2, z: side}v12 = {x: 1, y: 2, z: side}v13 = {x: 2, y: 2, z: side}edges.extend([(v01, v02), (v02, v03), (v11, v12), (v12, v13), (v01, v11)])- ```
- [Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube.
- There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode):
- ```python
- edges = []
- for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]:
- for side in [0, 2]:
- l0 = {x: 0, y: 0, z: side}
- l1 = {x: 1, y: 0, z: side}
- l2 = {x: 2, y: 0, z: side}
- r0 = {x: 0, y: 2, z: side}
- r1 = {x: 1, y: 2, z: side}
- r2 = {x: 2, y: 2, z: side}
- edges.extend([(l0, l1), (l1, l2), (r0, r1), (r1, r2), (l1, r1)])
- ```
#1: Initial revision
[Here](https://i.pinimg.com/originals/b6/c9/65/b6c9653dcd8f47402bede44e1bc09398.gif) is an animation (Olin Lathrop, avert your eyes!) of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube. There are probably a lot of ways you could generate this graph algorithmically, but here's one (in Python rather than pseudocode, but Python is pretty close to pseudocode): ```python edges = [] for x, y, z in [(0, 1, 2), (1, 2, 0), (2, 0, 1)]: for side in [0, 2]: v01 = {x: 0, y: 0, z: side} v02 = {x: 1, y: 0, z: side} v03 = {x: 2, y: 0, z: side} v11 = {x: 0, y: 2, z: side} v12 = {x: 1, y: 2, z: side} v13 = {x: 2, y: 2, z: side} edges.extend([(v01, v02), (v02, v03), (v11, v12), (v12, v13), (v01, v11)]) ```