A script implementing a 3d Voronoi cell cutting algorithm to split an arbitrary shape into strikingly crystalline volumes. The algorithm is physically equivalent to filling a box with balloons, and then inflating all the balloons until all edges are tightly pressing against each other.
[update!] I wrote a version of this script for David Beil and Geoffrey Braiman at Georgia Tech that uses spheres instead of points, and incorporates the sizes of those spheres in the 3d voronization.
Red: unconstrained voronoi, where each sphere is of equal weight
Blue: constrained voronoi, where each sphere is weighted according to its size
A second version, downloadable below, includes a “cutoff” radius to improve speed. When considering a voronoi sphere, any sphere outside this radius is not used in the voronoi tesselation. Unpredictable results can result from using this version of the script.