In July it was time to get back to designing and 3D printing some more math models. I had previously seen some beautiful models printed by Dave Pfaff on the Series 1 Pro, using its ability to print in a spiral. I wanted to print a large hyperboloid of one sheet using this printing technique.

So I went back to Cinema4D to design the model. I used the Function tool to make the hyperbola $$\frac{x^2}{4} -\frac{y^2}{9}=1$$, which has asymptotes $$y=\pm \frac{3x}{2}$$. I then used the Lathe tool to revolve the hyperbola around the $$y$$-axis and create a hyperboloid of one sheet. I knew, from the asymptotes, that the surface would have an angle  greater than $$45^\circ$$ angle with the $$xz$$-plane. (Recall that in Cinema 4D, the $$y$$-axis points upwards where the $$z$$-axis usually points in mathematics.) Having a steep angle with the plane is important feature when 3D printing in a spiral. Since there won’t be any supports printed, a steep angle increases the chances of a good print.

At this point I used the surface I had created to make two different kinds of models. For the first model, I simply added a top and bottom to create a closed volume.  For the second model, I thickened the surface using the Extrude tool (2mm), again creating a closed volume. The extruded surface had raised top and bottom rims, which meant the model would not sit flat. So I selected all the point around the top (respectively bottom) rim and brought them down (resp. up) an appropriate distance. Apart from this, this thickened model needed very little doing to it. I then created a third model by adding equations and removing them from the thickened surface. This ended up being quite involved as I used the Bend Tool to make sure the equations sat nicely on the surface.

In order to get a spiral print, I took the first closed model, and adjusted the print settings on the Series 1 Pro printer. The top and bottom layers of the model are not printed; instead the nozzle goes around in a spiral, printing the surface 1 layer thick. Initially, we had trouble with both the fan and print speed settings. This meant the filament was not setting at the bottom of the model, leaving a gaps and giving a ragged appearance. After we slowed the print speed down and made sure the fan turned on after 1mm (rather than after 10mm), the prints turned out beautifully. The small model is about 13cm tall, and the large one about 20cm tall. These models can be found on Thingiverse here.

The next set of models was the hyperbolic paraboloid again, but this time I wanted to surface to look more like a saddle shape. To achieve this I went into Mathematica and use ParametricPlot3D command to plot the surface $$z=x^2-y^2$$. Instead of displaying it inside a box, I had Mathematica just show the part of the surface inside the circle $$x^2+y^2=1$$. To do this, I used the RegionFunction command.

I exported the Mathematica file as a .wrl to Cinema4D. Once there, I extruded the surface (again 2mm thick), then had to spend a significant amount of time repairing the mesh. To do this, I used the Optimize function, and also went around the surface repairing the mesh by hand (removing points, lines and faces, then using the Fill Polygon Hole tool to repair the gaps). I made two copies of the model, one with equations and one without. (I also built the equations in Cinema4D and extruded them. I then removed them from the surface using the Boole tool.) I 3D printed the resulting models on the FormLabs Form 1+ printer in clear and grey resin. The surfaces printed very well, though there were a fair number of supports to remove.

These models can be found on Thingiverse here.

# Parametric Curves: Spiral, Self-Intersecting Curve, and Helix

I then made a series of models of parametric curves. The first was a model of a spiral that increases in diameter as it travels along the $$z$$-axis.  The curve comes from Section 10.7 in Stewart’s Essential Calculus.  The curve is defined by the equations $$x=t*\cos(t), y=t*\sin(t)$$, and $$z=t$$.  I designed the model in Cinema 4D using the Formula Spline to draw the curve, the Sweep NURB to give the curve depth, and the Wrap Tool to wrap the text around the curve.  I also used the Extrude Tool to give the equations depth and the Boole tool to connect them with the curve.  The print failed a few of times due to a tangled filament and a jammed extruder, but it worked after the fourth try.  The result was that the equations looked messy and the letter $$t$$ is hard to make out in places.  Also, the MakerBot did not include supports for the last rotation, which caused the print to be messy towards the vertex of the spiral.  We remedied these issues by printing another version of the spiral on the Formlabs printer, where we imprinted the equations into the object.  The print came out much better as the equations were neater as was the end of the spiral. This model can be found on Thingiverse.

