in reply to Re^3: Polygon interact other polygon
in thread Polygon interact other polygon
Without knowing the standard algorithm, my natural approach would be to try to find intersections. If there are none then take the polygon with the point with the largest x-value, take any point of the other polygon, pull out my complex analysis and calculate a winding number by numerical integration. (In that calculation you're viewing the point (x,y) is treated as the complex number x + yi.) If that comes out non-zero (within the tolerance of rounding errors), then the one is inside the other. Otherwise not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Polygon interact other polygon
by zentara (Cardinal) on Oct 27, 2004 at 12:10 UTC |