如何在平面中从3分(x,y,z)创建一个弧路径?
我想在n = 3点p(n)=(x,y,z)上创建一个弧形轨迹交叉,我决定在平面上绘制一个圆圈。因此,我有中心,半径,theta(x,y平面的角度)和phi(Z轴围绕Z轴),我知道3点(x,y,z)的位置,我如何在P1之间提取弧度来自这个圆的P2和P3?我在Matlab中实施了此程序。 多谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此答案在Math.stackexchange上提供了一个很好的简单配方,以查找圆圈中心(以及半径)
在其他有用的Math.stackexchange答案中,我们可以根据中心和两个(非尺度)点从原始3。
3D给定中心的圆的参数方程,在圆圈中有两个点? (@milbrandt)
最后,我们需要3个点的3个角度来定义ARC,可以使用
atan2
以及在其他步骤中创建的组件向量进行。完整注释的代码在下面,该代码产生该图,并且功能可以计算任何3D点的圆角,然后在任何角度的圆周上的值。
This answer on math.stackexchange gives a nice simple formulation for finding the circle centre (and therefore the radius)
3D coordinates of circle center given three point on the circle. (@Sergio G.)
From this other helpful math.stackexchange answer we can define any point on that circle in terms of the centre and two (non-colinear) points from the original 3.
Parametric equation of a circle in 3D given center and two points on the circle? (@milbrandt)
Finally we need the 3 angles of your 3 points to define the arcs, which can be done with
atan2
and the component vectors created in the other steps.The full commented code is below, which yields this plot, and functions to compute the circle angle for any 3D point, then the value on the circumference for any angle.