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 information on this web page is 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

opengl_test, a C++ code which uses opengl() to display graphic images on the screen;

Source Code:


Last revised on 21 May 2023.