sphere_voronoi_display_opengl


sphere_voronoi_display_opengl, a C++ code which picks random points on a sphere as generators, and then gradually colors in neighboring points according to the color of the nearest generator. This, in effect, constructs a Voronoi diagram, or at least, suggests it. The exact calculation of the boundary lines and vertices requires a more precise computation.

The user is allowed to request the number of generators, and OpenGL is used to display the results. Initially, the sphere is rotating, but at least on my machine, once I try to display the neighbors, the rotation becomes very slow.

Usage:

sphere_voronoi_display_opengl gen_num
where The first 5 or 6 mouse clicks rotate and pause the image of the generators. The next 20 mouse clicks pause the sphere, add 1/10 of the sample points and resume rotation.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

sphere_voronoi_display_opengl is available in a C++ version.

Related Data and Programs:

sphere_voronoi_display_opengl_test

FERN_OPENGL, a C++ code which uses OpenGL to display the Barnsley fractal fern.

opengl_test, C++ codes which illustrate the use of the OpenGL graphics library;

ROTATING_CUBE_DISPLAY_OPENGL, a C++ code which displays a rotating color cube in 3D, using OpenGL;

SCREENSHOT_OPENGL, a C++ code which shows how a program using the OpenGL graphics library can save a screenshot of the graphics being displayed.

SPHERE_CVT, a FORTRAN90 library which creates a mesh of well-separated points on a unit sphere using Centroidal Voronoi Tessellations.

SPHERE_CVT, a MATLAB library which creates a mesh of well-separated 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_DESIGN_RULE, a FORTRAN90 library which returns point sets on the surface of the unit sphere, known as "designs", which can be useful for estimating integrals on the surface, among other uses.

SPHERE_VORONOI, a MATLAB program which computes the Voronoi diagram of points on a sphere.

SPHERE_XYZ_DISPLAY_OPENGL, a C++ code which reads XYZ information defining points in 3D, and displays a unit sphere and the points, using OpenGL.

STRIPACK_VORONOI, a FORTRAN90 program which reads an XYZ file of 3D points on the unit sphere, computes the Voronoi diagram, and writes it to a file.

SXYZ_VORONOI, a FORTRAN90 library which reads an XYZ file of 3D points on the sphere, and computes and plots Delaunay triangulations and Voronoi diagrams.

XYZ_DISPLAY_OPENGL, a C++ code which reads XYZ information defining points in 3D, and displays an image using OpenGL.

Source Code:


Last revised on 21 May 2023.