如何投射3D指向一个三维平面 [英] How to project a 3d point to a 3d plane

查看:161
本文介绍了如何投射3D指向一个三维平面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个三维点(point_x,point_y,point_z),我想其投影到(normal_dx它(飞机)是由一个点的坐标(orig_x,orig_y,orig_z)和一元垂直向量定义的三维平面,normal_dy,normal_dz)。

I have a 3d point (point_x,point_y,point_z) and I want to project it onto a 3d plane which (the plane) is defined by a point coordinates (orig_x,orig_y,orig_z) and a unary perpendicular vector (normal_dx,normal_dy,normal_dz).

我应该如何处理呢?

How should I handle this?

推荐答案

1)从制作矢量原稿点的兴趣点:

V =点原稿(每个尺寸);

2)采取与单位法向量的向量 N 的点积:

2) Take the dot product of that vector with the unit normal vector n:

DIST = VX * NX + VY *纽约+ VZ * NZ; DIST由点到面沿法线=标距离

dist = vx*nx + vy*ny + vz*nz; dist = scalar distance from point to plane along the normal

3)距离乘以单位法向量,并从你的观点减去载体。

3) Multiply the unit normal vector by the distance, and subtract that vector from your point.

projected_point =点 - 距离*正常;

编辑与图片:
我修改你的照片了一下。红色是V; 'V'点'正常'=长度的蓝色和绿色( DIST 以上)。蓝色是正常* DIST 绿色=蓝色* -1 :找planar_xyz,从起始点并添加绿色向量。

Edit with picture: I've modified your picture a bit. Red is 'v'; 'v' dot 'normal' = length of blue and green (dist above). Blue is normal*dist. Green = blue * -1 : to find planar_xyz, start from point and add the green vector.

这篇关于如何投射3D指向一个三维平面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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