2D Coordinate - Plot a line parallel to another line

26 Views Asked by At

enter image description here

I am given values of $x_1, y_1, x_2, y_2$, $\theta_{1}$, $\theta_{2}$, $h$, $m$ and $L$.

I want to find out the coordinate of the Unknown Point of Interest, which is the end point of line2 which is parallel to line1.

How can I do this?

2

There are 2 best solutions below

2
On BEST ANSWER

Consider a unitary vector $\hat{u}_1$ along the direction of line 1,

$$ \hat{u}_1 = \pmatrix{\cos \theta_2 \\ \sin\theta_2} $$

The location you are looking for is

$$ \mbox{unkowon point of interest} = \pmatrix{x_2 \\ y_2} + L \hat{u}_1 = \pmatrix{x_2 + L\cos\theta_2 \\ y_2 + L \sin\theta_2} $$

0
On

First you know x2 and y2 (the coordinates of the beginnning of line 2)
Because line 1 and line 2 are parallel, all you need to do is slide the point $(\begin{matrix}x2\\y2\end{matrix})$ along line 2.
If you consider line 2 as a vector: $\vec{v} = (\begin{matrix} L*cos(\theta_2) \\ L*sin(\theta_2) \end{matrix})$
All you need to do is move point using the vector (adding them together): $$Point = (\begin{matrix} x2+L*cos(\theta_2)\\ y2+L*sin(\theta_2)\end{matrix})$$
Note: i think $\theta_1$ and $\theta_2$ are mixed up on the picture, here i used the picture as my reference. Feel free to swap $\theta_1$ and $\theta_2$ if needed

Note2: in theory the slope $m=\frac{sin(\theta_2)}{cos(\theta_2)} = tan(\theta_2)$