图形 - 将3d点转换为2D投影的公式 [英] Graphics - equation to convert 3d point to 2d projection

查看:476
本文介绍了图形 - 将3d点转换为2D投影的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是图形新手,但我正在玩HTML5 Canvas,JavaScript和一些形状和图像。
如果我在Cx,Cy,Cz点和Px,Py,Pz点有一个摄像头,将点转换为2d点最简单的方法是什么,所以我可以在那个点上渲染图像正确的缩放因此我的观点是正确的?我在等式之后,而不是图书馆。



谢谢!

解决方案

它被称为透视投影,你所寻求的公式只是这里找到的矩阵乘法:

lockquote

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



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

这篇关于图形 - 将3d点转换为2D投影的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