SPHERE_VORONOI
Voronoi Diagram of Points on the Unit Sphere
SPHERE_VORONOI,
a MATLAB library which
computes the Voronoi diagram of points on the unit sphere.
According to Steven Fortune, it is possible to compute the Delaunay triangulation
of points on a sphere by computing their convex hull. If the sphere is the unit
sphere at the origin, the facet normals are the Voronoi vertices.
SPHERE_VORONOI uses this approach, by calling MATLAB's convhulln
function to generate the convex hull. The information defining the convex hull
is actually the Delaunay triangulation of the points. From here, it is possible
to compute the Voronoi vertices, and to determine how these vertices are
joined to form the Voronoi polygons.
The code, as presented here, is quite preliminary. In particular, the process
of converting the Delaunay information into information about the Voronoi polygons
is inefficient. I suspect, though, that I can compute the centroids almost
immediately, without having to go through the tedious process of determining
the ordering of the Voronoi vertices that constitute each Voronoi polygon.
If I can clear that up, then it should be possible to apply this simple algorithm
to systems with hundreds of points.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
SPHERE_VORONOI is available in
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
GEOMETRY,
a MATLAB library which
computes various geometric quantities, including grids on spheres.
SPHERE_CVT,
a MATLAB library which
creates a mesh of wellseparated points on a unit sphere by applying the
Centroidal Voronoi Tessellation (CVT) iteration.
SPHERE_DELAUNAY,
a MATLAB program which
computes the Delaunay triangulation of points on a sphere.
SPHERE_GRID,
a MATLAB library which
provides a number of ways of generating grids of points, or of
points and lines, or of points and lines and faces, over the unit sphere.
SPHERE_QUAD,
a MATLAB library which
approximates an integral over the surface of the unit sphere
by applying a triangulation to the surface;
sphere_voronoi_test
SPHERE_VORONOI_DISPLAY_OPENGL,
a C++ program which
displays a sphere and randomly selected generator points, and then
gradually colors in points in the sphere that are closest to each generator.
VORONOI_PLOT,
a MATLAB program which
plots the Voronoi neighborhoods of points using L1, L2, LInfinity
or arbitrary LP norms;
Reference:

Jacob Goodman, Joseph ORourke, editors,
Handbook of Discrete and Computational Geometry,
Second Edition,
CRC/Chapman and Hall, 2004,
ISBN: 1584883014,
LC: QA167.H36.

Robert Renka,
Algorithm 772:
STRIPACK:
Delaunay Triangulation and Voronoi Diagram on the Surface
of a Sphere,
ACM Transactions on Mathematical Software,
Volume 23, Number 3, September 1997, pages 416434.
Source Code:

arc_cosine.m,
computes the inverse cosine function;

i4col_compare.m,
compares two columns of an I4COL;

i4col_sort_a.m,
ascending sorts the columns of an I4COL;

i4col_swap.m,
swaps two columns of an I4COL;

i4list_print.m,
prints an I4LIST;

i4mat_transpose_print.m,
prints an I4MAT, transposed;

i4mat_transpose_print_some.m,
prints some of an I4MAT, transposed;

i4vec_print.m,
prints an I4VEC.

r8mat_transpose_print.m,
prints the transpose of an R8MAT;

r8mat_transpose_print_some.m,
prints some of the transpose of an R8MAT;

r8vec_normal_01.m,
returns unit pseudonormal R8VEC.

r8vec_print.m,
prints an R8VEC.

r8vec_uniform_01.m,
returns a unit pseudorandom R8VEC.

sort_heap_external.m,
external sorts a list of values into ascending order;

sphere_delaunay.m,
returns the Delaunay triangulation of points on the unit sphere.

stri_angles_to_area.m,
computes the area of a spherical triangle;

stri_sides_to_angles.m,
computes the angles of a spherical triangle from its sides;

stri_vertices_to_area.m,
computes the area of a spherical triangle from its vertices;

stri_vertices_to_centroid.m,
computes the centroid of a spherical triangle from its vertices;

stri_vertices_to_orientation.m,
attempts to define an orientation for a spherical triangle from its vertices;

stri_vertices_to_sides.m,
computes the sides of a spherical triangle from its sides;

timestamp.m,
prints the current YMDHMS date as a timestamp;

triangulation_neighhbor_triangles.m,
determines triangle neighbors in a triangulation;

uniform_on_sphere01_map.m,
returns uniform random points on the unit sphere.

voronoi_areas.m,
determines the area of each Voronoi polygon, given the
Delaunay triangulation of points on the unit sphere and
the location of the Voronoi vertices and
the explicit description of the Voronoi polygons.

voronoi_areas_direct.m,
determines the area of each Voronoi polygon, given the
Delaunay triangulation of points on the unit sphere and
the location of the Voronoi vertices.

voronoi_centroids.m,
computes the centroids of each polygon in a Voronoi diagram.

voronoi_data.m,
computes Voronoi areas and centroids directly.

voronoi_order.m,
determines the order of each Voronoi polygon, given the
Delaunay triangulation of points on the unit sphere.

voronoi_polygons.m,
determines the Voronoi polygons, given the
Delaunay triangulation of points on the unit sphere.

voronoi_vertices.m,
determines the location of Voronoi vertices, given the
Delaunay triangulation of points on the unit sphere.
Last revised on 27 March 2019.