Graphics - equation for converting a 3d point to a 2D projection

I am starting to draw, but playing with HTML5 canvas, javascript and some forms and images. If I have a camera at the point Cx, Cy, Cz and a point at Px, Py, Pz, then what is the easiest way to convert the point to a 2d point so that I can visualize the image at this point with the correct zoom, my perspective is correct? I am behind the equations, not the library.

Thanks!

+4
source share
1 answer

It's called Perspective Projection, and the formula you are looking for is just the matrix multiplication found here:

http://en.wikipedia.org/wiki/3D_projection#Perspective_projection

+3
source

Source: https://habr.com/ru/post/1343354/


All Articles