如何确定半球的点xyz坐标?
我在解决下图所示的问题时遇到严重问题。 假设我们在 3D 空间中有 3 个点(蓝点),以及基于它们的三角形的某个中心(红点 - 点 P)。我们还有这个三角形的法线,这样我们就知道我们正在谈论哪个半空间。
我需要确定,取决于两个角度(都在 0-180 度范围内)的点(红色???点)的位置是什么。 alfa=0 和 betha=0 角度如何“锚定”并不重要,重要的是能够扫描整个半球(半径为 r)。
https://i.sstatic.net/a1h1B.png
如果有人可以帮助我,我'真的很感激。
亲切的问候, 拉夫
I'm having serious problems solving a problem illustrated on the pic below.
Let's say we have 3 points in 3D space (blue dots), and the some center of the triangle based on them (red dot - point P). We also have a normal to this triangle, so that we know which semi-space we talking about.
I need to determine, what is the position on a point (red ??? point) that depends on two angles, both in range of 0-180 degrees. Doesnt matter how the alfa=0 and betha=0 angle is "anchored", it is only important to be able to scan the whole semi-sphere (of radius r).
https://i.sstatic.net/a1h1B.png
If anybody could help me, I'd be really thankful.
Kind regards,
Rav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从图中可以看出,球体上的点的位置是由球坐标。令 r 为球体的半径;让
alpha
相对于 x 轴给出;并令beta
为相对于 xy 平面的角度。球体上的点的笛卡尔坐标为:编辑
但对于轴
(L, M, N)
中心位于(X, Y , Z)
坐标是(如 dmuir 的答案):轴
L
和N
必须正交,并且M = cross(N, L )
。alpha
是相对于L
给出的,beta
是相对于L
-M
给出的代码>平面。如果你不知道L
与三角形的点有何关系,那么这个问题就无法回答。From the drawing it looks as if the position of the point on the sphere is given by a form of spherical coordinates. Let
r
be the radius of the sphere; letalpha
be given relative to the x-axis; and letbeta
be the angle relative to the x-y-plane. The Cartesian coordinates of the point on the sphere are:Edit
But for a general coordinate frame with axes
(L, M, N)
centered at(X, Y, Z)
the coordinates are (as in dmuir's answer):The axes
L
andN
must be orthogonal andM = cross(N, L)
.alpha
is given relative toL
, andbeta
is given relative to theL
-M
plane. If you don't know howL
is related to points of the triangle, then the question can't be answered.您需要在三角形平面以及单位法线 N 中找到两个单位长度正交向量 L、M。球体上的点为
r*cos(beta)*cos(alpha) * L + r *cos(β)*sin(α)*M + r*sin(β)*N
You need to find two unit length orthogonal vectors L, M say, in the plane of the triangle as well as the the unit normal N. The points on the sphere are
r*cos(beta)*cos(alpha) * L + r*cos(beta)*sin(alpha)*M + r*sin(beta)*N