1 // Radical Voronoi tessellation example code
3 // Author : Chris H. Rycroft (LBL / UC Berkeley)
4 // Email : chr@alum.mit.edu
5 // Date : August 30th 2011
10 // Set up constants for the container geometry
11 const double x_min
=-3,x_max
=3;
12 const double y_min
=-3,y_max
=3;
13 const double z_min
=0,z_max
=6;
15 // Set up the number of blocks that the container is divided
17 const int n_x
=3,n_y
=3,n_z
=3;
21 // Create a container with the geometry given above, and make it
22 // non-periodic in each of the three coordinates. Allocate space for
23 // eight particles within each computational block. Import
24 // the monodisperse test packing and output the Voronoi
25 // tessellation in gnuplot and POV-Ray formats.
26 container
con(x_min
,x_max
,y_min
,y_max
,z_min
,z_max
,n_x
,n_y
,n_z
,
28 con
.import("pack_six_cube");
29 con
.draw_cells_gnuplot("pack_six_cube.gnu");
30 con
.draw_cells_pov("pack_six_cube_v.pov");
31 con
.draw_particles_pov("pack_six_cube_p.pov");
33 // Create a container for polydisperse particles using the same
34 // geometry as above. Import the polydisperse test packing and
35 // output the Voronoi radical tessellation in gnuplot and POV-Ray
37 container_poly
conp(x_min
,x_max
,y_min
,y_max
,z_min
,z_max
,n_x
,n_y
,n_z
,
39 conp
.import("pack_six_cube_poly");
40 conp
.draw_cells_gnuplot("pack_six_cube_poly.gnu");
41 conp
.draw_cells_pov("pack_six_cube_poly_v.pov");
42 conp
.draw_particles_pov("pack_six_cube_poly_p.pov");