Voronoi Diagram Generator
Generate Voronoi diagrams from a set of seed points online. Click the canvas to add or drag points, switch between Euclidean, Manhattan, Chebyshev and Minkowski distance metrics, pick from curated color palettes, watch cells animate into place, and export the result as SVG or PNG. Includes Lloyd relaxation, golden-spiral and hexagonal seed presets for crisp, even cells.
Euclidean — straight-line distance (classic) Scattered random · 18 seed points · Aurora (teal · violet · rose)
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Voronoi Diagram Generator
The Voronoi Diagram Generator partitions a 2D plane into regions based on closeness to a set of seed points. Every point in the plane belongs to whichever seed is nearest, so the diagram looks like a patchwork of cells around the input points. This tool generates Voronoi diagrams interactively in your browser — drop new seeds with a click, drag any seed to redraw the cells in real time, switch between four distance metrics, and apply Lloyd relaxation to even out cell sizes. Export the result as crisp SVG or shareable PNG.
How it works: for every spot on the canvas, the algorithm finds the closest seed point and paints that spot with the seed's color. The boundary between any two cells is the perpendicular bisector of the segment between those two seeds — that is, the set of locations exactly equidistant from both. Three perpendicular bisectors meet at every cell-corner, which is also the center of a circle passing through three seed points (the empty circle property).
The four distance metrics — visualized
The shape of every Voronoi cell is determined by which distance metric you use. Each metric defines what "a circle" looks like — and that circle's shape is exactly the shape that bumps up against its neighbors to form cell boundaries.
circle = circle
circle = diamond
circle = square
circle = superellipse
That is why Manhattan-metric cells have only horizontal, vertical, and 45° edges, while Chebyshev cells have only horizontal and vertical edges — the boundary between two cells is always tangent to the shapes of those two "circles". Euclidean gives the classic curved-edged Voronoi everyone associates with the name. Minkowski p=3 is a mathematically elegant in-between case used in computational design where the L1 corners feel too harsh but the L2 circles feel too round.
What makes this generator different
Where Voronoi diagrams show up
- Cell-tower coverage maps — a phone connects to whichever tower it is closest to, which is exactly the Voronoi cell of that tower.
- John Snow's 1854 cholera map — Snow drew the Voronoi cell around each water pump in Soho and counted cholera deaths inside each cell, isolating the contaminated Broad Street pump.
- Procedural texturing — Worley noise (cellular noise) is used in everything from skin shaders to terrain generation in games like Minecraft and No Man's Sky.
- Mesh generation — finite-element solvers prefer near-equilateral triangles, and the Delaunay triangulation (the dual of the Voronoi diagram) maximizes the smallest angle across all triangles.
- Robot path planning — the edges of the Voronoi diagram around obstacle points are the safest paths a robot can take, because they maximize distance from every obstacle.
- Stippling and halftoning — Lloyd-relaxed Voronoi diagrams produce visually pleasing point distributions used in artistic stippling and printer dithering.
- Astronomy — galaxy super-clusters and the cosmic web display Voronoi-like structure thanks to gravitational clumping; Voronoi tessellation is a standard tool in galaxy-density estimation.
- Crystallography — Wigner–Seitz cells (Voronoi cells around atoms in a lattice) define the primitive volume of every unit cell in solid-state physics.
Mathematical detail
Cell definition — for a finite set of seed points \(\{p_1, p_2, \dots, p_n\}\) and any metric \(d(\cdot,\cdot)\), the Voronoi cell of \(p_i\) is
\[ V_i = \{ x \in \mathbb{R}^2 \mid d(x, p_i) \le d(x, p_j),\ \forall j \neq i \} \]
so every cell is the intersection of half-spaces (for Euclidean metric) or half-planes (for L1/L∞). The cells partition the plane up to a measure-zero boundary set.
Centroidal Voronoi (Lloyd's fixed point) — at a CVT, every seed coincides with its cell's centroid:
\[ p_i = \frac{1}{|V_i|} \int_{V_i} x\, dA \]
Lloyd's algorithm iterates: classify pixels → move each seed to its cell's centroid → repeat. It always decreases the average within-cell second moment, so it converges. The hexagonal lattice is the global minimum for uniform density on a torus — which is why honeycombs are so efficient.
How to use this tool
- Pick a preset or set up the form. The preset chips at the top of the form are one-click starting points — Classic Cells, Honeycomb, City Blocks, Chess King, Golden Spiral, Ripples, Lloyd Relaxed, Wireframe, Stipple Ink, 3 Territories.
- Choose the distance metric. Euclidean for the classic look, Manhattan for blocky cells, Chebyshev for axis-aligned squares, Minkowski p=3 for rounded-square in-between cells.
- Click Generate. The diagram renders with an animated cell-growth reveal so you see how each seed "claims" its territory.
- Edit on the canvas. Click empty space to add a new seed point. Drag any seed dot to move it — the cells follow your finger in real time. Double-click a seed to delete it.
- Polish with Lloyd relaxation. Click the Lloyd relax button (or press R) to nudge every seed toward its cell's centroid. A few passes give you a visually uniform tessellation.
- Switch metric without losing your point set. Use the metric pills above the canvas — the same seeds, different distance rule, dramatically different cells.
- Export. SVG for vector use, PNG for raster sharing, or copy PNG straight to clipboard.
Tips for getting great-looking diagrams
- For visually uniform cells, start with a Random or Uniform layout and apply 3–4 passes of Lloyd relaxation. You will see the cells converge toward a hexagonal pattern with very similar sizes.
- For pop-art posters, use the Cluster layout with the Rainbow palette and turn on cell edges. The three territories produce a striking visual hierarchy with bold color blocks.
- For technical-looking diagrams, use the Wireframe style on a Uniform layout — the clean black lines on white background read like a CAD drawing.
- For organic, hand-drawn patterns, use the Stipple style — the algorithm reads cell edges as dotwork and produces a pen-and-ink look used in scientific illustration.
- For mathematical clarity, switch to Manhattan or Chebyshev with a small point count (8–12 points). The right-angle edges make it easy to trace by hand why each cell has the shape it does.
Frequently asked questions
What is a Voronoi diagram?
A Voronoi diagram partitions a plane into cells based on which of a set of seed points each location is closest to. Every cell consists of all locations nearest to one specific seed. The cell boundaries are equidistant from two or more seeds.
How does this generator compute the diagram?
It uses brute-force per-pixel classification: for each pixel on the canvas it finds the nearest seed point under the chosen distance metric, then paints that pixel with that seed's color. The cost is O(W·H·N) but it is fully robust to degenerate inputs and trivially supports any distance metric.
What are the four distance metrics?
Euclidean is the straight-line distance giving the classic Voronoi look. Manhattan is the axis-aligned city-block distance. Chebyshev is the chess-king distance. Minkowski p=3 is a rounded-square in-between metric. Switching metrics on the same point set produces dramatically different cell shapes.
What is Lloyd relaxation?
Lloyd's algorithm repeatedly moves each seed point to the centroid of its current Voronoi cell. After several iterations the cells become visually uniform and tend toward a hexagonal honeycomb — the structure called a Centroidal Voronoi Tessellation.
Can I edit the points after generating?
Yes. Click anywhere on the canvas to add a new seed point. Drag any seed to move it — the diagram repaints continuously. Double-click a seed to delete it. The Reset button restores the original seed layout.
What is the difference between Voronoi and Delaunay?
They are graph duals. The Delaunay triangulation connects every pair of seeds whose Voronoi cells share an edge. Equivalently, three seeds form a Delaunay triangle if and only if no other seed lies inside the triangle's circumscribed circle.
Can I make the same diagram twice?
Yes. Type any string into the Random Seed field — the same string always reproduces the same initial point set. Combine that with the other form fields to share a permalink to an exact diagram.
What can I do with the exported SVG or PNG?
Free for personal and commercial use — diagrams generated by this tool are not watermarked or licensed. Use them for slides, blog illustrations, lecture notes, T-shirt prints, generative art prompts, or as base maps for further work in Illustrator or Inkscape.
Reference this content, page, or tool as:
"Voronoi Diagram Generator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-05-20