CVT_DEMO
Interactive Graphic CVT Demonstrations


CVT_DEMO is a directory of MATLAB programs which use interaction and graphics to demonstrate properties of the CVT (Centroidal Voronoi Tessellation) calculation.

As you watch the CVT develop, for instance, you will be able to guess something about the angle of intersection between the boundaries of the region, and the edges of Voronoi regions.

Licensing:

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

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_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 library which allows the user to watch the evolution of a CVT computed over a 1D interval with a nonuniform density.

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_DATASET, a MATLAB program which creates a CVT dataset.

DISCRETE_PDF_SAMPLE, a MATLAB program which demonstrates how to construct a Probability Density Function (PDF) from a table of sample data, and then to use that PDF to create new samples.

LCVT, a MATLAB library which computes a "Latinized" Centroidal Voronoi Tessellation.

TEST_TRIANGULATION, a MATLAB library which defines the geometry of a number of sample regions.

VORONOI_PLOT, a MATLAB program which plots the Voronoi neighborhoods of points using L1, L2, LInfinity or arbitrary LP norms;

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, Number 4, December 1999, pages 637-676.


CVT_CIRCLE_NONUNIFORM

CVT_CIRCLE_NONUNIFORM is a MATLAB function for computing a CVT in a circle with a nonuniform density. The spatial region is the unit circle, but a nonuniform density is applied to that region. The density is implicitly defined by the sampling routine, which returns many more points near the circumference than near the center of the circle. The result is that, during the CVT iteration, the generators arrange themselves more densely towards the outer part of the circle.

[ p, t ] = cvt_circle_nonuniform ( n, sample_num, delaunay_display )

Source Code:


CVT_ELLIPSE_UNIFORM

CVT_ELLIPSE_UNIFORM is a MATLAB function which works the same as the code for the square, except that we are now working in a more interesting region, namely, the ellipse defined by x'*A*x<=36 with A = [ 9, 6; 6, 20 ]; The only tricky thing we have to do is write a routine that returns sample points from the region. The calling sequence is:

[ p, t ] = cvt_ellipse_uniform ( n, sample_num, delaunay_display )

Source Code:


CVT_SQUARE_UNIFORM

CVT_SQUARE_UNIFORM is a MATLAB function which works in a square with a uniform density. The function starts from a random initial configuration. Another step of the CVT iteration is carried out each time the user hits RETURN. The MATLAB routines trimesh and voronoi are used to simultaneously display the Voronoi diagram and Delaunay triangulation associated with the generators. Moreover, the nearest-neighbor search and centroid computation are carried out efficiently using MATLAB's Delaunay search and rapid array accumulation. The calling sequence is:

[ p, t ] = cvt_square_uniform ( n, sample_num, delaunay_display )

Source Code:


CVT_SQUARE_PDF_DISCRETE

CVT_SQUARE_PDF_DISCRETE is a MATLAB function which works the same as the code for the uniform square, except that we are now working with a density function defined by discrete data. In this case, the density is defined by a 20 x 20 grid of sample density values. The calling sequence is:

[ p, t ] = cvt_square_pdf_discrete ( n, sample_num, delaunay_display )

Source Code:


CVT_TRIANGLE_UNIFORM

CVT_TRIANGLE_UNIFORM is a MATLAB function which generates a CVT in a triangle with a uniform density. The calling sequence is:

[ p, t ] = cvt_triangle_uniform ( n, sample_num, delaunay_display )

Source Code:

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


Last revised on 16 July 2009.