VoronoiMesh
gives a MeshRegion representing the Voronoi mesh from the points p1, p2, ….
Details and Options

- VoronoiMesh is also known as Voronoi diagram and Dirichlet tessellation.
- The Voronoi mesh consists of n convex cells, each associated with a point pi and defined by
, which is the region of points closer to pi than any other point pj for j≠i.
- The cells associated with the outer points will be unbounded, but only a bounded range will be returned. If no explicit range {{xmin,xmax},…} is given, a range is computed automatically.
- The cells will be intervals in 1D, convex polygons in 2D and convex polyhedra in 3D.
- VoronoiMesh takes the same options as MeshRegion.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Create a 1D Voronoi mesh from a set of points:

https://wolfram.com/xid/0v59wb2eyhxo2-gfo0ik

https://wolfram.com/xid/0v59wb2eyhxo2-n4i1ef

Each point corresponds to a Voronoi cell, which is an interval in the 1D case:

https://wolfram.com/xid/0v59wb2eyhxo2-jyuang

Create a 2D Voronoi mesh from a set of points:

https://wolfram.com/xid/0v59wb2eyhxo2-cc1zml

https://wolfram.com/xid/0v59wb2eyhxo2-m9dxn1

Each point corresponds to a Voronoi cell:

https://wolfram.com/xid/0v59wb2eyhxo2-dnv6v7

Scope (2)Survey of the scope of standard use cases
Create a 1D Voronoi mesh from a set of points:

https://wolfram.com/xid/0v59wb2eyhxo2-bf3fg3

https://wolfram.com/xid/0v59wb2eyhxo2-bzbw16


https://wolfram.com/xid/0v59wb2eyhxo2-e5wdx

Voronoi meshes are full-dimensional:

https://wolfram.com/xid/0v59wb2eyhxo2-fg7b1j

Voronoi meshes are bounded by their clipping values:

https://wolfram.com/xid/0v59wb2eyhxo2-bp7ncn


https://wolfram.com/xid/0v59wb2eyhxo2-qsfcn

Create a 2D Voronoi mesh from a set of points:

https://wolfram.com/xid/0v59wb2eyhxo2-8xqie

https://wolfram.com/xid/0v59wb2eyhxo2-b2qeir


https://wolfram.com/xid/0v59wb2eyhxo2-lufsn8

Voronoi meshes are full-dimensional:

https://wolfram.com/xid/0v59wb2eyhxo2-y8rto

Voronoi meshes are bounded by their clipping values:

https://wolfram.com/xid/0v59wb2eyhxo2-flf5wy


https://wolfram.com/xid/0v59wb2eyhxo2-juguio

Options (11)Common values & functionality for each option
MeshCellHighlight (2)
MeshCellHighlight allows you to specify highlighting for parts of a VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-y7md78

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/0v59wb2eyhxo2-84pz48


https://wolfram.com/xid/0v59wb2eyhxo2-wal4eg

MeshCellLabel (2)
MeshCellLabel can be used to label parts of a VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-3uzeps

Individual cells can be labeled using their cell index:

https://wolfram.com/xid/0v59wb2eyhxo2-f8bhvh


https://wolfram.com/xid/0v59wb2eyhxo2-yqnr3j

MeshCellMarker (1)
MeshCellMarker can be used to assign values to parts of a VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-djaryb

Use MeshCellLabel to show the markers:

https://wolfram.com/xid/0v59wb2eyhxo2-n4n4ga

MeshCellShapeFunction (2)
MeshCellShapeFunction allows you to specify functions for parts of a VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-llan4l

Individual cells can be drawn using their cell index:

https://wolfram.com/xid/0v59wb2eyhxo2-8n7ur5


https://wolfram.com/xid/0v59wb2eyhxo2-bbtayg

MeshCellStyle (2)
MeshCellStyle allows you to specify styling for parts of a VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-ctu3b9

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/0v59wb2eyhxo2-hd6ahz


https://wolfram.com/xid/0v59wb2eyhxo2-0jj5ak

Applications (8)Sample problems that can be solved with this function
Basic Applications (2)
Create an interactive Voronoi mesh with draggable points. Use Click on the Voronoi mesh to add and remove draggable points:

https://wolfram.com/xid/0v59wb2eyhxo2-c62ndx

Voronoi meshes for simple point configurations including a grid:

https://wolfram.com/xid/0v59wb2eyhxo2-ekz026

https://wolfram.com/xid/0v59wb2eyhxo2-hinwy8


https://wolfram.com/xid/0v59wb2eyhxo2-hemqt8

https://wolfram.com/xid/0v59wb2eyhxo2-gqovvz

Geography (1)
Create an interactive map of the closest large city in Italy. Start by getting names and coordinate data for large cities in Italy:

https://wolfram.com/xid/0v59wb2eyhxo2-k14gr2
Nearest function for labeling region cells:

https://wolfram.com/xid/0v59wb2eyhxo2-b0gq0a
Generate a Voronoi mesh from city coordinates:

https://wolfram.com/xid/0v59wb2eyhxo2-dcg8oi

Create a tooltip map from the Voronoi mesh:

https://wolfram.com/xid/0v59wb2eyhxo2-dw4fv1
Mouse over the map to get the name of the closest large city:

https://wolfram.com/xid/0v59wb2eyhxo2-ljlxyv

Physics (1)
Image Processing (1)
Create a polygonal mosaic from an image:

https://wolfram.com/xid/0v59wb2eyhxo2-7lslr6

https://wolfram.com/xid/0v59wb2eyhxo2-zh60xn

Create a Voronoi mesh from the edge positions:

