# This code example visualize a voronoi cell. # You may add other points in the point matrix. $m= new Matrix(<<"."); 1 0 0 0 1 2 0 0 1 0 2 0 1 0 0 2 1 -2 0 0 1 0 -2 0 1 0 0 -2 1 1 1 0 1 -1 -1 0 1 -1 1 0 1 1 -1 0 1 1 0 1 1 -1 0 -1 1 1 0 -1 1 -1 0 1 1 0 1 1 1 0 -1 -1 1 0 1 -1 1 0 -1 1 . $v = new VoronoiDiagram(SITES=>$m); $lattice = $v->VISUAL_VORONOI->elements->[1]; threejs(compose(catalan_solid("rhombic_dodecahedron")->VISUAL(VertexLabels=>"hidden"), $lattice));