Voronoi Diagrams in Two-Dimensional Regions

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
This Demonstration partitions a geometric region (a square, parallelogram, disk, annulus, stadium shape, or regular pentagon) into Voronoi cells. The cells are located around a set of up to 24 random points (called sites) distributed uniformly across the region.
[more]
Contributed by: Erik Mahieu (July 2016)
Open content licensed under CC BY-NC-SA
Snapshots
Details
The regions are created using Mathematica's built-in function RegionPlot. A NearestFunction using the selected DistanceFunction is used as a MeshFunction to partition the regions into Voronoi cells.
Permanent Citation
"Voronoi Diagrams in Two-Dimensional Regions"
http://demonstrations.wolfram.com/VoronoiDiagramsInTwoDimensionalRegions/
Wolfram Demonstrations Project
Published: July 13 2016