Hacker Calculus

Isaac Newton was a hacker. Let's take calculus back to its roots and make it accessible to everyone.

Similar projects worth following
Many hackers are self-taught and avoid powerful math tools that might let them take creations to the next level. We aim to create a structured set of modules consisting of hands-on 3D printing and electronics projects, with thorough text documentation and minimal supporting algebra. These modules will teach calculus in this hacker style for self-learners, people who simply learn better hands-on, or the visually impaired. When Isaac Newton developed calculus in the 1600s, he tied together math and physics in an intuitive, geometrical way. But over time math and physics teaching became heavily weighted toward algebra, and less toward geometrical problem-solving. However, many practicing mathematicians and physicists will get their intuition geometrically first and do the algebra later. We want to let people get to that point directly without passing through (much) algebra, to allow for more ways for all to succeed at math. NOTE: Read oldest logs first.

For the last two years, we have explored how to create hands-on models to help people learn math and science. Our book 3D Printed Science Projects was published by Apress in 2016, with a second volume in late spring 2017.  Each chapter explains a scientific or mathematical principle, and then develops 3D printable models, many of which can be changed to demonstrate different cases. We found that creating these models was difficult and required both deep knowledge of the science and of the best ways to create a 3D printable model.

We now want to take this to the next level and figure out how to restructure learning a math subject completely, aiming at self-learning and at supporting learners who do much better at a subject if they can make and hold something. There are a lot of one-off projects to demonstrate a particular concept (and we have those in our books) but now we want to see how to think differently given the tools available to us.

Here is our video summarizing the project so far:

We talk to many self-taught hackers who are excellent intuitive engineers, but for whatever reason never took calculus. Calculus is a gateway to a deep understanding of physics and more advanced mathematics. There are online classes which can be taken, in some cases for free, but they are traditional algebra-heavy classes as far as we have seen. What is out there for learning advanced math and physics using 3D printing and open source electronics?

There are databases of 3D printable objects but these are not curated and the quality can be uneven. The science or math in free database models can be just plain wrong. Most commonly 3D printable math models are esoteric “math zoos” that look awesome but give no insight into how the model fits into a bigger picture. The lack of curated, rationally-organized 3D printable math and science models, and the difficulty of creating them, has held back use of 3D printing as an educational tool, even where it might be very effectively applied. Electronics projects are even more scattershot in this way.

Kepler's laws in plastic- 3D printed orbitsKepler's laws in plastic- 3D printed orbits

As an example, our project image is “Kepler’s Laws in Plastic." The models are available for download at our publisher's page (linked above) for the 2016 3D Printed Science Projects book. They depict orbits (Earth, Venus, Mercury in one set, Halley’s Comet to a different scale in the other) with the height being the velocity of the body at that point in its orbit. Kepler developed his Laws about these relationships in about 1609, without benefit of computers, 3D printers (or calculus.) He had to rely on a purely geometrical approach. Although Joan was a JPL rocket scientist for 16 years, when we created this model both of us developed new insights. We want to bring many people those insights and make math as natural as using construction toys.  We have been surprised at the emotional response this project has generated in many people (see our narrative in our logs) and we are excited about where this might go.

What Will Our Project Do?

We have gone back and looked at the oldest roots of calculus as we know it - Isaac Newton’s Philosophiae Naturalis Principia Mathematica, usually called Principia. Pages of Newton’s copy with his notes on it (with his papers at Cambridge University in England) can be seen here. Kindle versions of English translations are available starting at 99 cents.

One thing that struck us was that the entire work has only geometry. The emphasis on algebraic forms came later on. There were good reasons for this, but our idea is this:If we go back to the source, knowing what we know now, can we create a mashup across three and a half centuries that Newton himself might have appreciated? We want to find good intuitive starting points to teach calculus-as-physics and then find hackerish ways to teach them in a hands-on way.

Initially we need to define a set of core concepts that best lend themselves to this...

Read more »