https://wolfram.com/xid/0v59wb2eyhxo2-svs2dd

https://wolfram.com/xid/0v59wb2eyhxo2-ceu37w

Recursively apply VoronoiMesh to the mean vertex positions of the precursive Voronoi cells to create a more uniform mesh:

https://wolfram.com/xid/0v59wb2eyhxo2-mg5min

Color each polygon with the image color coinciding with its mean vertex positions:

https://wolfram.com/xid/0v59wb2eyhxo2-k23at2

Other (3)
Create a jigsaw puzzle from a random Voronoi mesh:

https://wolfram.com/xid/0v59wb2eyhxo2-6g3yj3

https://wolfram.com/xid/0v59wb2eyhxo2-3u64r8
Define a function that converts a line to an interlocking edge:

https://wolfram.com/xid/0v59wb2eyhxo2-3a5ete
Replace lines of sufficient length with an interlocking edge:

https://wolfram.com/xid/0v59wb2eyhxo2-gduep8

https://wolfram.com/xid/0v59wb2eyhxo2-u503gq

Visualize a piecewise constant interpolation of a function over a set of random point samples:

https://wolfram.com/xid/0v59wb2eyhxo2-d7jpdv

https://wolfram.com/xid/0v59wb2eyhxo2-m2pk2r
Voronoi mesh from ,
sample coordinates:

https://wolfram.com/xid/0v59wb2eyhxo2-m3lbhw
Function to rescale values to
:

https://wolfram.com/xid/0v59wb2eyhxo2-jmpr0n
Piecewise constant contour plot of sample data:

https://wolfram.com/xid/0v59wb2eyhxo2-b1qldr

A similar plot can also be achieved with ListContourPlot:

https://wolfram.com/xid/0v59wb2eyhxo2-kwnj9t

Plan a path for a point robot through a random set of point obstacles by following Voronoi edges:

https://wolfram.com/xid/0v59wb2eyhxo2-u0lnpk
Generate Voronoi edges around the obstacles:

https://wolfram.com/xid/0v59wb2eyhxo2-589xww
Create an undirected Graph from the Voronoi edges with their lengths as edge weights:

https://wolfram.com/xid/0v59wb2eyhxo2-r35m3j

https://wolfram.com/xid/0v59wb2eyhxo2-u0hnm6

https://wolfram.com/xid/0v59wb2eyhxo2-c6mp9v
Use Nearest function to find the closest Voronoi vertices to the start and end points:

https://wolfram.com/xid/0v59wb2eyhxo2-ca2qpw
Drag starting or ending points to explore different paths (red):

https://wolfram.com/xid/0v59wb2eyhxo2-q0pl5b

Properties & Relations (6)Properties of the function, and connections to other functions
The output of VoronoiMesh is always a full-dimensional MeshRegion:

https://wolfram.com/xid/0v59wb2eyhxo2-dg2zb8


https://wolfram.com/xid/0v59wb2eyhxo2-iew0pq

Each point of the original data is contained in exactly one cell in the Voronoi mesh:

https://wolfram.com/xid/0v59wb2eyhxo2-fxqrw

https://wolfram.com/xid/0v59wb2eyhxo2-ms8gc

https://wolfram.com/xid/0v59wb2eyhxo2-piwjoh

VoronoiMesh is the dual of the DelaunayMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-ece4q5

https://wolfram.com/xid/0v59wb2eyhxo2-baa19e

https://wolfram.com/xid/0v59wb2eyhxo2-cg7utx
Each Voronoi cell has a single point from the original point set:

https://wolfram.com/xid/0v59wb2eyhxo2-bz8xlh

The Voronoi cell for pi is given by :

https://wolfram.com/xid/0v59wb2eyhxo2-kxoo41

https://wolfram.com/xid/0v59wb2eyhxo2-btl1i8

Generate the conditions for each cell:

https://wolfram.com/xid/0v59wb2eyhxo2-fof92k

https://wolfram.com/xid/0v59wb2eyhxo2-c1cy9

DistanceTransform for black points on a white background will be similar to VoronoiMesh:

https://wolfram.com/xid/0v59wb2eyhxo2-bogaq8

https://wolfram.com/xid/0v59wb2eyhxo2-qy5gu

https://wolfram.com/xid/0v59wb2eyhxo2-67dwz

2D Voronoi diagrams can be rendered in Graphics3D using Cone primitives:

https://wolfram.com/xid/0v59wb2eyhxo2-430ksq

https://wolfram.com/xid/0v59wb2eyhxo2-sd60f1

https://wolfram.com/xid/0v59wb2eyhxo2-5eub7g

Wolfram Research (2014), VoronoiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/VoronoiMesh.html (updated 2022).
Text
Wolfram Research (2014), VoronoiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/VoronoiMesh.html (updated 2022).
Wolfram Research (2014), VoronoiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/VoronoiMesh.html (updated 2022).
CMS
Wolfram Language. 2014. "VoronoiMesh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/VoronoiMesh.html.
Wolfram Language. 2014. "VoronoiMesh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/VoronoiMesh.html.
APA
Wolfram Language. (2014). VoronoiMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VoronoiMesh.html
Wolfram Language. (2014). VoronoiMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VoronoiMesh.html
BibTeX
@misc{reference.wolfram_2025_voronoimesh, author="Wolfram Research", title="{VoronoiMesh}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/VoronoiMesh.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_voronoimesh, organization={Wolfram Research}, title={VoronoiMesh}, year={2022}, url={https://reference.wolfram.com/language/ref/VoronoiMesh.html}, note=[Accessed: 26-March-2025
]}