3D rotations of a plane?

If you have, or can easily compute, the normal vector to the plane that your points are currently in, I think the easiest way to do this will be to rotate around the axis common to the two planes. Here's how I'd go about it.

I'm thinking make a unit vector 0,0,1 and use the dot-product along two planes to find the angle of difference, and shift all your points by those angles. This is assuming you want the z-axis to align with the normal vector, else just use 1,0,0 or 0,1,0 for x and y respectively.

Related Questions