re: inside of polygon
- To: mathgroup at smc.vnet.net
- Subject: [mg28568] re: inside of polygon
- From: wouter.meeussen at vandemoortele.be (Wouter Meeussen)
- Date: Sat, 28 Apr 2001 21:35:56 -0400 (EDT)
- Organization: The Math Forum
- References: <9c7n25$scu@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
this is a FAQ. define the rectangle that contains the contour. For each point in that rectangle, calculate the winding number (cumulative director angle from that point to all points around the contour). If zero, then point is outside. If (2 Pi) then point is inside. Works also for non-convex contours. enjoy.