如何根据 3D 平面和已知原点计算新的基础(变换矩阵)?
给定一个 3D 平面及其上的任意点,我想考虑新基础的原点 (0,0,0)
,可以: (A) 根据此信息定义基础? (B) 创建一个变换矩阵,允许我在世界空间和新基础之间进行转换?
我可以假设变换是仿射的。
非常感谢!
Given a 3D plane and an arbitrary point on it that I want to consider the origin (0,0,0)
of a new basis, it is possible to: (A) define a basis from this information? And (B) create a transformation matrix that allows me to convert between world space and the new basis?
I can assume the transformation is affine.
Thanks very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的答案是肯定的,但由于您只有一个平面,因此新基础的方向将是任意的。
假设您有一个点 k 位于平面 P 上,并且您希望点 k 作为原点。您有 P = (N, d),其中 N 是标准化平面法线,d 是从原点到平面的距离。
确定该平面上任意方向的正交基
定义 3 个向量右 R、上 U 和法线 N
我们已经有了 N,它只不过是法线平面
现在定义一个 3x3 变换矩阵 M,其中矩阵的 3 行分别是 R、U 和 N。
现在假设您想要将平面上的点 p 转换为点 p'。
如果您想用一个矩阵完成所有这些操作,您可以将 M 和平移向量 -k 组合成一个 4x4 齐次矩阵。
注:
HTH
The short answer is yes, but since you only have a plane the orientation of the new basis will be arbitrary.
Lets say you have a point k that lies on the plane P and you want point k as your origin. You have P = (N, d) where N is the normalised plane normal and d is the distance to the plane from the origin.
To determine an orthonormal basis with arbitrary orientation on this plane
Define 3 vectors right R, up U and normal N
We already have N which is nothing but the normal of the plane
Now define a 3x3 transformation matrix M where the 3 rows of the matrix are R, U and N respectively.
Now let us say you wanted to transform a point p to a point p' on your plane.
If you want to do all this with one matrix you can combine M and the translation vector -k into a 4x4 homogeneous matrix.
Notes:
HTH