CVT_MOVIE4
Animated CVT Algorithm
CVT_MOVIE4 is a MATLAB program which animates
the generation of a Centroidal Voronoi Tessellation (CVT) dataset.
The action takes place in a square; however, a nonuniform density
function is applied, which effectively increases the "weight" of
regions in the corners; for this iterative algorithm, the effect
of the density function is that many more sample points will come
from the corners than from the center. The CVT cells will
correspondingly tend to migrate away from the center.
The data that the user may set includes:
-
N, the number of points to generate, (100 to 300 is
reasonable)
-
SAMPLE_NUM, the number of sampling points (10,000 to
100,000 might be reasonable):
-
FRAME_NUM, the number of frames to create (5 or 10
might be reasonable to start with, 100 is usually plenty).
The program proceeds to create a series of
JPG files, each
containing one frame of the animation. It is possible to
create an animation by using software such as Apple QuickTime.
Animations:
One version of a sample animation file is stored in the
MPEG-4 format.
You can
see the MP4 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_movie4.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.
You can go up one level to
the MATLAB source codes.
Last revised on 31 August 2005.