# Find a equidistant point between two intersecting lines

I want to draw a straight dashed line segment given an intersection point between two lines segments. I am wondering, what is the best way to do this since I don't really have a second point to draw this line segment?

What I have done so far is calculate the intersection point of the two line segments.

So now I have one point, my question is how do I get the second point or what should I set the second point to be if I want the line to be straight from the intersection point?

So, I was thinking, I want to find an equidistant point between two intersecting lines such that that point is not the intersecting point of those two lines.

Image drawn is not exact or to scale but something like below:

How can I find the equidistant point? What's the formula for it? How do I derive the formula?

EDIT: I need a way to do this algebraically because I want to translate this into code.

• Do you want ruler and compass constructions? Or do you want to do it the algebraic way? – Dasherman Mar 18 '15 at 18:09
• Bisect the angle – Henry Mar 18 '15 at 18:12
• Assuming the use of protractors or analytical answers, it sounds as though you are interested in a point along a line which halves the angle where the line segments intersect. This should have the property you seek, seen easily with the notion of similar triangles (granted the one triangle will be a mirror image of the other, not a rotation). For a ruler&compass construction, see the applet here – JMoravitz Mar 18 '15 at 18:12
• Sorry, guys. I want the algebraic way! Or a way to do it so that I can translate it into code. Thanks – Kala J Mar 18 '15 at 18:31

Let $x_0$ be the intersection point of two lines $g$ and $h$, given by \begin{align*} g(t)=x_0+tv,\qquad h(t)=x_0+tw, \end{align*} where $v$ is a vector pointing along $g$ and $w$ is a vector pointing along $h$. Then the points which have the same distance to $g$ and $h$ lie on the lines given by \begin{align*} x_0+t\left(\frac{v}{|v|}\pm\frac{w}{|w|}\right). \end{align*}
If you write your two lines as $c_1x +c_2y = c_3$ and $d_1x + d_2y = d_3$ then the equation for the line that passes directly through the middle is $(c_1 + c_2)x + (d_1 + d_2)y = c_3+d_3$.