STL (3D printable file) of a visualization of the math behind a PID that converges (Log #9.) License CC-BY-SA 4.0,, credit Rich Cameron (aka Whosawhatsis). See more in the "Details" section of this project.

Standard Tesselated Geometry - 77.13 kB - 08/16/2017 at 05:45



STL (3D printable file) of a visualization of the math behind a PID that does not converge (Log #9.) License CC-BY-SA 4.0,, credit Rich Cameron (aka Whosawhatsis). See more in the "Details" section of this project.

Standard Tesselated Geometry - 405.69 kB - 08/16/2017 at 05:45



Derivative/integral pair- visualizing the fundamental theorem for sinusoids (log #5). License CC-BY-SA 4.0,, credit Rich Cameron (aka Whosawhatsis). See more in the "Details" section of this project.

Standard Tesselated Geometry - 1.04 MB - 08/16/2017 at 05:41



Derivative/integral pair- visualizing the fundamental theorem for x squared and x cubed (log #5 and #7). License CC-BY-SA 4.0,, credit Rich Cameron (aka Whosawhatsis). See more in the "Details" section of this project.

Standard Tesselated Geometry - 1.15 MB - 08/16/2017 at 05:40



STL (3D printable) design for limit comparison. (Log #4.) License CC-BY-SA 4.0,, credit Rich Cameron (aka Whosawhatsis). See more in the "Details" section of this project.

Standard Tesselated Geometry - 4.13 MB - 08/16/2017 at 05:08


View all 8 files

  • Log #13: updated video

    Joan Horvath10/07/2017 at 04:04 0 comments

    We decided to update our project video to make a few things a little clearer and to add some bits. Check it out! (Linked in the project video slot, and also embedded in the Details section.)

  • Log #12: A taste of differential equation models

    Joan Horvath10/06/2017 at 00:41 0 comments

    We were going to start shifting  over to a site more oriented toward learning calculus (rather than our musings about how we are doing the development) but we thought we would put up just one more idea here first to get some feedback. It's a little preliminary, so we're not posting the models yet- but we would love some thoughts on the ideas!

    Our PID controller model is really a model of a two-dimensional system- a signal and its variation with time. We made it a three-dimensional piece by showing the derivative and integral of the system to show how each of these contributes to the final solution on a PID controller. But in some ways, you could do that with multiple lines on a traditional graph.

    So, instead, we said: what if you could model a truly 3D system, where you are showing how, for instance, two things are varying with time? We hunted around a bit and asked some folks for good candidate equations, and our mathematician friend Niles Ritter suggested we look into the predator-prey equations.

    These equations model how two populations, one of which eats the other one, vary over time. Populations will swell and contract as first the prey have a population boom and then the predators catch up and overtake.  (Often the example used is rabbits and foxes, if this is starting to sound dimly familiar!)

    The equations for this are called the Lotka-Volterra equations, and they come up in a variety of other contexts as well.  Their basic form is a pair of equations like this, where x = predators, y = prey, t = time, and a, b, c and d are constants:

       dx/dt  = ax – bxy

       dy/dt = cxy – dy

    We approximated dx/dt in the most simple-minded way possible:

       dx/dt = x at the current time – x at the previous time/time difference

    creating a standard time step and solving for x and y at each time step by using x and y at the previous time step.  There are many more sophisticated ways of doing this, but we wanted something simple we could toss into OpenSCAD and mess with.

    It turns out (see the Wikipedia article linked above) that if a=2/3, b=4/3, c=d=1, that there is stable oscillatory behavior of the two populations. They grow and sink together. (Another stable state is that both populations go extinct after some wild variation, but what fun is that?)

    Our first attempt to plot the three-dimensionally, messing around a bit with a,b,c,d and the starting values for the population, had time coming up from the platform, and looked like this. The numbers of rabbits and foxes are the x and y axes respectively, and time is coming up toward you. 

    Expanding Lotke-Volterra equations solutionExpanding Lotke-Volterra equations solution

    However, the particular set of equations we were trying out were not supposed to expand like that (although it looked cool.) Joan remembered her graduate school math and realized we needed to use either a smaller time step size or a more sophisticated way of modeling the derivative or both (we went with a smaller time step.)

      Rich also decided to try printing with different axes “up” in the print. So here is what the correct version looks like, printed with time going toward the top of the  the picture but with each one printed with a different pair of axes on the build platform of the 3D printer:

    Three versions of the visualization, printed with different axis "up"Three versions of the visualization, printed with different axis "up" during printing.

    It's also cool to note that two of these fit into each other.  The one above that looks like a toilet paper tube is the equivalent of the one that expanded, but with the numerical instability corrected.

    Two versions fit into each other

    Two versions fit into each other

    The version we find the most explanatory is the one below. Imagine the line in space describing the rabbits, foxes and time running along the top surface of this, making a spiral.  Time goes left to right, rabbits are in the vertical axis, and foxes are toward you in this orientation.

    Best orientation predator prey visualization

    Best orientation predator prey visualization

    And if...

    Read more »

  • Log #11: The making of our video

    Joan Horvath08/30/2017 at 04:40 0 comments

    We pulled together a few fun bits of video to make a prize video. It's posted in "Details,"  in the appropriate submission spot, and on YouTube of course, but we wanted to point out a few features.

    One of the fun things we realized was that our Log #1 accelerometer would turn green (show zero acceleration in x and y) if it was falling freely. We didn't want to drop our creation very far which meant that we needed a fast video. It turned out that an iPhone 6s in "slo mo" was perfectly fine for capturing the effect. (We dropped it just a few feet into a very big soft pillow - we don't recommend doing anything more drastic than that to your poor Circuit Playground and battery.) 

    We also felt validated that the objects really do make more sense when we can move them around and talk about them. We hope a lot of readers will make their own, which is even better than watching a video!

    One other note: the 3D printed piece showing x^3 versus x^2 curve (derivative and integral) has the two curves scaled differently from each other to make the shape of both curves clear. Scaling for these curves and avoiding unprintable pointy or very thin parts is proving to be tough! Another research area for us! 

  • Log #10: Now what?

    Joan Horvath08/17/2017 at 19:15 0 comments

    This project is a little different from many of the other Hackaday project, since we are not focused on building one thing, but rather on coming up with an approach to solve a problem that is made possible with technologies like 3D printing.

    Now that this has generated a lot of energy and interest, we have to stop and think where we will take it beyond this prize entry. A lot of people ask us if we have a "3D printing curriculum." By that they (usually) mean a few models they can download and plug into an existing curriculum.

    Although we appreciate that an incremental approach has its power (and our books support that approach) we think the thing to do now is to go back to our original thought: how can calculus in particular and math in general be taught differently if one starts with the "interesting stuff" and then gradually walks in the calculation part?

    Several people suggested we read "The Mathematicians Lament," by Paul Lockhart, (available in a variety of places depending on what online databases you have access to search on the title and name). Lockhart was (and apparently still is) a K-12 math teacher in New York. His premise is that if we taught art the way we teach math, the first few years would be all about creating the perfect brush stroke, and everyone would hate art.  He suggests finding ways to show the beauty and application of math first, and teaching the routine stuff later. We agree!

    As we have explored this space with this project so far, it has become clear to us that we need to teach calculus in a very different order than it normally is taught. Therefore, we will need to create a new end-to-end system of teaching (and learning) the subject, and we are currently thinking hard about what that system looks like and what it should include.

    Not everything has worked out. The "derivative machine" was more complex than expected, and so it violates our design rule that anything we put out there should be build-able by a good student or a time-pressed teacher. Rich is going to continue to tinker with it to see if a simple version might emerge, but as far as this project is concerned going forward we are going to focus on 3D printing and maybe a few more  Circuit Playground applications as a good lowest common denominator.

    How Far Can This Go?

    So, we see our challenge as finding a good way to lay out all of calculus (whatever that winds up meaning)  with physical intuition at its core. We have been gratified with how many people have encouraged us and made suggestions, in some cases getting quite energetic about it. 

    In the coming months we will be thinking about how to scale this, finding good groups to collaborate with, and seeing how far we can stretch the premise here. Can we usefully go beyond the PID example (in which everything is a function of time) to more-complex systems in which several things are varying at once? Can we use these parts to help us think about differential equations? Or should we be looking at how to start with these ideas and move back the other direction toward geometry, algebra, and the notorious algebra II?

    Stay tuned, and follow the project or contact us to keep in touch with its ultimate incarnation. Thanks for coming along for the ride so far!

    3D printed fundamental theorem models: sinusoids and exponentialsSinusoids and exponentials

  • Log #9: Example - PID controller

    Joan Horvath08/16/2017 at 01:35 0 comments

    Applying these ideas: a PID controller  

    At the beginning of our project, we talk about calculus as being useful to understand how things move and change.  Often we want to control how things move and change in a predictable way. One extremely common way of doing that is with a PID controller, which stands for “proportional-integral-derivative.”

    Historically these were analog devices, and now are algorithms, that attempt to control something to a set value by using a mix of the current value, its integral (the sum of its value for some period in the past, effectively a smoothed past value) and its derivative (how fast, and in what direction, it is changing).

    PID controllers are often correcting for some type of systematic error – friction, cooling, etc. They take data on some regular interval (“sampling”) and use how much that signal differs from a desired set value (the “error”) to send an adjustment to whatever it is they are measuring. For example, if something was trying to hold a temperature at 200 degrees and it measured 199 one sample ago and 201 now, the error one time step in the past would be -1 and now would be 1.

    However, it’s a little trickier than that. There is a finite delay as the signal propagates through the system from the controller’s output back to its input. Let’s say that this delay is 3 time samples, for the sake of illustration. Then the inputs to calculate the next error signal that the controller will use are taken at the array of times shown in the picture.

    Graph showing which time steps are used for each algorithmGraph showing which time steps are used for each algorithm

    The derivative term allows the controller to react to short-term errors that take the system too far away from its set point. The integral balances that out by essentially tracking any long-term systematic bias in the system, and correcting for it. If the terms are out of whack, a system might oscillate around or go unstable.

    To write is as a sort-of equation:

    Error (now, time=0) =         
          Error at the previous time sample (time = -1)

       + Kp * the error back one delay time ago  (time = -delay)

       + Ki * Integral of the error, based on a time range from the current time minus the delay back to as far back as the design accumulates (time = - delay back to whenever the controller turned on

        + Kd * Derivative, based on the signal value at times –delay and (–delay-1)

       + a modeled systematic outside error (a steady drift, sinusoidal noise, etc.)

    Kp, Ki, and Kd are constants that can be created semi-empirically or based on a model of the system being controlled evaluated at time step -1.

    PID controllers are everywhere, and have been around in some form or another for hundreds of years (for a history, see Christian Huygens created a mechanical predecessor around the same time that Newton was working on calculus -- a “centrifugal governor” to manage how much grain was milled by a windmill as the windspeed changed. Nicholas Minorsky is credited with being the first person to write down the relevant math in 1922.

    Numerical derivatives and integrals

    We thought it would be interesting to find a way to model and view a simulated PID controller. In our integral and derivative models so far, we’ve just used the equations for a curve and its integral and derivative, which we figured out the traditional algebraic way. However, here, we do not have an actual function, so we need to integrate and differentiate in a discrete way. We could have done our curve-and-its-differential/integral models that way too, and we will probably create a generalized version there too.

    At any rate, there are a lot of ways to do discrete derivatives (more usually called “finite differences”) and integrals. For now, we are using the most simple-minded way. That is,...

    Read more »

  • Log #8: Interlude - Community Feedback

    Joan Horvath08/15/2017 at 21:10 3 comments

    As we have gone along we have tried to get feedback from various constituencies: people who never took calculus but are curious, people who teach it, people who teach less-advanced math but are interested in adding in these concepts earlier, and so on.

    The first advice we got from people focused on the teaching aspect was that it would be too hard to support electronics, 3D printing, and other hands-on activities all in the service of a calculus class. The suggestion was to focus on just one thing and to be sure that the ideas made sense even if someone were just reading about the objects and seeing them in photographs. Otherwise we need to explain each technology used before getting into the calculus part, which admittedly can be a distraction. Our original approach, though (of making things a variety of ways) may still be a valid way to go for schools with an extensive makerspace, and we haven’t completely given up on that.

    We were grateful that Yue-Ting Siu, Assistant Professor in the Graduate College of Education at San Francisco State, took a look at some of our early models. Dr. Siu is interested in how best to teach the visually impaired. Obviously 3D prints work best for this constituency (compared to building electronics), and her suggestion was to thing about how to add gridlines and other orienting material to these plots. We are thinking about the best ways to do that within the resolution and surface finish limitations of a 3D printer, and without cluttering the models or making them confusing.

    Dr. Siu also suggested that we think about neurodiversity generally and consider how our approach might help other learners who are not served well by traditional education, beyond the visually impaired. As we note in the summary in the "Details" section, we are very interested in exploring this area further with others who have specific expertise.

  • Log #7: The Chain Rule

    Joan Horvath06/09/2017 at 01:02 0 comments

    We discovered that people were quite intrigued by our Fundamental Theorem models (Log #5) and decided we would make some more. We're going to be taking these to some events during the summer and getting more feedback, too.

    For now, we are just figuring out what a curve's derivative function is by calculating it using the algebra techniques taught in standard calculus, and then printing out the curve and its derivative at right angles to each other. But we're trying to figure out some good ways to derive some of these geometrically, too.

    What happens when you want to take the derivative of something more complicated than a function you can look up in a table of derivatives? The "chain rule" It more or less lets you break down a complicated function into a series of simpler ones.

    We will use ^ in what follows to show raising something to a power.

    Suppose we want to get the derivative of (sin(x) )^2 - that is, sin(x) * sin(x). Here's what it looks like: the function is the part that is vertical in the picture, and the derivative is the function pointing toward and away from you flat on the table. Or if you prefer the function is the part flat on the table, and its integral is the part sticking up from the table.

    Graph of sin(x) squared and its derivative, sin(x)cos(x)

    What the chain rule says is:

    • First figure out how the function is changing based on how a module of it is changing - here, let's say sin(x) - with respect to that module.
    • Then,figure out how that module (here, sin(x)) changes with x.
    • Multiply those two pieces together to get the change of the function overall.

    Let's do an example, finding the derivative of (sin(x))^2, that is, (sin(x)*sin(x)).

    • We can look up that the derivative of x^2 with respect to x is 2x.
    • So the derivative of (sin(x))^2 with respect to sin(x) is 2*sin(x).
    • Now for the second step we need the derivative of sin(x) with respect to x, since so far we've just figured out how our function changes with respect to sin(x). That is cos(x) -- again, we can look these things up in tables online or in books.
    • Finally multiply. The derivative of sin(x) squared = 2*sin(x)*cos(x), which we show in the picture above.

    We are thinking about a good way to show the steps of this process physically. Stay tuned! We've found that the chain rule inis credited to Leibnitz. Newton and Leibnitz created calculus at the same time, more or less, and fought over credit as long as Leibnitz was alive (Newton outlived him by quite a bit.)

    Newton developed the concepts geometrically, but Leibnitz came up with ways to use algebra to be able to do a lot of things faster. We think though that people can learn it in the first place better with geometrical reasoning. Can we reverse-engineer Leibnitz ideas to make them into geometry? That's our next project- wish us luck!

    More Curve-Derivative ( or Integral-Curve) pairs

    Meanwhile, we also did a few more pairs so we could more to play with and think about.

    Curve x^3 (laying flat on the table) and its derivative 3*x^2 (note, though, that because it was hard to see the shapes of the curves, we have scaled the two curves differently from each other to show the general shapes of the curves).

    Graph of x cubed and its derivative, x squared

    And here is the curve of ln(x) (facing you) and its derivative, 1/x.

    Curve of ln(x) in foreground, and its derivative 1/x (at right angles)

    We have had to take some care with scaling and where to start some of these curves. Obviously 1/x can't get too close to x=0, for example. And we've had a lot of experiments where we pushed it a bit too much. Here's an earlier example of the ln(x) and 1/x print. It was a little interesting to get this one off the platform. (Surface on the left was the bottom of the print.)

    We've been really pleased by all the energy we've seen around this idea, and we're working hard to figure out how much geometry-oriented material is needed to really jump-start someone into calculus, and whether some things (like the chain rule) should stay in algebraic form. Lots to think about!

  • Log #6: Sources

    Joan Horvath05/16/2017 at 20:04 0 comments

    We've been asked quite a bit about places to read more. We've gathered all of the interesting ones so far into one web page on our site, so that we can update it easily. Check it out at:

  • Log #5: The Fundamental Theorem in 3D!

    Joan Horvath05/16/2017 at 03:26 0 comments

    So far, we saw that derivatives measure the slope of a curve and tell us how fast things are changing along that curve. We also saw that an integral is just the area under a curve. One of Newton's big insights was that taking the derivative of a curve and finding the integral are what a mathematician would call an inverse operation- they undo each other, just like addition and subtraction. (Purists will note some details here where that is not quite true, but we will get to that later. There is a constant floating around we will need to deal with.)

    This insight goes by the grand name of The Fundamental Theorem Of Calculus. We spent some time thinking about how to show this in a hands-on way. We decided to do some specific examples.

    3D graph of straight line and parabola

    So if I started with a derivative, and integrated it, I would get back the original curve.

    If I started with an integral function and took its derivative, I would get back the original curve.

    We can look up in tables of integrals and derivatives (we will walk through some common examples in a later log) that the integral of a straight line is a parabola. Or to put it another way, the area under a straight line builds up in a way that turns out to be a parabola. The picture above shows this.

    Or, the slope (derivative) of a parabola is a straight line - the slope is negative when the parabola is headed downward to its minimum, and is positive when it is headed up.

    Thus, the 3D model above shows a curve and its integral, or a curve and its derivative, depending on which way you want to think about it. This curve could be printed flat, more or less like it is lying on the table here.

    Here is an animation (also done in OpenSCAD) of the integral of the area under the line building up as a parabola.

    animation of the integral under a line building up as a parabola

    Next, here is a sinusoidal case to think about. Sines and cosines are special in that their derivatives and integrals are other sinusoids, with some fussing around with the signs.

    If we think of the vertical curve as the original curve (say, a sine wave starting at 45 degrees) then the slope is the cosine wave shown in the horizontal curve.

    If we think of the horizontal (cosine) curve as the original curve, the vertical curve is its integral (sine). With sines and cosines, the signs flip with the integral so we have to be careful about orientation. Here's the animation:

    Sine and cosine waves, showing how one is the integral of the other

    We printed the sine and cosine waves here with the same amplitude, but if we were plotting sin(a*x), the derivative would be a*cos(ax), and the integral would be (-1/a) * cos (ax). To make it printable, we ignored this scaling (or you can think of it that we plotted the derivative and integrals with respect to a scaled and offset value.) This print was created vertically, with the side of the model on the left side of this picture on the platform. We used a brim to hold it down.

    Lastly, we decided to print a special function, the exponential. The function takes the number e (2.71...) and raises it to the power x, which we can write as e^x. Exponentials have the property that their integrals and derivatives are also exponentials, with some scaling factors thrown in for some cases. We decided to print that as four copies of the exponential- if you keep turning it , you can keep integrating or taking the derivative. It just repeats! (x =0 is at the top of the picture.)

    Exponential function - four copies, one on each axis (sort of looks like a rotor.)

    All these prints were created with a small OpenSCAD model which takes two functions and plots them at right angles to each other (with a bit of modification for the last model.) We will post this after we do a little cleanup.

    We have included two STLs for the fundamental theorem in "Files"- one for the sinusoids here (print vertically with a raft or brim for best results) and another for the squared/cubed pair (photo in log #7) , probably best printed by rotating it for max surface area contact with the platform.)

  • Log #4: Integrals: the Other Half of Calculus

    Joan Horvath05/04/2017 at 05:50 0 comments

    We have been talking about differential calculus- the study of how something is changing. There’s another half, though – called integral calculus. Loosely speaking, integral calculus is the process of reversing what you do with differential calculus. You can start with a derivative, and figure out what the original curve was. Think of it like addition and subtraction being inverses of each other. It’s just a little bit more complicated here.

    As you can see in the picture here, Joan had to party like it was 1979 with her old MIT Calculus 1 book to be sure what we're saying here is right... note the heavily-used eraser, which is always a key tool in algebraic calculus.

    Old, battred Calculus 1 text, a pad with scribbles, and a 3D print of a math function


    let's look at what an integral is. Most simply, in two dimensions it is a way of figuring out the area under a curve. Suppose we wanted to find the area under the curve from 1 to 2 on the horizontal axis. At point 1, the curve has the value A. At point 2, it is B. As 1 and 2 get closer together, a line drawn along the curve approximates the line more and more closely.

    Suppose we wanted to find the area under the curve between the two vertical arrows marked A and B. If the red line was EXACTLY the curve, then the area would be C times the average of A and B. As the distance C gets smaller and smaller, the red line gets closer and closer to being the same as the curve. We could use a rectangle of height equal to the average of heights A and B to get the same area as finding the area under the triangle plus rectangle we'd need to figure out otherwise. You can see the diagram of this from Newton's own copy of Principia.

    Suppose we also drew a line parallel to the red line. Newton found that you can always draw a line parallel to this line which is tangent to the curve. This is called the Mean Value Theorem. We will come back to that later when we talk about tying together integral and differential calculus.

    The Surface

    The surface we will use as an example here is called a swallowtail catastrophe. It is a surface that has some special properties that you can look into and think about a little based on what you know already, and we will use it as an example for more things to come.

    The basic swallowtail equation we used was

    f(x,y) = offset + ( x^5 + a * y * x^3 + b * x^2 + c * x ) / scale

    Where "x^5 " means multiply x times itself five times (or, if you prefer, raising x to the 5th power), " * " means multiply, and the height of the surface is a function of two other variables, x and y. a, b, c and d are constants, and a has to be negative. For the examples we show you here, a = -10, b = c = 1.

    Depending on how many data points there were, we needed to fuss around a bit with scaling and offsets so that the values of the function were always positive, since otherwise the bottom of the model would not have been a plane.

    Besides having a cool name, the swallowtail is a relationship that comes up often in nature for systems that are chaotic -- acutely sensitive to initial conditions. It was also the basis for Salvadore Dali's last painting, The Swallow's Tail. (Thanks go to our mathematician friend Niles Ritter, who did his PhD thesis on related mathematics and suggested it would be a fun surface to play around with in our endeavors. Everyone else uses a paraboloid- what fun is that?)

    First we will print this as smoothly as possible. It was printed with the equation printer in Chapter 1 of our 3D Printed Science Projects book; the OpenSCAD model is CC-SA-NC and available at the pubisher's repository at the same link. The surface is shown printed just in free space, and also as a surface covering a volume.

    Swallowtail function freestanding, and covering a volume over a plane.

    Volumes Under Surfaces

    If we can get an area under a curve, it's not surprising we can do the same thing to computer the volume under a surface. Suppose we wanted to try approximating a surface by a series of rectangular solids in three dimensions and get the volume under a surface by adding up the volume of each of these rectangles. We have demonstrated...

    Read more »

View all 13 project logs

  • 1
    Sensor pod from Log 1

    For the sensor pod introduced in Log 1:

    First obtain the battery and Adafruit Circuit Playground boards (as noted in the Components section.)

    Next, if you have never programmed an Arduino before, you will need to download the Arduino IDE (Integrated Development Environment.) A good way to do that is to use Adfruit's custom IDE, available at

    (If you are using Windows, you will need to install a driver first. See the Adafruit tutorial menu items for these downloads.)

    Next connect your Circuit Playground to your computer and get the board talking to your computer, as described in the linked tutorial.

    Once that is working, load the software from this repository onto your computer and then onto the Circuit Playground (see Adafruit tutorial for how to load software onto a board):

    When the software has loaded successfully (it should be turning red and green and beeping when red) you can disconnect your computer. Slide the Circuit Playground into the round area on the 3D printed cover (or if you don't have a cover, just keep it connected to your computer for now.) If you do have the battery or cover, align the Circuit Playground lights-outward into the round part, with the microUSB in the notch. Then slide the battery into its slot and connect the microUSB to lock it in. Turn it on and it should work.

    To create the case, 3D print the file at

    If you are using a different battery than the one recommended here, you will need to go into the OpenSCAD 3D printable model at the same link and change the dimension parameters. The model is designed in OpenSCAD, which you can download and get a manual for here:


  • 2
    Creating the 3D printable files in the integral/derivative logs

    In some cases, our 3D printable  files are derived from models in our books. If so, we have provided a link to our publisher's site, where these models are available for noncommercial use.  In other cases, for models developed here, we are providing a few representative STLs so that you can try them without necessarily learning OpenSCAD. 

View all instructions

Enjoy this project?



Tom Meehan wrote 09/05/2017 at 04:57 point

Keep up the great work, what you are doing is fantastic - making math make sense!

  Are you sure? yes | no

Joan Horvath wrote 09/05/2017 at 05:18 point

Thank you - all suggestions welcome! 

  Are you sure? yes | no

Morning.Star wrote 08/30/2017 at 06:58 point

Brilliant work, I love it. One of those damn, I wish I'd thought of that moments ;-))

  Are you sure? yes | no

Joan Horvath wrote 08/30/2017 at 14:42 point

Thank you!  We teach people how to use various maker technologies, and we realized that the algebra and theory need to come LAST (if at all) for many people, rather than "something you need someday."  I've found I learn a lot thinking about how to create these projects, and now the meta project is to capture THAT... :-)

  Are you sure? yes | no

dangerousfood wrote 05/02/2017 at 14:13 point

I love this project. I am of the mindset that calculus is introduced too late. Once people realize how accessible calculus actually it becomes much easier to learn. I was struggling in Cal 1 and it wasn't until I reached Calc 2 that my professor looked at me and said, "We're doing this to calculate the area under the curve.". I've since graduated with a BS in math but, if it wasn't for that small with held statement I would've been lost for much longer.

  Are you sure? yes | no

Joan Horvath wrote 05/02/2017 at 17:35 point

Thank you for the note. This project grows out of experiences just like that (both on the students and faculty side of the ah-ha moment). Some people flourish with symbols and work that way, some people don't.  But I think that is getting recognized more and more, and maybe we can help push it a bit here and beyond...  

  Are you sure? yes | no

technologiclee wrote 03/29/2017 at 03:55 point
I suggest designing a set of 3D printable cups of different shape and equal volume with the formula labeled on the side. Children could play with them at bath time and pour water from one cup to another and see intuitively that they hold the same amount. These could also be used as a hands on activity for science or math demonstrations. The simplest shapes would be a tall thin cylinder and a shorter and wider cylinder. Many other shapes can be used.

  Are you sure? yes | no

Joan Horvath wrote 03/29/2017 at 04:04 point

Thanks! Actually we did that very thing for our Hackaday project last year. This year we are thinking about the next level... Here's the constant-volume objects.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates