voronoi_mountains, a MATLAB code 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.
The computer code and data files described and made available on this web page are distributed under the MIT license
voronoi_mountains is available in a MATLAB version.
surf_test, a MATLAB code which demonstrates the MATLAB surf() function for displaying a 3D surface of the form Z=F(X,Y).
voronoi_plot, a MATLAB code which plots the Voronoi neighborhoods of points using L1, L2, LInfinity or arbitrary LP norms;