MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

All polygon definitions from a bounded Voronoi diagram

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101382] All polygon definitions from a bounded Voronoi diagram
  • From: edsferr <edsferr at uol.com.br>
  • Date: Sat, 4 Jul 2009 06:42:33 -0400 (EDT)

Suppose I gave a bounded region like the one defined by the polygon:

p={{0,0},{0.9856,0},{0.9856,0.5513},{0,0.5513},{0,0}};
ListLinePlot[p]

Now generate n points inside this polygon.

I can generate a voronoi diagram for these n points using:

Needs["ComputationalGeometry`"];
VoronoiDiagram[{{x1,y1},{x2,y2},...}]

or

DiagramPlot[{{x1, y1}, {x2, y2}, ...}]


We can extract information about the vertices of all the polygons
using the method described here:

http://reference.wolfram.com/mathematica/ComputationalGeometry/tutorial/ComputationalGeometry.html

What I need is all polygons definitions for the DiagramPlot like p is
defined above, using p as a boundary.

I mean that any Voronoi polygon associated with any point is closed
and is defined only by segments (no rays).

Thanks!!


  • Prev by Date: Re: stirring chocolate pudding backwards: identifying coordinates
  • Next by Date: kiss ellipses
  • Previous by thread: Re: Re: Re: Collect exponents only
  • Next by thread: kiss ellipses