How I used 3D printing to Visualize 3D Math Equations

Mercy Wolverton
6 min readJan 16, 2023

--

If I told you to visualize a Hyperbolic Paraboloid, could you tell what that would look like?

What if I told you it’s equation was z = y²/2² -x²/2² ?

If you are stumped, don’t feel bad. Even Calculus III students, who work with these equations throughout their course, struggle going from numbers and variables to 3D visualization.

But what if I handed you the above model and said this is a Hyperbolic Paraboloid. I bet manipulating that equation would make a lot more sense.

For many students when asked what the hardest part of Calculus III was, they stated they struggled with visualizing 3D objects. Let’s look at some of the topics in Calculus III:

  • Surfaces in Space
  • Vectors
  • Arc Length and Curvature
  • Gradients
  • Parametric surfaces

All of these topics rely on a proper visualization of the equations for the best comprehension.

Imagine having that model. You could pick it up, turn it around, and easily visualize not only what the equation actually means, but how it looks in 3 dimensions.

This is possible with 3D printing!

3D printing is the process in which a 3D model is “sliced” every 2mm along the vertical axis. This “sliced” model is then separated by each slice which are now 2D shapes that when stacked on top of each other recreates the 3D model. Each of these slices are sent to the printer where filament, commonly plastic or PLA, is heated up by a nozzle. Then the nozzle uses this heated filament to draw the 2D shape of the first 0.2mm slice of the model on the build plate, moves up 0.2mm and draws the next 2D shape and so on until the whole model has been drawn one layer at a time.

So, here is how I used 3D printing to bring 3D mathematical equations into 3 dimensions!

Let’s go through the process I took to print these models.

  1. Finding the Right Software

Normally when 3D printing I utilize one of several different 3D modeling programs such as Tinkercad or Solidworks. However, I was not able to find the functionality within these software programs to input mathematical equations and export a 3D model. I turned to look specifically at 3D graphing utilities such as Geogebra, which claim to have the compatibility to export to .STL or .OBJ (the filetypes for 3D models). Unfortunately, I couldn’t get the equations I was looking at modeling to display let alone export properly. So, I did some more research and found Wolfram Alpha’s software: Mathematica.

After playing around with the software and watching tons of How To YouTube videos, I was able to enter my equations and accurately receive a 3D model. The function I used was ContourPlot3D, which I passed 7 arguments:

  • The equation (formatted using a double equal sign)
  • The x-axis bounds set from [-3, 3]
  • The y-axis bounds set from [-3, 3]
  • The z-axis bounds set from [-3, 3]
  • Extrusion (the thickness of the walls of the model) set to 0.4
  • Mesh (a web-like detail or mesh overlayed with the model to show the peaks, valleys, and angles of the model) set to False as it would add texture to the model
  • PlotPoints (how many plot points are used to create the model / how smooth the model is) set to 40 which I found to be a good balance

2. Exporting the 3D Models

I had created a 3D model for each of the equations I intended to print:

  • Hyperboloid of 1 Sheet: x² + y² - z² = 1
  • Hyperboloid of 2 Sheets: z²- x² — y² = 1
  • Elliptic Cone: x² + y² -z² = 0
  • Elliptic Paraboloid: z = x²/2² + y²/2²
  • Hyperbolic Paraboloid: z = y²/2² -x²/2²
  • Sphere: x² + y² + z² = 3²
  • Ellipse: x²/4² + y²/3² + z²/2² = 1

All that was left was to export each of these models. When creating the models I saved them all under a variable depending on the name of the graph. To export the models I used a function called Export and passed in 2 arguments:

  • File Name for Exported Model (in quotes and including the file type as .stl)
  • Variable Name Holding the 3D Model

Now, I had the .STL files for each model safely stored on my computer.

3. Creating the axes

At this point I realized I needed a way to hold up these models on their respective axes to best visualize where the three planes are and how they come together in this 3D model.

So, I opened up Tinkercad and built a basic frame with accurate units as well as the connecting piece and foot to help the axes stand properly.

When printing the axes I used PLA, but I used Thermoplastic polyurethane aka TPU for the connector/origin and foot as the PLA was proving to be too brittle and wouldn’t withstand the pressure of holding the axes.

4. Prepping the Graph Models to Connect to the Axes

Now that I had the axes, I needed to add holes into the 3D Graph Models to allow for them to be attached properly.

So, I opened Tinkercad back up and uploaded all the graph models and inserted holes or additional connectors as needed. Then I re-exported the models as they are now ready to be sliced for the printer.

5. Slicing the Models

Since I use an Ender 3 Pro 3D printer, I used the slicer program Cura. So, I uploaded all of my models one at a time into Cura. I made sure to double check the scale of all the models such that they matched the axes, specifically the units on the axes.

Then I sliced each model and exported it to .gcode (the file type for sliced 3D models with commands for the printer telling it where to move the extruder and build plate such that it correctly draws each layer).

6. Printing the Models

Finally, I was ready to print the models. I copied all the files to a micro sd card, which I inserted into the Ender 3 Pro.

Then I was able to run each file, effectively printing each graph.

Once I had them all printed, I was able to put them together on the axes finally showcasing a 3D mathematical graph in 3 dimensions!

3D printing is a field with infinite possibilities and we have only scratched the surface! We can use 3D printing to do anything from creating educational aides to building homes. But no matter what you build, the first step is to build the model. So, while building homes or printing mathematical graphs may utilize a 3D printer, you can do the most crucial part of the process without any of that. You can build 3D models with just a basic computer. You can start printing models like these mathematical graphs with a $200 hobbyist printer. You can even check in with your local library or makerspace to see if you can use their computers or 3D printers! So with such endless possibilities, what will you make?

--

--