Voronoi Diagrams in Two-Dimensional Regions

Initializing live version
Download to Desktop

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]

You can choose from three distance functions: Euclidean, Manhattan, or chessboard. You can choose the color scheme for the cells.

[less]

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.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send