Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] random points

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] random points


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] random points
  • Date: Sun, 26 Sep 2010 01:28:27 +0200
  • Organization: GeometryFactory

Le dimanche 26 septembre 2010 01:18:21, sara123 a écrit :
> hi,
>
> i have a simple polygon (cgal manual, page 4070) and i want to produce some
> random points in (interior) the polygon. how can i do that?

It depends what distributions of point you want in the polygon.

If you want a uniform distribution, you can produce random points in the
bounding box of the polygon, and discard those that are outside the polygon.
That method will not be efficient if the shape of the polygon is thin (area
of
the polygon small compared to the area of the bounding box).

--
Laurent Rineau, PhD
Release Manager of the CGAL Project http://www.cgal.org/
R&D Engineer at GeometryFactory http://www.geometryfactory.com/



Archive powered by MHonArc 2.6.16.

Top of Page