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.
You can choose from three distance functions: Euclidean, Manhattan, or chessboard. You can choose the color scheme for the cells.

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

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.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.