# How to make two planar objects parallel

I am interested in taking the angle between two triangles $T1$ and $T2$, as determined by the angle between their normal vectors. I have followed the general proceedure as follows:

1. Assuming a vector definition of a plane ($\boldsymbol{r}$): $\boldsymbol(r) = \boldsymbol{r}_{0}+s\vec{v}+t\vec{w}$

2. I determine the plane defining vectors $\vec{v} , \vec{w}$ as $\boldsymbol{v}=T1_{1}-T1_{2}$ and $\vec{w} = T1_{1} - T1_{3}$.

3. Repeating the above calculation for $T2$, I now calculate the cross product of each triangles plane defining vectors with itself to obtain the normal vector for the two planes containing each triangle.

4. Calculating the angle is between the normals, and thus the planes, is done as follows. $\theta = \frac{\vec{n}_{1}\cdot\vec{n}_{2}}{|{\vec{n}_{1}}||\vec{n}_{2}|}$

This is where my trouble begins. I want to rotate $T1$ such that it is parallel to $T2$. I believe that I need to identify the rotation matrix and apply it to each point in $T1$. After doing some research, I find that that the rotation matrix can be defined as follows.

$\boldsymbol{R} = I\cos{\theta} + \sin{\theta}[\vec{u}]_{\mathrm{x}} + (1-\cos{\theta})\vec{u}\bigotimes\vec{u}$

Where $I$ is the identity matrix, $\theta$ is the angle of rotation about the axis in the direction of $\vec{u}$. This form of the equation is stated quite nicely on Wikipedia.

My trouble is in determing the axis of rotation. I thought that one would want to rotate about the vector defined by the cross product of the two normals, but this was unsucessful.

Furthermore, assume that I have obtained the correct rotation axis and rotation angle, how do I know whether I should rotate clockwise or counter clockwise?

• After further work on the problem, I believe I have come up with a solution, see my answer posted below. – PhiloEpisteme Feb 24 '14 at 18:20

Question 2: One can determine whether to do a "counterclockwise" $\boldsymbol{R}\vec{v}$ or a "clockwise" $\vec{v}\boldsymbol{R}$ rotation about $\vec{n_1} \times \vec{n_2}$ of $\vec{n_2}$ by comparing the length of the difference between the two normals. If $|\vec{n_1}-\vec{n_2}| \gt \sqrt{|\vec{n_1}|^2+|\vec{n_2}|^2}$, then use $\boldsymbol{R}\vec{v}$, otherwise use $\vec{v}\boldsymbol{R}$. This is because the above equation is true is the distance between the endpoints of the two vectors is less than or equal to what the distance would be if the two vectors formed a right angle, which is only the case if the angle of rotation $\leq \frac{\pi}{2}$.
AMBIGUITY: The above description consideres the axis of rotation to be the result of $\vec{n_1}\times\vec{n_2}$ and the the vector to rotate to be $\vec{n_1}$.