Inspired by all of the beautiful mathematical art by Dizingof and Bathsheba, I have been interested for a while in figuring out how to create such a complex surface. These types of surfaces are called “triply periodic surfaces” and has been a ton of research done to determine the mathematical basis for these beautiful, mind-bending surfaces. For a thorough review of the subject, see Ken Brakke’s website and be amazed.
All of the surfaces can be described by mathematical equations. While interesting, I feel like trying to understand this aspect of their beauty might be a bit out of my grasp. However, I find the Gyroid a particularly interesting surface and decided to model it. Since I modeled the surfaces in Rhino and did not create them using mathematical formulas, they are not perfect. The surfaces are not exactly curvature continuous, and you can see a few seams here and there. However, I did take some steps to try and make them as seamless as possible. It took a few attempts before I figured out the correct order of steps to create the final model, but I’ve detailed the full procedure below. The final model I created can be downloaded from my profile on Thingiverse.
First, create a cube for a frame. I started with a 40mm cube:
Next, model the curves of the unit cube as shown in this image from Ken Brakke’s site. Use a control point curve with 3 points as shown below to create the simple curves.
Next, translate and rotate these curves to adjacent faces of the cube. I still can’t quite wrap my head around how these surfaces are patterned, but using the image of the final surface as a guide, I figured it out.
Next, use these curves to model the interior curves. This will allow you to get the seed surface that is rotated to create the repeating unit.
From here, you can isolate the curves of one corner of the cube to create the seed surface.
In my first attempt, I just took these curves and created a patch. The resulting surface was less than ideal, and you could plainly see a discontinuity where the surfaces met. So after looking at some forums and trying again, I decided to break this surface up into smaller surfaces. The next step is to create tangency guides on the curves. Use the line to to create segments that are exactly perpendicular to the plane that the curves sit in, at their midpoints.
Next, use the Blend Curves tool to create blends between them.
Next, we want to split these curves to create surfaces with them. However, due to precision errors, the curves will probably not meet up at their midpoints.
To fix this, place points at the midpoints of each blend segment and split them into two. Next, turn on the control points and select all of the points. Use the Set XYZ function to make all of the points coincide with each other.
Now you’ve got 6 segments that all meet up at a common center point and are tangent to the the planes on the exterior of the seed cell.
Next, create 6 surfaces from each of the 3 curves. You can create 3 individual surfaces and then use the edges for tangency guides to improve the continuity of the polysurface.
The next step is to rotate and translate this surface to complete the unit cell. It honestly hurts my brain to think about how these surfaces need to be translated to form the unit cell. I used the picture and some trial and error until I got all of the pieces in the right place.
This cube can now be repeated infinitely to create a repeating structure. I just created a 2x2x2 array for 3D printing.
Unfortunately, the surface probably won’t join together, however, this is not necessary. Select all the surfaces and export as an STL to import into MeshLab. Below, is the resulting geometry opened in MeshLab.
Using the Filters>Remeshing, Simp…>Uniform Mesh Resampling command discussed in this post, thicken the mesh to the desired thickness. Check the “Clean Vertices” and “Absolute Distance” boxes and set the Precision to a 1.0 in the World Unit box, and the Offset to 0.75 in the World Unit box. This ends up in giving you a 3mm wall thickness, although feel free to tweak the numbers to get a thinner model. You’ll get the following model below:
In order to make slicing easier, lower the output file size by using the Quadric Edge Decimation command. A final model size of about 100,000 faces should still give us enough detail.
Then, load the model up in your slicing program of choice, get the gcode, and print! Here it is on my Prusa i3.
And here is the final print!
Well… there it is. As mentioned above, you can print this model on Thingiverse. Happy printing!