# Plane transformation

I have a plane-A which sits on the origin and where every point on the plane has a z coordinate of 0 (so there is no rotation of the plane).

I have plane-B in space and I have a a point (which is the origin) on the plane and a normal so it can be rotated in any axis. The point and normal are in relation to plane-A.

What I want to do is switch them, so I now make plane-B the origin and find out the origin-corner-point of plane-A and its normal. I can't figure out the maths - what do I need to do?

hope that makes sense.

EDIT:

I have plane-A & plane-B in the same 3D space

I have plane-A which I represent with a point [0,0,0] and a normal vector which is [0,0,1] I think (not too sure if I have this correct, every point on the plane has a z coordinate of 0).

I have plane-B which is not parallel to plane-A for which I have a point [a_x, a_y, a_z] and a normal vector [a_rx, a_ry, a_rz].

I want some sort of transformation such that [a_x, a_y, a_z] is now [0,0,0] and the normal vector for plane-A [a_rx, a_ry, a_rz] is [0,0,1] but the "relationship" between plane-A and plane-B stays the same.

The end product is, after the transformation, to get the plane-A point coordinates and plane-A normal vector.

• Are you working in 3 dimensions? If the planes are parallel, then you have a fixed distance between them. Otherwise, you've got a reference point in each plane, and a fixed angle between their normal vectors (which is zero if they're parallel). You can use either plane's reference point (e.g. its origin as you call it) and its normal vector to project points from the other plane onto the first plane. What do you mean by corner point (are you considering infinite planes or finite regions)? What are you ultimately trying to do? Mar 14, 2012 at 22:59
• I have edited the question. I hope it's far more clear. Mar 14, 2012 at 23:33

I think this question is still unclear. If I understand, you have a set of points for plane $A$ which have the general form $(x,y,0)$ and you have a plane B whose origin is defined relative to the plane $A$ origin. If $A$ is at $(0,0,0)$ with normal $(0,0,1)$ and $B$ is at $(d_x,d_y,d_z)$ with normal $(n_x,n_y,n_z)$ then translating the coordinate origin to $B$ puts $OB$ at $(0,0,0)$ and $OA$ at $(-d_x,-d_y,-d_z)$, but if you want to rotate the space to move $B$s normal to $(0,0,1)$, then there is a family of solutions.
The problem is not constrained because you need to know the in-plane rotation around the normal axis of plane $B$. After translating $B$ to the origin, there is a $3\times 3$ rotation matrix that must be applied to rotate the coordinate system around the new origin so that points on plane $B$ end up with $z=0$. Tho get a unique solution requires knowledge of the in-plane rotation as well as the angle between the normals. This rotation turns the whole space to align $B$ and rotates both the normals and the vector betweem the plane origins, moving the already translated origin of $A$ to a new position in the new coordinate system.
If you already know the $3\times 3$ $R$ rotation matrix and translation $t$ vector between the spaces according to $x_b = R x_a + t$, where $x_a$ is any 3D point relative to $OA$ and $x_b$ is any 3D point relative to $OB$, then $x_a = R^T (x_b - t)$. ($R^T = R$ transpose). Its difficult to provide more information without knowing how you are representing the planes.