cvt_1d_sampling, an Octave code which allows the user to carry out Lloyd's algorithm for a centroidal Voronoi Tessellation (CVT) in the interval [0,1].
The determination of the Voronoi regions is carried out using sampling. This means that the convergence of the iteration is influenced by the accuracy of the estimates provided by sampling.
For n generators, the solution is known in advance:
x(i) = ( 2 * i - 1 ) / ( 2 * n )Lloyd's algorithm starts from an arbitrary vector x, however, so it is interesting to see how the approximate solution evolves toward the correct answer.
cvt_1d_sampling ( n, it_num, sample_num )where
The computer code and data files described and made available on this web page are distributed under the MIT license
cvt_1d_sampling is available in a MATLAB version and an Octave version and a Python version.
ccvt_reflect, an Octave code which tries to construct a modified CVT in which some points are forced to lie on the boundary, using a reflection idea.
cvt, an Octave code which computes cvt's.
cvt, a dataset directory which contains a variety of examples of cvt datasets.
cvt_1d_lloyd, an Octave code which computes an n-point centroidal voronoi tessellation (cvt) within the interval [0,1], under a uniform density, using exact techniques to determine the voronoi regions.
cvt_1d_nonuniform, an Octave code which computes an n-point centroidal voronoi tessellation in 1 dimension, under a nonuniform density, and plots the evolution of the locations of the generators during the iteration;
cvt_2d_nonuniform, an Octave code 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_3d_nonuniform, an Octave code which computes an n-point centroidal voronoi tessellation (cvt) within the unit cube [0,1]x[0,1]x[0,1], under a uniform density, using sampling to estimate the voronoi regions.
cvt_circle_uniform, an Octave code which calculates a centroidal voronoi tessellation (cvt) over a circle with uniform density.
cvtm_1d, an Octave code which estimates a mirror-periodic centroidal voronoi tessellation (cvtm) in the periodic interval [0,1], using a version of lloyd's iteration.
cvtp_1d, an Octave code which estimates a periodic centroidal voronoi tessellation (cvtp) in the periodic interval [0,1], using a version of lloyd's iteration.
florida_cvt_geo, an Octave code which explores the creation of a centroidal voronoi tessellation (cvt) of the state of florida, based solely on geometric considerations.