Subject: CGAL users discussion list
List archive
- From: Mathieu Brédif <>
- To:
- Subject: Re: [cgal-discuss] Creating a random sample
- Date: Tue, 16 Jun 2009 10:42:14 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=a9hClDcpZHiyq9/hq+qNI9TuAYkdku5SkFQOOK1aQ/g8WfueTsH8ZPYL1xfPa7ymHx 2xrtYEU8pn7xSyd2RVFHIo9vW3cgFdW7045HE1AHt0RHWc7KMBiE9hztH/LX7RRwpRHM 1slNXDAWoV7/44Y8RYygo3a3l5igFL3q6k9TA=
if you want it iid and uniform you have several alternatives:
[simple] sample its bounding box and until it falls inside the polygon
[more efficient] triangulate it, pick a triangle at random based on
its area relative to the polygon area, and sample uniformly inside the
triangle.
Mathieu
On Tue, Jun 16, 2009 at 10:29 AM, Amir
Vaxman<>
wrote:
> Hello,
>
>
>
> How do I create a random set of N points inside a given polygon_2?
>
>
>
> Amir.
- [cgal-discuss] Creating a random sample, Amir Vaxman, 06/16/2009
- Re: [cgal-discuss] Creating a random sample, Mathieu Brédif, 06/16/2009
- Re: [cgal-discuss] Creating a random sample, Andreas Fabri, 06/16/2009
- RE: [cgal-discuss] Creating a random sample, Amir Vaxman, 06/16/2009
- Re: [cgal-discuss] Creating a random sample, Olivier Devillers, 06/16/2009
- RE: [cgal-discuss] Creating a random sample, Amir Vaxman, 06/16/2009
- Re: [cgal-discuss] Creating a random sample, Bo Zhou, 06/16/2009
Archive powered by MHonArc 2.6.16.