CVT is a MATLAB library which creates Centroidal Voronoi Tessellation (CVT) datasets.
The generation of a CVT dataset is of necessity more complicated than for a quasirandom sequence. An iteration is involved, so there must be an initial assignment for the generators, and then a number of iterations. Moreover, in each iteration, estimates must be made of the volume and location of the Voronoi cells. This is typically done by Monte Carlo sampling. The accuracy of the resulting CVT depends in part on the number of sampling points and the number of iterations taken.
The library is mostly used to generate a dataset of points uniformly distributed in the unit hypersquare. However, a user may be interested in computations with other geometries or point densities. To do this, the user needs to replace the USER() routine in the CVT library, and then specify the appropriate values init=3 and sample=3.
The USER routine returns a set of sample points from the region of interest. The default USER routine samples points uniformly from the unit circle. But other geometries are easy to set up. Changing the point density simply requires weighting the sampling in the region.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CVT is available in a C++ version and a FORTRAN90 version and a MATLAB version.
CCVT_BOX, a MATLAB program which constructs a modified CVT in which some points are forced to lie on the boundary.
CCVT_REFLECT, a MATLAB program which tries to construct a modified CVT in which some points are forced to lie on the boundary, using a reflection idea.
CVT, a dataset directory which contains a variety of examples of CVT datasets.
CVT_1D_LLOYD, a MATLAB program which computes an N-point Centroidal Voronoi Tessellation (CVT) within the interval [0,1], under a uniform density.
CVT_1D_NONUNIFORM, a MATLAB program which constructs a CVT in one dimension, under a nonuniform density function.
CVT_1D_SAMPLING, a MATLAB program which computes an N-point Centroidal Voronoi Tessellation (CVT) within the interval [0,1], under a uniform density, using sampling to estimate the Voronoi regions.
CVT_2D_SAMPLING, a MATLAB program which computes an N-point Centroidal Voronoi Tessellation (CVT) within the unit square [0,1]x[0,1], under a uniform density, using sampling to estimate the Voronoi regions.
CVT_CIRCLE_UNIFORM, a MATLAB program which calculates a Centroidal Voronoi Tessellation (CVT) over a circle with uniform density.
CVT_DATASET, a MATLAB program which creates a CVT dataset.
CVT_DEMO, a MATLAB program which demonstrates a CVT calculation.
CVT_SQUARE_NONUNIFORM, a MATLAB program which iteratively calculates a Centroidal Voronoi Tessellation (CVT) over a square, with a nonuniform density.
CVTM_1D, a MATLAB program which estimates a mirror-periodic centroidal Voronoi Tessellation (CVTM) in the periodic interval [0,1], using a version of Lloyd's iteration.
CVTP_1D, a MATLAB program which estimates a periodic centroidal Voronoi Tessellation (CVTP) in the periodic interval [0,1], using a version of Lloyd's iteration.
FLORIDA_CVT_GEO, MATLAB programs which explore the creation of a centroidal Voronoi Tessellation (CVT) of the state of Florida, based solely on geometric considerations.
GRID, a MATLAB library which computes elements of a grid dataset.
HALTON, a MATLAB library which computes elements of a Halton quasirandom sequence.
HAMMERSLEY, a MATLAB library which computes elements of a Hammersley quasirandom sequence.
HEX_GRID, a MATLAB library which computes elements of a hexagonal grid dataset.
IHS, a MATLAB library which computes elements of an improved distributed Latin hypercube dataset.
LATIN_CENTER, a MATLAB library which computes elements of a Latin Hypercube dataset, choosing center points.
LATIN_EDGE, a MATLAB library which computes elements of a Latin Hypercube dataset, choosing edge points.
LATIN_RANDOM, a MATLAB library which computes elements of a Latin Hypercube dataset, choosing points at random.
LCVT, a MATLAB library which computes a latinized Centroidal Voronoi Tessellation.
NEAREST_NEIGHBOR, a MATLAB library which works in a given M-dimensional space, seeking, for each point in a set S, the nearest point in a set R, by Richard Brown.
NIEDERREITER2, a MATLAB library which computes elements of a Niederreiter quasirandom sequence with base 2.
SOBOL, a MATLAB library which computes elements of a Sobol quasirandom sequence.
TEST_NEAREST, a MATLAB program which tests the time complexity of various procedures for solving the nearest neighbor problem.
UNIFORM, a MATLAB library which computes elements of a uniform pseudorandom sequence.
VAN_DER_CORPUT, a MATLAB library which computes elements of a van der Corput quasirandom sequence.
You can go up one level to the MATLAB source codes.