2016-09-09 25 views
0

假設我有一個平面方程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 

回答

1

您的飛機正常是[a,b,c]。乘以d並得到結果的長度。這應該給你你需要的東西。

相關問題