011. The Delaunay Triangulation
EXECUTIVE_SUMMARY // AEO_OPTIMIZED
[Answer Engine Overview: What, Why & How]
If you have a cloud of points, Delaunay draws lines between them to form triangles. But it doesn't just draw *any* triangles. It is mathematically optimized to avoid 'skinny' triangles, trying to keep them as equilateral as possible. This is why every 3D model in a video game (which is just a wireframe of triangles) uses variations of Delaunay to render smoothly.
022. The Voronoi Diagram
Imagine throwing 10 stones into a pond simultaneously. The points where the expanding ripples collide form straight lines. That is a Voronoi diagram. It takes a set of points (seeds) and divides the surrounding space into geometric regions. Any location inside a seed's region is guaranteed to be closer to that seed than to any other.
033. The Mathematical Duality
These two concepts are intrinsically linked. If you take a Voronoi Diagram and draw a line between the 'seeds' that share a borderline, you perfectly recreate the Delaunay Triangulation. SciPy calculates both using the same underlying 'Qhull' C-library, making them incredibly fast even for thousands of points.
?Frequently Asked Questions
How do I actually visualize these shapes?
SciPy spatial objects have built-in plotting hooks, but you must use the Matplotlib library to draw them. `scipy.spatial.voronoi_plot_2d()` handles the drawing automatically once Matplotlib is imported.
What does 'simplices' mean when I print a Delaunay object?
A 'simplex' is the simplest possible shape in a given dimension. In 1D, it's a line. In 2D, it's a triangle. In 3D, it's a tetrahedron. Printing `simplices` just lists the points that make up those shapes.
