将坐标变换到另一个坐标系
所以我在 3D 坐标系(红色)中拥有矩形(蓝色)的四个角坐标。我想创建一些矩阵,将红色坐标系中矩形上的任何给定点转换为绿色坐标系中的(2D)点。
我想这类似于从 3D 模型中的相机到屏幕的转换,但我没有坐标和相机的向量。您是否可以推荐这方面的文章或想法,或者您是否有可以分享的矩阵/算法?
So I have four coordinates of corners of a rectangle (blue) in a 3D coordinate system (red). I want to create some matrix to convert any given point on the rectangle in the red coordinate system into a (2D) point in the green coordinate system.
I guess this resembles a transformation from a camera in a 3D model to the screen, but I don't have coordinates and vectors of the camera. Are there articles or ideas you can recommend on this or do you even have a matrix/algorithm to share?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从一种坐标系转换到另一种坐标系时,主要作用是对齐这些系统。这里你需要的是:
在线性代数变换中,以相反的顺序应用,因此给定 3D 空间中的点 p,您可以通过以下方式获得结果:
有关 平移矩阵和旋转Matrix 是关于如何计算这些矩阵的良好资源。
最后提醒一下,您需要使用坐标的齐次形式,即; p(x,y,z,1)
When making transitions from one coordinate system to other the principal action is to align those systems. Here what you need is to:
In linear algebra transformations are applied in reverse order, hence given point p in 3D space, you get the result by:
Wikipedia articles about Translation Matrix and Rotation Matrix are good resources about how to compute these matrices.
As a final reminder, you need to use homogenous form of the coordinate, i.e.; p(x,y,z,1)