๐ธ๏ธ Voronoi Algorithm Visualizer is the complete English-language guide to a modern visualizer that animates Voronoi diagrams step by step. Learn how Fortune's sweepline works, how to build Delaunay triangulation, how to compute Voronoi cells from half-plane intersections, and how to visualize the whole process in the browser. Built for algorithms students, graphics developers, and curious coders. Completely free. No signup. No paywall. No hidden chapters.
Before writing another brute-force loop, check whether your project suffers from any of these classic symptoms. Each one points to a specific fix this guide teaches.
| Symptom | What It Really Means | Fix This Guide Teaches |
|---|---|---|
| ๐ Slow for 1000 sites | O(nยฒ) brute force | Fortune's sweepline O(n log n) |
| ๐ Wrong cell shapes | Missing beach line | Sweep event handling |
| ๐ง Visible gaps between cells | Bad half-plane math | Correct bisectors |
| ๐ฅ Crashes on collinear points | Degenerate cases | Robust predicates |
| ๐ Cells flicker on drag | Rebuild every frame | Incremental update |
| ๐ณ๏ธ Missing cells at edges | No bounding box | Clip to viewport |
๐ก Tip: If your diagram lags around 200โ300 points, you're using brute force โ switch to Fortune's sweepline.
This is the smallest visualizer that draws Voronoi cells for a handful of sites.
Step 1 โ Open a browser. Any modern browser with Canvas support.
Step 2 โ Place 5 points. Click on the canvas to add sites.
Step 3 โ Brute-force cells. For each pixel, find the nearest site and color it.
Step 4 โ See the diagram. With 5 sites, brute force is instant โ perfect for a first look.
Step 5 โ Scale up. Add 200 sites and watch the same code slow down โ that's your motivation for Fortune's algorithm.
๐ก Tip: Brute force is fine for a demo. Fortune's algorithm is what you need in production.
| Layer | What You Control | Common Trap |
|---|---|---|
| Sites | Point set | Duplicates |
| Bisectors | Perpendicular lines | Numerical error |
| Cells | Half-plane intersection | Wrong winding |
| Edges | Shared boundaries | Missing clip |
| Sweep | Fortune's event queue | Order bugs |
| Delaunay | Dual graph | Not maintained |
| Feature | Description | Status |
|---|---|---|
| ๐ธ๏ธ Brute Force | Baseline demo | โ Active |
| โก Fortune Sweepline | O(n log n) | โ Active |
| ๐บ Delaunay Dual | Triangulation | โ Active |
| ๐ฌ Step Animator | Sweep line visible | โ Active |
| ๐งฎ Robust Predicates | Degenerate cases | โ Active |
| ๐จ Canvas + WebGL | Fast rendering | โ Active |
|
|
|
|
| Layer | Choose From | Best For |
|---|---|---|
| Baseline | Brute force | Few sites |
| Production | Fortune | Many sites |
| Dual | Delaunay | Graphics |
| Render | Canvas 2D | Simple |
| Render | WebGL | Fast |
| Predicates | Robust math | Correctness |
| Feature | Then | Now |
|---|---|---|
| Speed | O(nยฒ) | โ O(n log n) |
| Accuracy | Glitches | โ Robust |
| Visual | Static | โ Animated |
| Scale | 100 sites | โ 10000+ |
| Dual | None | โ Delaunay |
| Cost | Paid course | โ Free guide |
| Platform | Status | Notes |
|---|---|---|
| Chrome / Edge | โ Supported | Best |
| Firefox | โ Supported | Native |
| Safari | โ Supported | Canvas |
| Windows | โ Supported | Browser |
| macOS | โ Supported | Native |
| Linux | โ Supported | Native |
| Component | Baseline | Sweet Spot |
|---|---|---|
| OS | Any modern OS | Latest |
| CPU | Dual-core 1.8 GHz | Quad-core 3.0 GHz+ |
| RAM | 4 GB | 16 GB |
| Storage | 50 MB | 200 MB |
| Browser | Chrome 90+ | Latest |
| Sites | 100 | 10 000+ |
Skim the mental model.
Write the O(nยฒ) demo.
Implement Fortune's algorithm.
Build Delaunay triangles.
Show the sweep line.
Add WebGL rendering.
| Time | Task | Why |
|---|---|---|
| Morning | Test small site sets | Catch bugs |
| Midday | Step through sweepline | Understand flow |
| Afternoon | Profile big inputs | Perf |
| Evening | Add visual polish | Presentation |
| Weekly | Compare with known libs | Validate |
- Open the visualizer
- Add 5 sites
- See brute-force cells
- Switch to Fortune
- Animate the sweep
- Scale to 10 000
- โ Start with brute force to learn
- โ Use robust predicates
- โ Clip to bounding box
- โ Animate the sweep for teaching
- โ Test degenerate cases
| Problem | Fix |
|---|---|
| Cells wrong | Check bisector math |
| Crash on collinear | Add robust predicates |
| Slow for many sites | Use Fortune |
| Cells drift | Clip to bbox |
| Sweep stuck | Check event queue |
| Delaunay missing | Maintain dual graph |
Is this guide free?
Yes โ completely free to read.Does it cover Fortune's algorithm?
Yes โ full section.Is Delaunay included?
Yes โ dual graph.Does it animate the sweep?
Yes โ step animator.Is it beginner-friendly?
Yes โ starts from brute force.Does it use WebGL?
Yes โ for large inputs.Does it handle degenerate cases?
Yes โ robust predicates.Can I use it in a classroom?
Yes โ great for teaching.| โ Allowed | โ Forbidden |
|---|---|
| Personal use | Selling the guide |
| Classroom use | Redistributing as paid |
| Commercial use | Removing author credits |
| Educational use | Bundling with malware |
Voronoi Algorithm Visualizer turns a dense algorithm into a clear, animated picture:
- โ Brute force
- โ Fortune sweepline
- โ Delaunay dual
- โ Robust predicates
- โ WebGL rendering
- โ Completely free
See the sweep, learn the algorithm โ open the guide today.
- Voronoi Algorithm Visualizer
- Fortune's Sweepline
- Delaunay Triangulation
- Voronoi Diagram Tutorial
- Computational Geometry
- Voronoi 2026 Guide
- Sweepline Animation
- Half-Plane Intersection
- Robust Predicates
- WebGL Rendering
- How to build a Voronoi diagram
- Fortune's algorithm step-by-step
- Delaunay triangulation from Voronoi
- Animate sweepline algorithm
- Robust predicates for computational geometry
- Fast Voronoi for thousands of points
Voronoi, Algorithm, Geometry, Delaunay, Sweepline, Free Guide, 2026
Voronoi Algorithm Visualizer โ free guide to Fortune's sweepline, Delaunay triangulation, animation, and WebGL. Open the guide now!
