Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
2  
How many dimensions are you working in? –  Henry Jan 2 '12 at 9:13
    
@Henry Sorry for the delayed response. I'm working in three dimensions. –  Steve Jan 2 '12 at 17:52

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
I apologize for the delay, but yes, I'm working in three dimensions. How though does one find the rotation angle? –  Steve Jan 2 '12 at 17:54
    
If the two lines define a curved plane in 3D, it's not clear to me that rotating around an arbitrary perpendicular line to the plane will allow for overlay by translation? –  Steve Jan 2 '12 at 18:03
    
@Steve, a curved plane? So when you say "lines" you actually mean "curves"? –  Peter Taylor Jan 2 '12 at 18:08
    
I shouldn't have said "curved", I meant a set of lines where one can pick two points on each line to represent a non-planar surface. –  Steve Jan 2 '12 at 18:15
    
In this image of a cube (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. –  Steve Jan 2 '12 at 18:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.