2
$\begingroup$

I have two lines with known parametric equations and some number of distinct points along each line. I would like to rotate the points on $L_2$ some number of degrees $\theta$ along one and only one line $L_{map}$ s.t. that the set of points in $L_2$ can be translated to lie along $L_1$. Performing such a rotation on a set of points is straightforward, but how do I find $L_{map}$ and the rotation angle $\theta$ as a function of $L_1$ and $L_2$?

[1/3/2012] - To reduce the size of the solution set of lines satisfying the constraints for $L_{map}$, we can split $L_1$ and $L_2$ into two sets of parallel lines spaced the same distance apart, and ask for some line $L_{map}$ that allows one to overlay the two sets of parallel lines by translation.

  • 0
    @Henry Sorry for the delayed response. I'm working in three dimensions.2012-01-02

2 Answers 2

1

Let $\vec v$ be the cross-product of the direction vectors of $L_1$ and $L_2$. As long as $L_1$ and $L_2$ are not already parallel, $\vec v$ will be non-zero. I assert that $\vec v$ is the direction vector of $L_{map}$.

Now, take the plane formed by $L_{map}$ and $L_2$ and find the unique point $\vec x_0$ where it intersects with $L_1$. This will be a point on $L_{map}$.

So you can then define $L_{map} = \vec x_0 + \vec v t$.

The angle of rotation $\theta$ is determined by taking the dot product of the direction vectors, since $ \vec u \cdot \vec v = |\vec u||\vec v| \cos \theta.$

If you're doing this algorithmically, there's a slight hitch since you have two solutions, $\pm\theta$, from solving for $\cos \theta$. The blunt way from here is to try both, and keep the solution where the resulting direction vector's dot product with the direction vector of $L_1$ is higher.

0

Your two lines define a plane. If you rotate around any line perpendicular to that plane, you'll then be able to translate. If you're working in 3D you can find a perpendicular by taking the cross product of the direction vectors of the two lines.

  • 0
    In this image of a cube (http://yaroslavvb.com/blog/ecc/hamming3.png), for example, let L1 be the line passing through the top two red vertices, and let L2 be the line passing through the bottom two red vertices.2012-01-02