![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Polygon interact other polygonby pg (Canon) |
on Oct 24, 2004 at 17:15 UTC ( #402052=note: print w/replies, xml ) | Need Help?? |
"How to find the intersection of 2 lines has a well known solution," Well, just to add a bit detail here: line is the extension of a line segment on both ends. Two line intersect each other, does not mean that the two original line segments intersect. Your solution is fine, other than that we have to add one more step: after you get the point of intersection, you have to go back and check whether the intersection point is on both original line segments.
In Section
Seekers of Perl Wisdom
|
|