CVT_MOVIE2
Animated CVT Algorithm
CVT_MOVIE2 is a MATLAB program which animates
the generation of a Centroidal Voronoi Tessellation (CVT) dataset.
The program proceeds to create a series of
PNG files, each
containing one frame of the animation. It is possible to
create an animation by using software such as Apple QuickTime.
Usage:
cvt_movie2 ( n, sample_num, frame_num, rebirths )
-
N
-
the number of points to generate;
the default is N = 100.
-
SAMPLE_NUM
-
the number of sampling points:
the default is SAMPLE_NUM = 100,000.
-
FRAME_NUM
-
the number of frames to create.
the default is FRAME_NUM = 30.
-
REBIRTHS
-
set NONZERO if the program is to randomly
"kill" one generator on each step and create a new one.
the default is REBIRTHS = 1.
Animation:
You can
see an MP4 animation (no "rebirths").
You can
see an MOV animation (with "rebirths").
Related Data and Programs:
The MP4 format
was used for the animation.
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,
../../pdf/aurenhammer.pdf
-
Qiang Du, Vance Faber and Max Gunzburger,
Centroidal Voronoi Tessellations: Applications and Algorithms,
SIAM Review, Volume 41, 1999, pages 637-676.
Source Code:
-
ch_is_digit.m
is TRUE if a character represents a digit.
-
cvt_movie2.m
the main program for the creation of the movie.
-
digit_inc.m
increments a character that represents a digit.
-
file_name_inc.m
"increments" a file name that has numeric characters in it.
-
s_len_trim.m
returns the length of a string to the last nonblank.
-
timestamp.m
prints the current YMDHMS date as a timestamp.
-
voronoi_new.m
an improved version of the voronoi command, draws
a Voronoi diagram of a given set of points.
Examples and Tests:
Here are the sequence of 100 PNG files created by a run of the program.
Here we forced all the points to start initially in a small area
near (0.25,0.50). Notice how the pattern first expands slowly, then
adjusts to the constant random "rebirth" of one point every step.
You can go up one level to
the MATLAB source codes.
Last revised on 23 October 2007.