Profile picture
Daniel Stovell
16 · Student · Bangkok, Thailand

3D Cube Animation

This project visualises a rotating 3D cube using Python. Instead of using numpy library, I decided to implement my own matrix multiplication functions and other linear algebra operations for fun :)

The cube is defined by its vertices that are connected to form a cube. I applied the following rotation matrices along the X, Y, and Z axes to rotate the cube:

Rotation Matrices
Fig 2.0: Rotation Matrices for X, Y, Z axes

To display it, each 3D point is projected to 2D using a perspective projection. The cube continuously rotates by incrementing the rotation angle in each frame.

If you want to see the project in detail, check the GitHub repository.

3DCube
Fig 3.0: 3D Cube Animation
V1.2 Last updated: Janurary 1, 2026