more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
From the bottom of my mind:
The simplest algorithm I'm aware of is to successively
The check is crucial, you need a scalar product of the point vector with orthogonal vectors on all edges pointing inside. If the product is positiv it means the point is "inside" the edge. Iff the point is inside all edges, it's inside the polygon. Otherwise you extend the polygon by replacing all "outside" edges. (Most probably you'll also need to move the points before doing the product, such that the edge goes thru (0,0) ) HTH and you get the idea. I'm pretty tired, lacking the right vocabulary and typing into my mobile without possibility to scetch it on paper. :)
Cheers Rolf
In reply to Re: Polygon Creation -- Request for Algorithm Suggestions
by LanX
|
|