Vector_3 get_norm(Point_L a,Point_L b,Point_L c){
/*a=OA-OB=(X1,Y1,Z1);
b=OA-OC=(X2,Y2,Z2);*/
Point_L m,n;
m.x = a.x-b.x;
m.y = a.y-b.y;
m.z = a.z-b.z;
n.x = a.x-b.x;
n.y = a.y-b.y;
n.z = a.z-b.z;
double x = m.y*n.z-m.z*n.y;
double y = m.z*n.x-m.x*n.z;
double z = m.x*n.y-m.y*n.x;
Vector_3 norm(x,y,z);
return norm;
}
求一个面的法向 c++
最新推荐文章于 2024-02-03 15:05:44 发布