All projects

CompleteUpdated Added

3D Cube Prototype

A quick prototype implementing perspective 3D projection of a cube onto a 2D plane.

About this project

As an exercise in exploring the mathematical equations that model perspective projection from 3D space onto a 2D plane, this simple demo renders a 3D cube from scratch onto an HTML canvas. Controls can be used to rotate the cube about each of its three rotational axes.

Screenshots

The 3D cube demo with rotation buttons below the canvas (view full size)
The cube after a few rotations using the Up, Right and Clockwise controls.

Resources