---
title: 'Madeup and Calculus'
url: 'https://blog.recursiveprocess.com/2015/10/15/madeup-and-calculus'
markdown: 'https://blog.recursiveprocess.com/2015/10/15/madeup-and-calculus.md'
date: '2015-10-15'
description: "The madeup language for creating 3d models came out a week ago for the kickstarter backers. There is more information about the computer programming language found at\_the kickstarter page. It’s been a lot of fun to play with but looking at it through the lens of being able to create calculus …"
taxonomy:
  category:
    - blog
---

# Madeup and Calculus

### [Madeup and Calculus](https://blog.recursiveprocess.com/2015/10/15/madeup-and-calculus)

   October 15, 2015, 12:00 am  

The **madeup language** for creating 3d models came out a week ago for the kickstarter backers. There is more information about the computer programming language found at [the kickstarter page](https://www.kickstarter.com/projects/1975355456/madeup-a-programming-language-for-3-d-models). It’s been a lot of fun to play with but looking at it through the lens of being able to create calculus 3d solids has been really exciting.

## Rotational Volumes

Here is the code to sketch out this 2d shape on the x-y plane and rotate it around the x-axis:
![Screenshot 2015-10-09 at 2.10.41 PM](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/Screenshot-2015-10-09-at-2.10.41-PM.png)

```
to func x
    out = -1 * (x - 1)^2 + 5
    out
end

moveto 0,0,0
x = 0
xmax = 3.0
numPoints = 100

while (x < xmax)
    out = func(x)
    moveto x,out,0
    x = x + xmax//numPoints
end

moveto xmax,0,0
moveto 0,0,0

nsides = 100
revolve 1,0,0,270
```

When you click the solidify you get this 3d shape (only rotated 3/4 of the way around for sake of visulization):
![Screenshot 2015-10-09 at 2.04.11 PM](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/Screenshot-2015-10-09-at-2.04.11-PM.png)

Here’s the magic step. Click **Download** and open the .obj file with your 3d printer software and hit print:

[![IMG_1866 (1)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/IMG_1866-1-1024x768.jpg)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/IMG_1866-1.jpg)

Want to rotate around the y-axis instead and practice shells? No problem.

[![2015-10-15_08h47_13](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-15_08h47_13.png)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-15_08h47_13.png)

And print!

[![IMG_1906](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/IMG_1906-e1444913431338-1024x985.jpg)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/IMG_1906-e1444913431338.jpg)

## Cross-sectional Volumes

The AP (but not the IB) curriculum has students find the volume of a solid created by extruding out a known cross-section from a given area. For instance, on the 2010 AP Calculus AB exam, they asked the following question, zone in on part (c):
![Screenshot 2015-10-09 at 1.33.40 PM](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/Screenshot-2015-10-09-at-1.33.40-PM.png)
This type of question is difficult for students to visualize. Madeup can make some great models (that can be printed) for the students. While I think the programming is tricky enough that I wouldn’t encourage you to bring the code directly to novices; it is pretty clean and easy to modify. For example: take the same area as above and find the volume by taking cross sectional squares with one side on the xy plane and perpendicular to the x-axis.

In the madeup world, the code looks like this:

```
to func x
    out = x ^ 0.5 + 1
    out
end

moveto 0,0,0
x = 0
xmax = 3
numRect = 14

while (x < xmax)
    out = func(x)
    moveto x,out,0
    moveto x + xmax//numRect,out,0
    moveto x + xmax//numRect,0,0
    moveto x,0,0
    x = x + xmax//numRect
    extrude 0,0,1,out
end

moveto xmax,0,0
moveto 0,0,0

```

When you hit the extrude button, it takes the 14 rectangle slices and brings it up the z-axis to make a square. The result is the 3d shape:

[![2015-10-13_09h02_28](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_28.png)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_28.png)

Here’s the shape (approximated) with 4 rectangles:

[![2015-10-13_09h02_18](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_18.png)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_18.png)

And here’s the shape with 100 rectangles:

[![2015-10-13_09h02_41](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_41.png)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/2015-10-13_09h02_41.png)

Print!

[![FullSizeRender](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/FullSizeRender-1024x765.jpg)](https://blog.recursiveprocess.com/wp-content/uploads/2015/10/FullSizeRender.jpg)

Enjoy! As always, please fire away with questions/comments/etc.

 [ Next Post](https://blog.recursiveprocess.com/2015/10/15/visualization-of-a-function-through-time) [Previous Post ](https://blog.recursiveprocess.com/2015/09/29/programming-and-anna-weltmans-this-is-not-a-math-book-and-dan-meyers-contest)

#### SimpleSearch

Bootstrap Theme for [Grav](http://getgrav.org)

---

## Navigation

- Parent: [A Recursive Process](https://blog.recursiveprocess.com/index.md)
- Previous: [Visualization of a Function Through Time](https://blog.recursiveprocess.com/2015/10/15/visualization-of-a-function-through-time.md)
- Next: [Programming and Anna Weltman’s This Is Not A Math Book and Dan Meyer’s Contest](https://blog.recursiveprocess.com/2015/09/29/programming-and-anna-weltmans-this-is-not-a-math-book-and-dan-meyers-contest.md)
