【问题标题】:shortest distance from plane to origin using a plane equation使用平面方程从平面到原点的最短距离
【发布时间】:2016-09-09 20:36:37
【问题描述】:

假设我有一个平面方程 ax+by+cz=d,我该如何找到从平面到原点的最短距离?

我将与这篇文章相反。在这篇文章中,他们从点 P0 和法线开始。就我而言,我只有平面方程 Distance from origin to plane (shortest)

这是我目前所拥有的。

        #calculate the distance from plane to origin
        dist=math.sqrt(new_a**2+new_b**2+new_c**2)

        x_dist=(a*d)/dist
        y_dist=(b*d)/dist
        z_dist=(c*d)/dist

【问题讨论】:

    标签: python 3d plane


    【解决方案1】:

    你飞机的法线是[a,b,c]。将它乘以d 并得到结果的长度。这应该可以满足您的需求。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多