与えられた平面方程式は、どのように四角形を構成する4つの点を生成できますか?私は平面方程式ax + by + cz = dしか持たない。平面方程式から矩形を生成する方法ax + by + cz = d?
私はここFind Corners of Rectangle, Given Plane equation, height and width
#generate horizontal vector U
temp_normal=np.array([a,b,c])
temp_vertical=np.array([0,0,1])
U=np.cross(temp_normal, temp_vertical)
# for corner 3 and 4
neg_U=np.multiply([-1.0, -1.0, -1.0], U)
#generate vertical vector W
W=np.cross(temp_normal,U)
#for corner 2 and 4
neg_W=np.multiply([-1.0, -1.0, -1.0], W)
#make the four corners
#C1 = P0 + (width/2) * U + (height/2) * W
C1=np.sum([centroid,np.multiply(U, width_array),np.multiply(W, height_array)], axis=0)
corner1=C1.tolist()
#C2 = P0 + (width/2) * U - (height/2) * W
C2=np.sum([centroid,np.multiply(U, width_array),np.multiply(neg_W, height_array)], axis=0)
corner2=C2.tolist()
#C3 = P0 - (width/2) * U + (height/2) * W
C3=np.sum([centroid,np.multiply(neg_U, width_array),np.multiply(W, height_array)], axis=0)
corner3=C3.tolist()
#C4 = P0 - (width/2) * U - (height/2) * W
C4=np.sum([centroid,np.multiply(neg_U, width_array),np.multiply(neg_W, height_array)], axis=0)
self.theLw.WriteLine("C4 is " +str(type(C4))+" "+str(C4.tolist()))
corner4=C4.tolist()
corners_list.append([corner1, corner2, corner3, corner4])
私が正しく飛行機の中にベクトルUを見つけたとすれば、 V = np.cross(U、N)ここでN = np.array([a、b、c])を見つけると、コーナー= np.add(+/- V、+/- U)の4つのコーナーを見つける – webmaker
そのようなベクトルを定義する平面の方程式を検証する座標(x、y、z)の点 – JulienD
任意の点を差し込むだけではなく、最初のベクトルを平面内で見つける方法はありますか? – webmaker