I used the FormLabs printer to create a model of a space curve from Stewart’s Essential Calculus (Section 10.7, exercise 18).  The first challenge was to draw the object in Cinema 4D without a self-intersection (3D printers do not accept intersecting geometry).  Professor Denne suggested that I make two half-curves that intersect, then make a Boolean out of them.  The suggestion worked, so I was then able to put text onto it.  It was tricky to figure out how to get the equations onto the curve, but I decided to put them on top of the lower ring of the model.  They turned out well, as did the curve, which was very smooth and with minimal deformation due to its supports. You can find this model on Thingiverse here.

My next print was of a helix on the Formlabs printer.  I first printed a Black one with a radius of 2 mm, but it turned out to be very small and frail, and the equations were hardly legible.  I then fixed these issues by making the radius 4 mm, but the equations are again hard to read because of the white resin. This model can be found on Thingiverse here.

Our experience has taught us that equations are easiest to read on the FormLabs prints in grey. You can find instructions on how to use Cinema 4D to add equations to parametrized curves here.

In order to make a monkey saddle I created the surface in Mathematica. I then exported it as a .wrl file and imported it into Cinema 4D. Once it was in Cinema 4D, like all surfaces, I made it the correct size, optimized the polygons and extruded them by 0.20 cm.

I then added an equation to the surface by punching it all the way through. This time with the equation I used Arial as the font instead of Times New Roman to hopefully avoid the issues we had with the formula when printing the hyperbolic paraboloid.

I printed the monkey saddle using the liquid printer and the formula in Arial font ended up looking great. The model can be found on Thingiverse here

# Volumes by Slices: Iterated Integrals

I have modeled the the solid from Example 8 of Section 12.1 from Stewart’s Essential Calculus.  It is bounded by the surfaces $$z=\sin x \cos y$$, $$z=0$$, $$y=0$$, and $$x=\pi/2$$. The example demonstrates the strategy behind computing a double integral using Fubini’s Theorem.  I approximated the solid by eight slices in the $$x$$ and $$y$$ directions. In order to draw the correct splines in Cinema 4D, I had to use the correct parametric equations to plug into the inputs $$x(t),\, y(t)$$, and $$z(t)$$.  For the first object I held $$x$$ constant (approximating integration with respect to the $$y$$-variable). The parametric equations were $$x(t)=\frac{k\pi}{32}$$, $$y(t)=t$$, and $$z(t)=\sin(\frac{k\pi}{32}) \cos(t)$$ for $$k=1, 3, 5, \dots, 15$$.  I then created a slice in Cinema 4D by adding straight splines. I extruded each slice by 0.2, which is just greater than $$\pi/16$$ (the width of each slice).  I placed each slice so that it overlapped slightly with the next slice – this will allow the objects to be merged (via a Boole) and will prevent vertical lines from showing in the print after the slices are collected into one object.  I had to use a Boole with two cubes for the two approximations by slices because the solids each had two very thin edges (that is, I shaved off some volume from two of the edges).

I then repeated the entire process, but this time with a constant $$y$$-variable.  I also printed the smooth solid, which is the volume that is approximated by the slices.  In order to do this, I imported the solid from Mathematica and put equations on it like I have in other models. These models can be found on Thingiverse here, here, and here.

My next object was a bulge-head solid. This solid lies above the $$xy$$–plane, outside the unit sphere, and inside the cardioid of revolution given by $$\rho=1+\cos\phi$$. Professor Beanland had given us these equations, since he was really curious to see what the solid looked like. He’d nicknamed it the cone-head solid, but after printing we renamed it the bulge-head solid.

Since the outside of the solid was a cardioid of revolution, I decided to create the solid in Cinema 4D by creating two splines (one for the cardioid, the other for the hemisphere) and revolving each around an appropriate axis.  Professor Denne helped me to figure out which parametric equations to place into Cinema 4D’s inputs for a formula spline. These were $$x(t)=1+2\cos(t) + \cos(2t)$$, $$y(t)=2\sin(t)+\sin(2t)$$, and $$z(t)=0$$, where $$t=[0,\pi/2]$$.  For the spline that would later become the hemisphere, I used $$x(t)=\cos(t)$$, $$y(t)=\sin(t)$$, and $$z(t)=0$$, where $$t=[0, \pi/2]$$. I then used the Lathe Tool with an angle of $$360^\circ$$ to make the two boundaries of the solid.  I then put them into a Boole to make a union between the two boundaries.  I printed the bulge-head solid on the FormLabs printer using clear resin. When loading the object into the FormLabs software, we got a warning about the object’s integrity, but we decided to continue the print anyway. Later on we were worried that the object would use up too much resin and that it may have some problems on the surface (like the smooth strange bowl did).  It turned out that added a bit more resin mid-build, just to be on the safe side.  The solid looks pretty good right now because it only has a few pimples on the inside, but no significant lumps. The object is still hardening and once it’s completely dry we’ll remove the outside supports. This will probably leave a few pimples as well.

