Voronoi Diagrams in Two-Dimensional Regions
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]
You can choose from three distance functions: Euclidean, Manhattan, or chessboard. You can choose the color scheme for the cells.[less]
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.