As my 8th wedding anniversary (the magical 2 to the power of 3 year!) was getting closer, I knew I wanted to do something different. I wanted to give a physical gift that was unique, represented my personality as well as us. The idea stems from our wedding bands, that are Mobius rings (”one sided” objects with one 180 degree twist, one twisted one way, one the other). The object I decided to go with was a small statue that would have two hearts intertwined, except the hearts would have the Mobius twist in them (again opposing directions).

At first I was unsure how to proceed, then I met a friend with an access to a really high quality 3D printer and some hand skills (for polishing and making sure that the result is perfect). After that the question became how to get the data for the 3D printing. I have some artist friends but I don’t usually want to bother them. After some time I realized that I could actually program the object myself.

So I went into Shadertoy and created an implicit representation for the object I wanted. The representation is a signed distance field; a function that takes a 3D position and returns a positive value if outside, negative if inside, and the object we want is where the function is zero. Shadertoy gave me a really fast iteration loop and once I was satisfied with the shape, I changed into C++ land.

I had in the past been dabbling with the marching cubes algorithm on the GPU, so I plugged the Shadertoy function into it. The objective is to get a real 3D mesh out. Marching cubes isn’t perfect, but I did it at really tiny steps. The result was a mesh that had over 4 million vertices. That was simplified in 3D modelling program and then 3D printed by my friend (who also did all of the hand polishing).