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.

$\endgroup$
2
  • 2
    $\begingroup$ How many dimensions are you working in? $\endgroup$ Commented Jan 2, 2012 at 9:13
  • $\begingroup$ @Henry Sorry for the delayed response. I'm working in three dimensions. $\endgroup$ Commented Jan 2, 2012 at 17:52

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
5
  • $\begingroup$ I apologize for the delay, but yes, I'm working in three dimensions. How though does one find the rotation angle? $\endgroup$ Commented Jan 2, 2012 at 17:54
  • $\begingroup$ 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? $\endgroup$ Commented Jan 2, 2012 at 18:03
  • $\begingroup$ @Steve, a curved plane? So when you say "lines" you actually mean "curves"? $\endgroup$ Commented Jan 2, 2012 at 18:08
  • $\begingroup$ 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. $\endgroup$ Commented Jan 2, 2012 at 18:15
  • $\begingroup$ 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. $\endgroup$ Commented Jan 2, 2012 at 18:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.