# VORONOI_MOUNTAINS 3D Voronoi Diagram

VORONOI_MOUNTAINS is a MATLAB program which makes a 3D surface plot of a Voronoi diagram.

The Voronoi diagram divides up points in the plane by associating each point with the closest of a set of generator points. This process partitions the plane into polygonal regions. If we then associate with each point (X,Y) the distance Z(X,Y) to the nearest generator, then the corresponding surface is made by patching together parts of cones.

If we flip this surface over, the generators become the "peaks" of a chain of mountains; the lines of the Voronoi diagram become the bottoms of valleys, which are straight in the XY plane, although their height varies parabolically.

Using MATLAB's 3D plotting features, including the 3D rotation and zoom, it is possible to examine such a plot and gain a better understanding of some of the features of a Voronoi diagram.

### Languages:

VORONOI_MOUNTAINS is available in a MATLAB version.

### Related Data and Programs:

MATLAB_SURF, a MATLAB library which demonstrates the MATLAB surf() function for displaying a 3D surface of the form Z=F(X,Y).

VORONOI_CITY, a MATLAB program which displays the steps involved in computing the Voronoi diagram of 3 points, which we think of as cities connected by roads.

VORONOI_PLOT, a MATLAB program which plots the Voronoi neighborhoods of points using L1, L2, LInfinity or arbitrary LP norms;

### Reference:

1. Franz Aurenhammer,
Voronoi diagrams - a study of a fundamental geometric data structure,
ACM Computing Surveys,
Volume 23, Number 3, pages 345-405, September 1991.

### Examples and Tests:

• voronoi_mountains_test.m, code that calls voronoi_mountains with the diamond points or a random set of points;
• diamond.txt, a set of 9 points with a simple Voronoi diagram.
• diamond_diagram.png, the flat Voronoi diagram of the set of points.
• diamond_mountains.png, a still overhead image of the 3D mountain plot for the diamond points. The "cool" colormap is used.
• random_mountains.png, a still side image of the 3D mountain plot for 10 random points. The "prism" colormap is used.

You can go up one level to the MATLAB source codes.

Last revised on 03 March 2011.