CVT_DATASET
Generate CVT Datasets


CVT_DATASET is a MATLAB program which creates a CVT dataset and writes it to a file.

The program is interactive, and allows the user to choose the parameters that define the dataset.

Normally, data is computed in the unit hypercube, with uniform density. However, if you wish to work in a more interesting geometry, or to control the density function, it is necessary to modify the USER() routine in the CVT library, and then direct CVT_DATASET to use that routine for initialization and sampling.

The data that the user may set includes:

A "CVT" is a Centroidal Voronoi Tessellation. Essentially, a CVT is a set of sample points in a (finite) region with the property that each point is the centroid of its Voronoi subregion. A "random" set of sample points will not have this property. However, it is possible to begin with a random set of sample points, and drive it towards a CVT set, by applying an iterative refinement process.

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 subregions. 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.

A reasonable set of input data might be:

        2             spatial dimension is 2
        10            compute 10 points
        123456789     seed for random numbers
        'uniform'     initialize by UNIFORM
        40            40 iterations
        0.0           zero tolerance; won't stop early
        'uniform'     sample using UNIFORM
        10000         use 10,000 sample points on each iteration
        1000          create 1,000 sample points at a time
        -1            stop; don't want to define another set.
      

Once these parameters are set, the program generates the data and writes it to a file. The user may then specify another set of input data, or terminate the program.

Licensing:

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

Languages

CVT_DATASET is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

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 MATLAB library which can compute a CVT.

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_DEMO, a MATLAB program which is an interactive graphic demonstration of a CVT calculation.

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_DATASET, a MATLAB program which creates a grid sequence and writes it to a file.

LATIN_CENTER_DATASET, a MATLAB program which creates a Latin Center Hypercube dataset;

LATIN_EDGE_DATASET, a MATLAB program which creates a Latin Edge Hypercube dataset;

LATIN_RANDOM_DATASET, a MATLAB program which creates a Latin Random Hypercube dataset;

NIEDERREITER2_DATASET, a MATLAB program which creates a Niederreiter quasirandom dataset with base 2;

NORMAL_DATASET, a MATLAB program which generates a dataset of multivariate normal pseudorandom values and writes them to a file.

SOBOL_DATASET, a MATLAB program which computes a Sobol quasirandom sequence and writes it to a file.

UNIFORM_DATASET, a MATLAB program which generates a dataset of uniform pseudorandom values and writes them to a file.

VAN_DER_CORPUT_DATASET, a MATLAB program which creates a van der Corput quasirandom sequence and writes it to a file.

Reference:

  1. Franz Aurenhammer,
    Voronoi diagrams - a study of a fundamental geometric data structure,
    ACM Computing Surveys,
    Volume 23, Number 3, pages 345-405, September 1991.
  2. John Burkardt, Max Gunzburger, Janet Peterson, Rebecca Brannon,
    User Manual and Supporting Information for Library of Codes for Centroidal Voronoi Placement and Associated Zeroth, First, and Second Moment Determination,
    Sandia National Laboratories Technical Report SAND2002-0099,
    February 2002.
  3. Qiang Du, Vance Faber, Max Gunzburger,
    Centroidal Voronoi Tessellations: Applications and Algorithms,
    SIAM Review,
    Volume 41, 1999, pages 637-676.
  4. Lili Ju, Qiang Du, Max Gunzburger,
    Probabilistic methods for centroidal Voronoi tessellations and their parallel implementations,
    Parallel Computing,
    Volume 28, 2002, pages 1477-1500.

Source Code:

Examples and Tests:

Test 1 computes 85 CVT points in 2 dimensions, using uniform initialization, a seed of 123456789, 40 iterations, a zero tolerance, uniform sampling, 10,000 sample points in batches of 1000:

Test 2 repeats test 1, but with 80 iterations:

Test 3 repeats test 1, but with 1,000,000 sample points:

Test 4 repeats test 1, but with Halton sampling:

Test 5 repeats test 1, but with Grid sampling:

Test 6 repeats test 1, but with Random sampling:

Test 7 repeats test 1, but with a seed of 987654321:

Test 8 repeats test 1, but with a batch size of 5:

Test 9 computes 100 CVT points in 3 dimensions, using uniform initialization, a seed of 123456789, 40 iterations, a tolerance of 0.000001, uniform sampling, 10,000 sample points in batches of 1000:

Test 10 investigates the unstable CVT formed by a Cartesian grid of 100 points in 2D. Starting from this unstable solution, the iteration proceeds towards a more "hexagonal" pattern :

Test 11 shows how the user may specify the initial point locations in a file. 15 points are specified in 2D:

Test 12:

Test 13:

Test 14 shows how the user may refer to the USER routine for a different geometry. The default USER routine is set up to sample the unit circle in 2D. 100 points are requested:

You can go up one level to the MATLAB source codes.


Last revised on 17 September 2005.