3 The structure of Voro++ makes it easy to handle complicated boundary conditions
4 by adding in additional plane cuts due to walls. The code has built-in support
5 for plane, cylindrical, and spherical walls, and extra ones can be easily coded
6 as derived C++ classes.
8 1. cylinder.cc - this example creates a cylinder wall object, and imports a
9 test packing from "pack_cylinder". It outputs POV-Ray files for particles at
10 cylinder_p.pov, and Voronoi cells at cylinder_v.pov. These can be rendered
11 using the scene file cylinder.pov with the command:
13 povray +W600 +H800 +A0.3 +Ocylinder.png cylinder.pov
15 2. frustum.cc - this example creates a frustum by making use of a cone wall
16 object. It fills the frustum with 500 random points, and outputs the
17 Voronoi cells in gnuplot format. Due to the conical wall being approximated
18 with plane cuts, some inaccuracies can be seen.
20 2. tetrahedron.cc - this example creates a tetrahedron with four planes, and
21 randomly inserts particles into it, using the point_inside() function to
22 determine whether the points are within the walls. It outputs the particles to
23 tetrahedron_p.gnu, and the Voronoi cells to tetrahedron_v.pov. These can be
24 visualized in gnuplot using:
26 splot 'tetrahedron_p.gnu' with points, 'tetrahedron_v.gnu' with lines
28 Currently, the curved walls are made by a single approximating plane cut. This
29 provides good results when particles are pressed against the walls, but is
30 inaccurate it the particles are sparse. It would be possible to improve this by
31 approximating the curved surface with a sequence of planes rather than just
34 The code currently only supports walls which lead to convex computational
35 domains, since a non-convex domain would lead to non-convex cells. To correctly
36 handle these cases, the easiest way would be to divide the domain into several
37 convex sub-domains, carry out a calculation in each, and then glue the cells
38 that cross the divisions. Native support for non-convex domains may be added in