CCVT_BOX
Centroidal Voronoi Tessellation
Constrained to a Box
CCVT_BOX
is a C++ program which
creates a Centroidal Voronoi Tessellation
of points in a 2D box, with points constrained to lie on the boundary
of the region.
This is a fairly simple and limited code, and was designed mainly
for testing and experimentation. Current work is investigating
more interesting regions, including holes, and other ways of
"encouraging" some points to move to the boundary and stay there.
The original version of CCVT_BOX was written by Lili Ju.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
CCVT_BOX is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
CVT,
a C++ library which
can compute CVT's.
CVT,
a dataset directory which
contains files describing a number of CVT's.
CVT_DATASET,
a C++ program which
creates a CVT dataset.
Reference:
-
Franz Aurenhammer,
Voronoi diagrams -
a study of a fundamental geometric data structure,
ACM Computing Surveys,
Volume 23, Number 3, pages 345-405, September 1991.
-
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.
-
Qiang Du, Vance Faber, Max Gunzburger,
Centroidal Voronoi Tessellations: Applications and Algorithms,
SIAM Review, Volume 41, 1999, pages 637-676.
-
Qiang Du, Max Gunzburger, Lili Ju,
Meshfree, Probabilistic Determination of Point Sets and Support
Regions for Meshfree Computing,
Computer Methods in Applied Mechanics in Engineering,
Volume 191, 2002, pages 1349-1366;
-
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:
List of Routines:
-
MAIN is the main program for CCVT_BOX.
-
CH_CAP capitalizes a single character.
-
CH_EQI is true if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
CVT_ENERGY computes the CVT energy of a dataset.
-
CVT_SAMPLE returns sample points.
-
CVT_WRITE writes a CVT dataset to a file.
-
DATA_READ reads generator coordinate data from a file.
-
DIGIT_TO_CH returns the base 10 digit character corresponding to a digit.
-
FIND_CLOSEST finds the nearest R point to each S point.
-
GET_SEED returns a random seed for the random number generator.
-
HALHAM_LEAP_CHECK checks LEAP for a Halton or Hammersley sequence.
-
HALHAM_N_CHECK checks N for a Halton or Hammersley sequence.
-
HALHAM_NDIM_CHECK checks NDIM for a Halton or Hammersley sequence.
-
HALHAM_SEED_CHECK checks SEED for a Halton or Hammersley sequence.
-
HALHAM_STEP_CHECK checks STEP for a Halton or Hammersley sequence.
-
HALTON_BASE_CHECK checks BASE for a Halton sequence.
-
I4_LOG_10 returns the whole part of the logarithm base 10 of an integer.
-
I4_MAX returns the maximum of two integers.
-
I4_MIN returns the smaller of two integers.
-
I4_TO_HALTON_SEQUENCE computes N elements of a leaped Halton subsequence.
-
I4_TO_S converts an integer to a string.
-
MPB projects generators onto the boundary of the region.
-
POINTS_EPS creates an EPS file image of a set of points.
-
PRIME returns any of the first PRIME_MAX prime numbers.
-
R8_EPSILON returns the round off unit for double precision arithmetic.
-
R8_HUGE returns a "huge" real value, usually the largest legal real.
-
R8_MAX returns the maximum of two double precision values.
-
R8_MIN returns the minimum of two double precision values.
-
R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
-
R8MAT_UNIFORM_01 fills a double precision array with pseudorandom values.
-
RANDOM_INITIALIZE initializes the RANDOM random number generator.
-
S_EQI reports whether two strings are equal, ignoring case.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_TO_R8 reads an R8 from a string.
-
S_TO_R8VEC reads an R8VEC from a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING returns the current YMDHMS date as a string.
-
TUPLE_NEXT_FAST computes the next element of a tuple space, "fast".
You can go up one level to
the C++ source codes.
Last revised on 02 December 2006.