Tuesday, September 3, 2013

Voronoi-tesselated Klein Bottle

OK, I admit I've caught the bug of messing around with Math objects and making pretty printable objects from them.

This is my take on the Klein Bottle, inspired in large part by Dizingof's perforated bottle. Mine, however, uses the Voronoi tesselation to perforate the bottle. The various files are available on Thingiverse if you'd like to mess with it.

It was made by using ViaCad and MeshLab, as follows:

* In Viacad, I created 3 surfaces: the bottle body, the neck, and a patch that covers the intersection of the bottle and the neck. The bottle and neck were exported as very fine meshes, the patch as a regular resolution mesh.

* In MeshLab, I imported the bottle and the patch.

* Filters > Color... > Disk Vertex Coloring to color the Bottle using the points in the patch, adjusting the parameter until the patch was fully colored.

* Render > Color > None and then Filters > Selection > Select Faces by Color. Select RGB mode, set the sliders all to 1, turn on Preview, and then tune down the R value until you get everything selected but the patch area.

* Filters > Selection > Invert Selection, then Filters > Selection > Delete Selected Faces and Vertices to make the hole. It will be a bit bigger than the patch, but this is what you want, it makes for a nice effect.

* This is a good point to save your work. MeshLab gets crashy if you do too much, so make a lot of checkpoints. As a general rule, if something is crashing MeshLab -- or not giving proper results -- get things to the point just before the crash, save, then restart MeshLab and import the saved mesh.

* Turn off display of the patch, then Import the Neck. If the neck has a different shade from the bottle, then Filters > Normals > Invert Faces... to change the normals.

* Filters > Mesh > Flatten... to combine the two meshes.

* One problem you may run into is that the Voronoi Tesselation seems to mess up at the join between the neck and the bottle. To avoid this, use Filters > Cleaning > Merge Close... and set a pct of 8-10 (Try 8, if it doesn't work, backtrack and try bigger numbers.

* Save the results and then do the Voronoi tesselation. See my Voronoi Tetrahedron for the details on how to do that.

No comments: