Line segment Intersection
in
Programming Questions
•
2 years ago
I'm doing an application that allows the user to use the mouse to draw orthogonal lines with the mouse. Every time the user turns 90 degrees, I store that point in a ArrayList and then draw lines between the points. The last line is draw between the last point and mouseX, mouseY (fig bellow). I need to know when this last line has crossed any of the other segments. Is there an easy way to do this other than computing each line equation based on its points?
Thanks in advance
Thanks in advance
1