You can find this model on Thingiverse here.

# Quadratic Surfaces – Hyperboloid of Two Sheets

The last quadratic surface I printed was a hyperboloid of two sheets.

For the hyperboloid of two sheets I created the entire object from scratch in Cinema 4D using the same process I used to create the cone and other similar objects. For this surface I used the same formula spline as the hyperboloid of one sheet $$x(t)=cosh(t), y(t)=sinh(t), z(t)=0$$, and then rotated it to the correct orientation. I then used the lathe tool and rotated this spline 180 degrees since this was all it needed. Because of this I needed to use only 30 rotation segments for a total of 60 all around the object.

I also had to reverse the normals on half of the object to make sure they were all aligned with the other half before I extruded the surface. I optimized the polygons to be sure the edges joined up into one object. I then extruded the surface to create my hyperboloid of two sheets. I copied this and put equations through one of them. I also made sure to Boole the edges of the hyperboloid to make them flat for printing.

Here is a picture of the final object! It can be found on Thingiverse here.

# Quadratic Surfaces – Hyperbolic Paraboloid

The quadratic surface that gave me the most trouble was the hyperbolic paraboloid. This surface could not be created in Cinema 4D and had to be imported from Mathematica. When I imported the surface from Mathematica the center of the saddle had hundreds of little polygons that overlapped, which became a huge problem when I tried to extrude them to give the surface thickness.

I had to spend a long time experimenting to find the lowest number of plot points I could use in Mathematica and still get an accurate object. Once I had done this I did the same thing with the optimize tool in Cinema 4D to see how big I could make the polygons before the surface started to lose accuracy. The first time I went through all these steps the hyperbolic paraboloid I had chosen just didn’t work correctly. So, I went back to the beginning and created a new Mathematica file of a hyperbolic paraboloid, and spent some time deciding where to cut it off to create edges that were as straight as possible.

Once I had done this and imported the surface into Mathmatica I optimized the surface as much as it would allow and extruded it. Finally I had a surface I could print! I then added the hyperbolic paraboloid’s equation to the surface. Instead of just imprinted the equation, since the surface was so thin I punched it all the way through.

In order to print this surface I used the FormLabs liquid printer. When the object came out of the printer it looked great and only had a few minor flaws to fix after this first print. One of the issues was the size of the object; it was just a little too small. The other issue was that the 2 in the exponent of the equation didn’t quite form correctly because it was too small. The final issues was that the equation had a $$+$$ sign where there should have been a $$–$$ sign (oops). The equation was little too long with a 0 that was missing its center.  To fix these problems I rearranged the equation (and fixed the sign issues) in Adobe Illustrator and then punched it through the surface again. The second print on the liquid printed I made 1.4 times larger than the last print.

The final print still had issues with the formula but otherwise worked out well. We are currently looking into changing the font to see if that helps with this issue. This model can be found on Thingiverse here.

Using my experiences building this and the other quadratic surfaces, I’ve put together a set of instructions on how to build quadratic surfaces using Mathematica and Cinema 4D. This can be found here.

The next quadratic surfaces I printed were an elliptic paraboloid and a regular paraboloid.

For the elliptic paraboloid I imported the surface from Mathematica.

I then optimized the polygons, extruded them by 0.20 cm to give the surface thickness. After that I used the boole tool to make the edge flat and added an equation through the surface.

I created the regular paraboloid from scratch in Cinema 4D using the same process as the cone.  I used the formula spline $$x(t)=t, y(t)=t^2, z(t)=0$$ and then used the lathe tool with 60 rotation segments to rotate it 360 degrees. I optimized the polygons and extruded them to give the surface thickness. I also made sure to “boole” the edge to make it flat and added an equation.

