The pyramid is defined as a set of 3D vertices, then passed through a matrix transformation pipeline. The vertices are projected onto the screen via a simple projection function. The only native graphics function used here is drawLine

Matrix.java

MatrixTest.java

IMatrix.java