Graphics - equation to convert 3d point to 2d proj

2020-03-20 14:27发布

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!

标签: graphics 3d 2d
1条回答
女痞
2楼-- · 2020-03-20 14:47

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

查看更多
登录 后发表回答