Shows octahedron-cube relation. Arrow keys rotate it, up, down, left, right. Can change idle rotation, scale. You can turn off labels of x y z coordinates of vertices. "H" hides sliders.
Vertices of octahedron touch faces of a cube (blue). Inside octahedron, a small cube's (orange) vertices each touch the center of a face of the octahedron. Another cube (green) cuts off tips of octahedron resulting in a truncated octahedron, special because it's made of eight hexagons. If you were to slice off corners of cube you'd get a octahedron. I realized this when beveling cube corners to make octahedron in Blender. The xyz labels help see how to connect vertices when you code. Can you figure out the logic for calculating smallest cube? This is my https://scratch.mit.edu/projects/723234045/ project from last year with the truncated octahedron added along with the green cube.