# teaching machines

## Honors 104.502 Lecture 2 – Making Objects

### Agenda

• what ?s
• design this
• modeling as a group

### TODO

• Write a Madeup program (accessible at madeup.xyz) to create some kind of container or bowl. You’ll need a modern browser, one that supports WebGL. Instead of a 1/4 sheet, email me a screenshot of the Madeup editor and 3D canvas showing your model.

### Note

Today we start with a brief discussion of your reading. Since our goal this first week is to get a taste of programming, we’ll jump into a little exercise to help us think about process:

1. On your own, take your pipe cleaner and bend it into some interesting path or shape.
2. With a neighbor, write down a Madeup program that traces your path. Use move, moveto, yaw, pitch, or roll. Use loops, variables, or math if they help. Recall the grammar we’ve seen so far:
moveto x, y, z
move length
yaw degrees
roll degrees
pitch degrees
repeat n
-- some repeated step
end


We’ll spend the rest of our time making some objects together:

• a Mayan temple
• a rupee
• a voxel snake segment

### Code

#### zigzag.mup

moveto 0, 0, 0

x = 0
y = 0

repeat 10
moveto x, 0, 0
x = x + 1

moveto x, 2, 0
x = x + 1
end

dowel

#### voxel_segment.mup

.radius = 5
length = 10

moveto 0, 0, 0
move length
pitch 90
move length
pitch 90
move length
yaw -90
move length
yaw -90
move length
pitch 90
move length
pitch 90
move length
yaw -90
move length

dowel

#### pyramid.mup

moveto 0, 0, 0
yaw 90

repeat 10
move 13
yaw 90
move 7
yaw -90
end

moveto 0, -70, 0

revolve 0, 1, 0, 360