24-Jun-2024 14:30:55 ccvt_reflect_test(): MATLAB/Octave version 6.4.0. Test ccvt_reflect(). ccvt_reflect(): MATLAB/Octave version 6.4.0 Generate and animate a CVT dataset. This program is meant to be used interactively. It is also possible to prepare a simple input file beforehand and use it in batch mode. The program requests input values from the user: * NDIM, the spatial dimension, * N, the number of points to generate, * INIT_STRING, initialize the points: ** file, read data from a file; ** 'GRID', by picking points from a grid; ** 'RAND', using MATLAB's RAND function; ** 'UNIFORM', using a simple uniform RNG; * IT_MAX, the maximum number of iterations. * IT_FIXED, the number of iterative steps to take using a fixed set of sampling points. * SAMPLE_STRING, how to conduct the sampling. ** 'GRID', by picking points from a grid; ** 'RAND', using MATLAB's RAND function; ** 'UNIFORM', using a simple uniform RNG; * SAMPLE_NUM, the number of sample points; * BATCH, the number of sampling points to create at one time; * MOVIE_NAME is the name of the file in which the movie is stored; * OUTPUT, a file into which the data is stored. To indicate that no further computations are desired, it is enough to input a nonsensical value, such as -1. * * * Ready to generate a new dataset: * * NDIM is the spatial dimension. NDIM = 2 N is the number of points to generate. User input N = 100 INIT_STRING is the method of initializing the data: file read data from a file; 'GRID' by picking points from a grid; 'RAND' using MATLAB's RAND function; 'UNIFORM' using a simple uniform RNG; User input INIT_STRING = "rand". User input INIT = "-1". IT_MAX is the maximum number of iterations. An iteration carries out the following steps: * the Voronoi region associated with each generator is estimated by sampling; * the centroid of each Voronoi region is estimated. * the generator is replaced by the centroid. If "enough" sampling points are used, and "enough" iterations are taken, this process will converge. User input IT_MAX = 50 IT_FIXED is the number of consecutive iterations to take with a fixed set of sample points. Setting IT_FIXED to 1 means a new set of sample points is generated on every iterative step; Setting IT_FIXED equal to IT_MAX means a single set of sample points is used for the entire iteration. Any value between 1 and IT_MAX is reasonable. User input IT_FIXED = 1 SAMPLE_STRING is the method of sampling the region: 'GRID' by picking points from a grid; 'RAND' using MATLAB's RAND function; 'UNIFORM' using a simple uniform RNG; User input SAMPLE_STRING = "rand". Numeric value of SAMPLE = -1 SAMPLE_NUM is the number of sample points. The Voronoi regions will be explored by generating SAMPLE_NUM points. For each sample point, the nearest generator is found. Using more points gives a better estimate of these regions. SAMPLE_NUM should be much larger than N, the number of generators. User input SAMPLE_NUM = 100000 BATCH is the number of sample points to create at one time BATCH should be between 1 and SAMPLE_NUM. It is FASTER to set BATCH to SAMPLE_NUM; setting BATCH to 1 requires the least memory. BATCH = 1000 MOVIE_NAME is the name of the file in which the movie is stored; User input MOVIE_NAME = ccvt_reflect_test.avi OUTPUT is a file into which the data is stored; OUTPUT = "generators.txt". Step Energy 0 3.351073e-03 FILE_DELETE: Deleting old version of "initial.eps". points_eps(): Opening output file "initial.eps". Graphics saved as "00000.png" 0 3.364860e-03 Graphics saved as "00001.png" 1 2.235060e-03 Graphics saved as "00002.png" 2 2.019419e-03 Graphics saved as "00003.png" 3 1.933212e-03 Graphics saved as "00004.png" 4 1.893476e-03 Graphics saved as "00005.png" 5 1.862955e-03 Graphics saved as "00006.png" 6 1.855018e-03 Graphics saved as "00007.png" 7 1.836402e-03 Graphics saved as "00008.png" 8 1.825533e-03 Graphics saved as "00009.png" 9 1.815966e-03 Graphics saved as "00010.png" 10 1.810110e-03 Graphics saved as "00011.png" 11 1.805531e-03 Graphics saved as "00012.png" 12 1.802953e-03 Graphics saved as "00013.png" 13 1.797220e-03 Graphics saved as "00014.png" 14 1.801826e-03 Graphics saved as "00015.png" 15 1.801748e-03 Graphics saved as "00016.png" 16 1.792916e-03 Graphics saved as "00017.png" 17 1.797610e-03 Graphics saved as "00018.png" 18 1.797027e-03 Graphics saved as "00019.png" 19 1.798318e-03 Graphics saved as "00020.png" 20 1.796166e-03 Graphics saved as "00021.png" 21 1.787511e-03 Graphics saved as "00022.png" 22 1.788124e-03 Graphics saved as "00023.png" 23 1.781996e-03 Graphics saved as "00024.png" 24 1.791202e-03 Graphics saved as "00025.png" 25 1.790921e-03 Graphics saved as "00026.png" 26 1.784855e-03 Graphics saved as "00027.png" 27 1.782660e-03 Graphics saved as "00028.png" 28 1.777611e-03 Graphics saved as "00029.png" 29 1.784132e-03 Graphics saved as "00030.png" 30 1.789027e-03 Graphics saved as "00031.png" 31 1.782472e-03 Graphics saved as "00032.png" 32 1.778165e-03 Graphics saved as "00033.png" 33 1.783353e-03 Graphics saved as "00034.png" 34 1.776338e-03 Graphics saved as "00035.png" 35 1.782846e-03 Graphics saved as "00036.png" 36 1.780994e-03 Graphics saved as "00037.png" 37 1.773383e-03 Graphics saved as "00038.png" 38 1.774395e-03 Graphics saved as "00039.png" 39 1.770678e-03 Graphics saved as "00040.png" 40 1.773299e-03 Graphics saved as "00041.png" 41 1.771369e-03 Graphics saved as "00042.png" 42 1.768702e-03 Graphics saved as "00043.png" 43 1.769643e-03 Graphics saved as "00044.png" 44 1.770871e-03 Graphics saved as "00045.png" 45 1.768717e-03 Graphics saved as "00046.png" 46 1.765930e-03 Graphics saved as "00047.png" 47 1.770712e-03 Graphics saved as "00048.png" 48 1.761800e-03 Graphics saved as "00049.png" 49 1.770261e-03 Graphics saved as "00050.png" 50 1.766166e-03 filename = ccvt_reflect.gif Created animation as "ccvt_reflect.gif" The data was written to the file "generators.txt". FILE_DELETE: Deleting old version of "final.eps". points_eps(): Opening output file "final.eps". ccvt_reflect(): Normal end of execution. ccvt_reflect_test(): Normal end of execution. 24-Jun-2024 15:51:34