If I have a set of coplanar points in 3d space, how can I move them to the $xz$ plane conserving the "shape"?

383 Views Asked by At

I have a set of points that are the vertices of a polygon. Those points are in the same (arbitrary) plane. I want to move/rotate them so that the polygon sits in the $xz$ plane, (so that all vertices have a $y=0$ coordinate) without deforming it.

I guess the method would imply finding the plane coordinates, finding out which transform puts said plane in the $xz$ plane, and then using that transformation for all points, but I have no idea about how to do it in practice.

1

There are 1 best solutions below

0
On

You can find a vector perpenduicular to plane by calculating the cross product of two vectors between your points, then you just need to find a transformation that transforms that vector to something parallel to $(0,1,0)$, that's a well known operation.