Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Random Polygon Generator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Random Polygon Generator


Chronological Thread 
  • From: Michael Hoffmann <>
  • To:
  • Subject: Re: [cgal-discuss] Random Polygon Generator
  • Date: Wed, 04 Feb 2009 11:34:50 +0100 (CET)

> Is there any way to produce a random simple polygon (confined in a
> given bounding box) w/holes, with a given complexity n?

depends on what you mean by random simple polygon. :-)

You can, for instance, pick the vertices according to your favorite
distribution and connect them,

1) along their upper convex hull and the rest in lexicographic order;

2) choosing a random permutation and successively flipping edge
crossings;

3) by an (approximate) Minimum TSP tour (e.g., starting from an EMST
and then remove crossings);

4) similar as in the SLR/Graham scan convex hull algorithm, except
that you don't enforce local convexity but only that no point
appears on both chains;

5) ... (probably many other options, depending on what you want)

hth,
Michael



Archive powered by MHonArc 2.6.16.

Top of Page