-2
$\begingroup$

Say I have a $L_1$ with end points $(0,0)$,$(1,1)$ and $L_2$ with the start point $(1,1)$ and the end point anywhere on the Cartesian plane. See example image below.

Example image

How do I determine the angle $X$ when the end point of $L_2$ can be anywhere in the Cartesian plane?

Thanks

geometry

$\endgroup$
1
$\begingroup$

The slope of $L_1$ is $$m_1=\frac{1-0}{1-0}=1$$ Let the other end point of $L_2$ be $(x,y)$.

The slope of $L_2$ then will be $$m_2=\frac{y-1}{x-1}$$

Now, to find the angle $\theta$ between two lines with slopes $m_1$ and $m_2$, use the relation, $$\tan\theta=\frac{m_2-m_1}{1+m_1m_2}$$

There are two angles between a pair of line segments, and it depends on the context which one you are looking for.

In this context, the angle $X$ is the angle made by $L_2$ with respect to $L_1$ when measured clockwise, while as per convention, $\theta$ is taken anti clockwise.

Thus, the relation between $X$ and $\theta$ will be, $$X=\pi-\theta$$

$\endgroup$
  • $\begingroup$ Thanks @GoodDeeds, if L2 end point is at (2,4) this gives the answer of 26 degrees, but the answer is 180 - 26 ? If the end point of L2 is at an arbitrary position is there a generic formula for the angle ? (if that make sense). Thanks once again $\endgroup$ – tosspot Feb 26 '16 at 16:26
  • $\begingroup$ @tosspot Updated my answer. $\endgroup$ – GoodDeeds Feb 27 '16 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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