I have a form in which I am moving one by one line in a separate thread. Say there are two lines L1 and L2. First I am moving L1 then on some event L1 will stop and L2 will move (L1 is horizontal line & L2 is vertical). After that, L2 will also stop at some event. Now I have to find in which position both lines are interacting with each other (intercept points). Please suggest how can I achieve this.
Share
If one line is vertical and another is horizontal then it is a simple match:
on vertical line X coordinate is the same on all the points, on the horizontal one the Y coordinate is fixed.
So you only can possibly intersect in
(verticalLine.Start.X, horizontalLine.Start.Y)You only need to check if this point belongs to any of these lines.