teaching machines

SIGCSE 2017: Towards Computational Making with Madeup

March 11, 2017 by . Filed under madeup, public, talks.

I’m presenting Madeup at SIGCSE 2017 in Seattle, and I offer below the manuscript of my talk.

Introduction

Madeup is a tool I began building in 2013 in order to study and teach the algorithms of everyday objects. It’s a language for making things up—things that live in 3D space, things that I could print on a 3D printer. It’s also a language for introducing computer science to people who have themselves navigated around in space and know what it means to turn and move—basically, anyone with a body.

Our goal today is to demonstrate the language and discuss how we might use it and 3D printing to introduce computer science to young learners. The language is very much still in its infancy, and I welcome your feedback.

Demonstration

Let’s start with some examples. Madeup is very much modeled after Logo, which allowed learners to use differential or turtle geometry commands to trace out interesting 2D paths. The learners felt like they were in the cockpit of a turtle, giving commands to move relative to the turtle’s current heading and position. Seymour Papert called this “body syntonic” learning. When your whole body can empathize with the computer, a loving relationship unfolds. Like how we love our horses. Or bicycles. Or cars. Hopefully one of those resonated with you.

Madeup builds on body syntonism too, but takes it into the third dimension. Let’s have a look. I’m afraid we don’t have enough time to make this a tutorial, so I will zip through these more quickly than I want to.

Box

Our first step in a Madeup program is to be born at some location in 3D space. For that, we use the moveto command. In Madeup, we don’t visit every little corner of our model. We visit a representive core like a center point or a cross section, and then use a solidifier to thicken it to three dimensions. The simplest solidifier is box.

Once established in space, we can use turtle geometry commands to move around and visit other locations. Since we’re in 3D, turning is a little more involved. We use the aeronautical terms yaw, pitch, and roll to specify what kind of turn we want. Let’s move to a corner and plop down another box. But instead of adding this new box on to the existing one, let’s carve it away from the first box:



moveto 0, 0, 0
a = box

yaw 45
pitch -37
move 1
b = box

a - b

var mupDiv = jQuery('#mup_blocks');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_blocks').submit();

moveto 0, 0, 0
a = box

yaw 45
pitch -37
move 1
b = box

a - b



Somehow my children are able to discuss Minecraft with their classmates. How they keep up in these conversations baffles me, because we do not play it at home. I think all their information comes from books. That’s not entirely true, I suppose, because we have written some code to convert Minecraft structures into Madeup programs. We built this little swimming pool in a summer school program for 1st through 5th graders:

We then used our Minecraft plugin to convert it to a Madeup program using the box solidifier. We exported the model and we printed it. I’m afraid I don’t have a printed model here to show you, because I was mugged by the students.

Dowel

Boxes are simple, so let’s look at something a little more algorithmic. Logo folks like to start off with a square and then work their way up to a circle approximated via many short line segments. Let’s just jump right into modeling a chain link, which is kind of like a circle with two of its approximating segments stretched out.



height = 8
n = 20
chord = 0.7
angle = 180 // n

moveto 0, 0, 0

repeat 2
move height
repeat n
yaw angle
around
move chord
end
end

nsides = 10
dowel

mupDiv.closest('pre').replaceWith(mupDiv);

height = 8
n = 20
chord = 0.7
angle = 180 // n

moveto 0, 0, 0

repeat 2
move height
repeat n
yaw angle
around
move chord
end
end

nsides = 10
dowel



Here we have traced out the central axis of an object. We thicken it using the dowel solidifier. The number of facets on the dowel is determined by a builtin variable named nsides.

I found that the spatial domain involves a lot of loop-and-a-half or fencepost problems, so I added a loop structure to express such formulations.

Extrude

One of my goals with Madeup is to enable young people to see algorithms in the world around them. I’m afraid we don’t have numbers for you yet to tell you how we’re doing on that, but I can share this. I was at Aladdin’s restaurant in South Bend, Indiana, when my seven-year-old son and I saw some wall paper with a repeating geometric shape. I said to him, “I bet we could model that in Madeup.” The next morning, he sat down and coded this up with no help from me:



moveto 0, 0, 0

repeat 8
move 1
yaw -45
move 1
yaw 90
end

extrude 0, 0, 1, 2

var mupDiv = jQuery('#mup_star');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_star').submit();

moveto 0, 0, 0

repeat 8
move 1
yaw -45
move 1
yaw 90
end

extrude 0, 0, 1, 2



That’s what was on the wall. He didn’t make any mistakes when he wrote this, which kind of bothers me. He had worked the angles out in his head and didn’t need the visual feedback that Madeup provides.

Here’s a slightly more complicated example that achieves something similar, but uses polar coordinates and the mod operator to get the sawtooth pattern. It also adds in some color:



.rgb = {1, 0.3, 0}

for i through 24
angle = i * 15
radius = if i % 2 == 0 then 10 else 7
x = radius * cos angle
y = radius * sin angle
moveto x, y, 0
end

extrude 0, 0, 1, 3

.rgb = {1, 1, 0}
nsides = 50
moveto 0, 0, 3
moveto 0, 0, 3.5
dowel

var mupDiv = jQuery('#mup_sun');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_sun').submit();

.rgb = {1, 0.3, 0}

for i through 24
angle = i * 15
radius = if i % 2 == 0 then 10 else 7
x = radius * cos angle
y = radius * sin angle
moveto x, y, 0
end

extrude 0, 0, 1, 3

.rgb = {1, 1, 0}
nsides = 50
moveto 0, 0, 3
moveto 0, 0, 3.5
dowel



Revolve

Let’s look at one more example of modeling El Castillo, a pyramid from the Mayan city Chichen Itza in Mexico.



.rgb = {1, 0.5, 0}
yaw 90

moveto 0, 0, 0
repeat 10
move 1
yaw 90
move 1
yaw -90
end
moveto 0, -10, 0
revolve 0, 1, 0, 360

moveto 1.4, -1, -0.5
repeat 36
move 0.21
yaw 90
move 0.25
yaw -90
end
moveto 1.4, -10, -0.5
stairs = extrude 0, 0, 1, 1

rotate 0, 1, 0, 45
repeat 4
transform stairs
rotate 0, 1, 0, 90
end

var mupDiv = jQuery('#mup_pyramid');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_pyramid').submit();

.rgb = {1, 0.5, 0}
yaw 90

moveto 0, 0, 0
repeat 10
move 1
yaw 90
move 1
yaw -90
end
moveto 0, -10, 0
revolve 0, 1, 0, 360

moveto 1.4, -1, -0.5
repeat 36
move 0.21
yaw 90
move 0.25
yaw -90
end
moveto 1.4, -10, -0.5
stairs = extrude 0, 0, 1, 1

rotate 0, 1, 0, 45
repeat 4
transform stairs
rotate 0, 1, 0, 90
end



Questions

We’ve been building and using Madeup for several years now. We’ve done outreaches for Hour of Code and school visits to our campus, workshops at our public library, and summer camps. I’ve used Madeup in several introductory classes. I’ve got some anecdotes about how these have gone, but progress is slow and we are only just getting to a level of stability where we can begin more formal evaluation. Since we are still in the formative stage of development, I have fewer answers than questions, so I’d like to put a few to you:

• What outcomes would you as a computer science educator like to measure in order to evaluate Madeup as a computer science learning tool?
• We have a multitude of excellent learning environments for creating digital artifacts. What role do you believe tools for creating physical artifacts have in computer science education?
• What exactly happened to Logo? It surged in the 1980s, and then faded away—though its ideas live on.
• Schools and libraries are building makerspaces. What sort of learning happens in these or should happen in these?