Take a transformation matrix like you're used to constructing with WebGL, and project arbitrary 3D points onto your 2D screen.