#62 Rotating Cube

This project features an animation of a 3D cube rotating using trigonometric functions. You can adapt the 3D point rotation math and the line() function in your own animation programs.

Although the block text characters we’ll use to draw the cube don’t look like thin, straight lines, this kind of drawing is called a wireframe model because it renders only the edges of an object’s surfaces. Figure 62-1 shows the wireframe model for a cube and an icosphere, a rough sphere made of triangles.


Figure 62-1: The wireframe models ...

Get The Big Book of Small Python Projects now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.