TikZ has a library called "perspective" that renders 3D scenes to the 2d canvas in perspective (so that objects far away from the viewer appear smaller).
I am interested in understanding the geometrical calculations behind perspective drawings, and I want to implement this projection in another programming language.
So I looked at the library's code, which is not long, but because I don't have any knowledge in core-pgf macros, I have a few missing links. I am not sure what the library does to the x, y and z coordinates of the point I am plotting in it.