0
$\begingroup$

Let say i have two parallel lines, $L_1$ and $L_2$,

enter image description here

Now how to Transform line $L_2$ in to $L_1$.

  • 0
    @user960567 The comment was too short, see below ;-)2012-04-14

2 Answers 2

1

You want to transform point $(x1,y1)$ to $(x2,y2)$, and $(x3,y3)$ to $(x4,y4)$. This means: $\left( \begin{array}{cc} a & b \\ c & d \end{array} \right) \cdot \left( \begin{array}{c} x1 \\ y1 \end{array} \right) = \left( \begin{array}{c} x2 \\ y2 \end{array} \right) $ And: $\left( \begin{array}{cc} a & b \\ c & d \end{array} \right) \cdot \left( \begin{array}{c} x3 \\ y3 \end{array} \right) = \left( \begin{array}{c} x4 \\ y4 \end{array} \right) $

You have four equations in the four unknowns $a,b,c,d$. Once you solve these equations the transformed coordinates $(x',y')$ are related to the old ones by: $\left( \begin{array}{cc} a & b \\ c & d \end{array} \right) \cdot \left( \begin{array}{c} x \\ y \end{array} \right) = \left( \begin{array}{c} x' \\ y' \end{array} \right) $

  • 0
    You mean the lines are of equal length? then yes, subtraction will work in that case.2012-04-14
1

The comments are too short, so I will explain it here. Let $A = (X_1, Y_1)$, $B = (X_2, Y_2)$, $C = (X_3, Y_3)$ and $D = (X_4, Y_4)$. We have that $AC\ \|\ BD$ and that you want to transform $A$ to $B$ and $C$ to $D$ (of course the same approach can be used to map $A$ to $D$ and $C$ to $B$). The notation $|PQ|$ means the length of $PQ$.

First of all, there are infinitely many transformations that would map $AC$ to $BD$ (without any constraints, if you assume that you want your map to be of some specific class, there may be just a few or even none), and I will just give you an example of such transformation.

What I will construct is called usually homothety or simply scaling, and this is one of the basic geometry transformations (along with rotation, translation and symmetry).

To start we need the center, let call it $S = (S_x, S_y)$. However, we know that $S$ is a point on the line passing through $A$ and $B$, and also on the line passing through $C$ and $D$. Therefore, $S$ is the intersection of those two lines (with the special case I will deal later). To apply the transformation to the point say $P$, just draw a line $SP$ and then set $P'$ on the same line, but with $|SP'| = \frac{|BS|}{|AS|}|SP| = \frac{|DS|}{|CS|}|SP|$ (where positive sign means $X'$ is on the same side as $X$, and the negative sign denotes opposite side). Please, compare it with Intercept theorem (in my country this is known as Thales' theorem). To give algebraic formula: $T(P) = \frac{|BS|}{|AS|}(P-S) + S$ or written more explicitly: $T(P_x, P_y) = \left(\frac{|BS|}{|AS|}(P_x-S_x)+S_x, \frac{|BS|}{|AS|}(P_y-S_y)+S_y\right)$

As you can see, if $S = (0,0)$ then this becomes a simple scaling. There is a special case when $AB\ \|\ CD$, i.e. when $S$ does not exists, or as some like to say $S$ is in infinity. But in this degenerate case homothety becomes just translation, so $T(P) = P+AB$ or $T(P_x, P_y) = (P_x + B_x - A_x, P_y + B_y - A_y)$

Hope that helps ;-)

  • 0
    See below comments.2012-04-15