/perspective-projection

Fun with perspective projection and matrices

Primary LanguageJava

perspective-projection

Fun with perspective projection and matrices

Cube

Currently this is capable of projecting a cube into a 2D plane. The cube is defined by 8 points, in a left-handed coordinate system. The vertices are numbered as such:

    v7 ------- v6
   /|          /|
  / |         / |
v4 -|------ v5  |
|  v3 ------|--v2  
|  /        |  /
| /         | /
v0--------- v1

Projection

Projection is done using this method: https://en.wikipedia.org/wiki/3D_projection#Perspective_projection