yeah, suppose it also depends on wether or not your polygon is concave
or convex...
i better stop before i strip a couple of neurons... my head's allready
starting to hurt... :)
cheers,
renier
riaan wrote:
Hi Renier
It is actually the other way around. If you cross an even number of
vertices, the point is outside your polygon and if you cross an odd number
the point is inside the polygon.
Or are we saying the same thing... :)
Riaan
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Renier Rhode
Sent: Monday, January 30, 2006 1:17 PM
To: [email protected]
Subject: [CTJUG Forum] Re: Creating a polygon
*scratches noggin*
Um if my memory serves me correctly from CS2 @ varsity...
If you draw a line either horizontally or vertically and in the process
of "drawing" this line you cross an even number of vertices you are
still inside your polygon. If you cross an uneven number of vertices you
are outside your polygon.
Hope this helps... *evil grin*
Cheers,
Renier
Riaan Koegelenberg wrote:
Hi
I am trying to create a polygon in Java. The coordinates
of the polygon is lat/long (geographic coordinates) so it
can go up to quite a few decimal places.
Have anyone ever done something like this? I need to
determine whether this polygon then contain a specific
point (coordinates also in lat/long).
Any help will be appreciated.
Riaan
___________________________________________________________________
For super low premiums, click here http://www.webmail.co.za/dd.pwm
http://www.webmail.co.za the South African FREE email service