I printed both paraboloids on the same build bed with the MakerBot 2X printer. They can be found on Thingiverse here and here.

The next quadratic surface I made was a cone. This is a particularly challenging object since the cone’s two halves meet at a single point in the center. In order to deal with this printing challenge, I originally attempted to create the object and add a certain amount of thickness to the middle so it would print correctly.

The first cone I made using a method similar to my other quadratic surfaces by using a spline with the formula $$x(t)=t, y(t)=1.5*t, z(t)=0$$ (it was important to use the * otherwise Cinema 4D did not multiply) from $$t=-2$$ to $$t=2$$ and rotating it with the lathe tool 360 degrees with 72 subdivisions. Then I optimized the object by 0.02cm. With the first cone I made I reversed the normals so they were facing outwards from the cone surface. When I extruded the surface by 0.25cm this automatically gave center of the object more thickness. Unfortunately I realized that while it gave the center thickness, it also offset the lines of the cone so they didn’t match up, which is not what we wanted. In order to fix this problem I did the same thing but did not reverse the normals (so they were facing the inside) and extruded the surface to give the cone thickness.

With this second cone I removed the center using the Boole Tool, and a cylinder of radius$$=0.25$$cm and height$$=2\cdot 0.25\cdot 1.5=0.75$$cm. We did this in order to preserve the lines of the cone and give it the support the object needed. After removing this cylinder from the center I then added one of the same dimensions in its place. We knew this print had a high potential to fail but decided to print it as a test to see what we might need to change in our design. We left it overnight and it was a huge mess the next morning. Clearly this design didn’t work and we needed to rethink it.

I decided that creating both sides of the cone in one object was just not going to work. Instead I decided to create both halves separately and then connect them using a cylinder made from a sheet of clear overhead plastic (an idea that came from Henry Segerman’s Calculus Surfaces). In order to do this I used the same formula spline except this time from only $$t=-2$$ to $$t=0$$ and copied and rotated it to create the second half. On one half I put the equation for the cone $$\frac{z^2}{4}=x^2+y^2$$ and immediately ran into trouble. I had used too many subdivisions (72) and the object was not accepting the Boole with the equation. After creating many different cones with different subdivisions I found that 60 worked. Once this problem was solved I added the equations to one of the halves of my cone and printed it. When I added the equation I put it all the way through the surface and not just imprinted on it since the object had very little thickness to it.

The print was successful but showed a few flaws in my design. One was the equations and how they were a little too big and how the fraction parts of it needed to be downsized to match the other parts of the equation. This was easy to fix in Adobe Illustrator by changing the font size in the fractions from 36 to 24. I also made sure the numbers in my equation were not italicized and just the variables were. The other design flaw I found was that the bottom of the cone was not completely flat and was angled from when I extruded the surface to give it thickness. To fix this I used a cylinder and “booled” the bottom of both cones to make them flat. I then reprinted my object and had great results. These objects can be found on Thingiverse here.

My next successful quadratic surface was an ellipsoid. This surface I simply imported from Mathematica and then added equations to it, using the same process as described in my post on the hyperboloid of one sheet.

The first ellipsoid I made in was $$\frac{x^2}{16}+\frac{y^2}{25}+\frac{z^2}{4}=1$$. When I put my .STL file into the MakerBot Desktop program I noticed that the program created supported that went up to the equation because it was on a curved surface and cut into the object. I decided to print the object with these supports and the equation on the side of ellipse and no raft.

The first print I did of the ellipsoid I cancelled the print early on so that I could inspect the sides. The surface looked a bit melty, where the filament had shrunk. We decided this was fine and to try to print it again. The second time I printed this object at about half way through the print it fell over and we found it covered in a stringy mess of filament.

Taking this failure and the melty-ness of the ellipsoid, we decided to create a new ellipsoid that was a little rounder. I followed the same process as for the first ellipsoid using the equation $$\frac{x^2}{4}+\frac{y^2}{6}+\frac{z^2}{3}=1$$

This time when I printed it I decided to put the equations on the top of the ellipse and use a raft. It printed perfectly.

After my success with my second ellipsoid I decided to try to print my first ellipsoid again and this time with a raft. The object never fell over and printed perfectly. These ellipsoids can be found on Thingiverse here and here.