#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.

f62001

Figure 62-1: The wireframe models ...

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

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