I am a graphics novice, but am playing with HTML5 Canvas, javascript and some shapes and images. If I have a camera at point C.x,C.y,C.z, and a point at P.x,P.y,P.z, what is the easiest way to convert the point to a 2d point so I can render an image at that point with the correct scaling so my perspective is correct? I'm after the equations, not a library.
Thanks!
It is called the Perspective Projection and the formula you seek is just the matrix-multiplication found here:
http://en.wikipedia.org/wiki/3D_projection#Perspective_projection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With