1
$\begingroup$

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:

enter image description here

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.

$\endgroup$
  • $\begingroup$ Do you want ruler and compass constructions? Or do you want to do it the algebraic way? $\endgroup$ – Dasherman Mar 18 '15 at 18:09
  • $\begingroup$ Bisect the angle $\endgroup$ – Henry Mar 18 '15 at 18:12
  • $\begingroup$ 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 $\endgroup$ – JMoravitz Mar 18 '15 at 18:12
  • $\begingroup$ Sorry, guys. I want the algebraic way! Or a way to do it so that I can translate it into code. Thanks $\endgroup$ – Kala J Mar 18 '15 at 18:31
1
$\begingroup$

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*}

$\endgroup$
0
$\begingroup$

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$.

$\endgroup$
  • $\begingroup$ So if I have the intersection point, the second point can be found if I solve for x or y in that last equation? $\endgroup$ – Kala J Mar 18 '15 at 18:36
0
$\begingroup$

Assuming you want a ruler+compass construction:

-Draw a circle with the point of intersection as the middle point (radius does not matter). The circle will intersect the lines at four points. Let's call them, from upper left, to upper right, to lower right, to lower left, A, B, C, D.

-Draw a circle with A as the centre and draw another circle with B as the centre. Both circles should have the same radius and this radius can be any radius, as long as those two circles will intersect. This point of intersection is then your equidistant point.

$\endgroup$

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.