This page has a bunch of useful information on various transformations, including C sample code and mathematical explainations. If you scroll down to Perspective Projection section (about halfway...
Type: Posts; User: helloworld922
This page has a bunch of useful information on various transformations, including C sample code and mathematical explainations. If you scroll down to Perspective Projection section (about halfway...
I wasn't suggesting you had to use those libraries, but rather use the same approach they take to performing transformations.
From what I see all you need to do is this:
1. Create a 4x4 matrix...
On a slightly unrelated note, you could try adopting the same method used by OpenGL/DirectX for performing 3D transformations by using a 4x4 matrix. This way all transformations (scaling, rotation,...