I need to write a little application. My Basic Problem is i have a polygonal area which is not rectangular but isn't too complex as well, just a few vertex points building the polygonal area.
So, i need to place random starting points in this polygonal area. I googled and googled and of course found quite some stuff. Most interesting is the "Ray Casting Algorithm" from Point in polygon - Wikipedia, the free encyclopedia and other sources, but what bothers me is the fact that it's a test on a point if it's in or out the poly. But what if i want to generate points in the Polygon? do i generate random coordinates within a bounding box of the polygon and test them if they're in the poly and if they are, i actually create them?? This doesn't sound very effective to me..
Has anybody an idea or a hint on how to generate random coordinates within this polygonal area "directly"?
Thanks a lot for any help.