étant donné une équation plane, comment pouvez-vous générer quatre points qui composent un rectangle? Je n'ai que l'équation plane ax + de + cz = d.comment générer un rectangle à partir d'une équation plane ax + de + cz = d?
Je suivais l'approche énumérés ici 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])
si je comprends bien trouver un vecteur U dans le plan. trouver V = np.cross (U, N) où N = np.array ([a, b, c]) puis trouver 4 coins où coin = np.add (+/- V, +/- U) – webmaker
des points (x, y, z) dont les coordonnées vérifient l'équation du plan définissent un tel vecteur. – JulienD
comment puis-je trouver ce premier vecteur dans un plan autre que de brancher arbitrairement des points? – webmaker