CVT_REFINE is a FORTRAN90 library which attempts to "refine" a centroidal Voronoi tessellation (CVT).
CVT_REFINE considers the following problem. We suppose that we have computed a centroidal Voronoi tessellation associated with N1 cell generators. We now wish to "refine" this tessellation, by increasing the number of generators by N2. The stipulations are that the old generators will be fixed in place, and that the new generators will be placed initially at random in the region, and then allowed to adjust themselves using the usual CVT iteration.
However, without some care, this process will not produce very good results, since the old fixed generators will "block" the motion of the new generators seeking areas of "lower pressure". To enable the system to reach a lower energy equilibrium, we use a weight vector to initially reduce the influence of the old generators, and then to gradually "turn them on" until they are equal in influence to the new generators (though still constrained not to move).
The code includes the weight vector that was developed in the CVT_SIZE program and the idea of fixing points that was developed in the CVT_FIXED program.
A new idea was to include a maximum influence distance cvt_cutoff. The idea was that spatial points that were further than this cutoff distance to a generator were not assigned any generator at all. This was another mechanism that would allow us to control the sizes of the Voronoi cells, and allow new generators to move more freely around old, fixed generators.
Just to check out the use of the cutoff value, we set 10 points going with a fixed cutoff value. Click HERE to see the CVT_CUTOFF movie.
For our second movie, we follow 10 generators for 100 iterations, then fix them in place. Our goal is to refine the current placement of points by adding some new points and driving them to a CVT equilibrium. We add 10 new generators. By a programming mistake, these points all started out at (0,0), but that just makes the point more dramatically. We make room for the new points to move about by using weights. These start out giving the new points an advantage, but at certain time steps we cut this back until at the end we are back to an unweighted scheme. Click HERE to see the CVT_10PLUS10 movie.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CVT_REFINE is available in a FORTRAN90 version.
PBMLIB, a FORTRAN90 library which supplies some routines to create crisp and relatively small binary PPM images of the CVT regions.
You can go up one level to the FORTRAN90 source codes.