# teaching machines

## FELLOMNK – HW4

May 6, 2015 by . Filed under cs455, postmortems, spring 2015.

Ha! I beat David! My life is complete. Anyway, I figured I’d get this done so it’s one less thing to worry about. Here was my thought process:

“Man, I’m really not creative. Let’s look at good ol’ Google to see what cool looking shapes there are.”

“Wow, look at all this cool stuff!”

“I don’t know how to do any of this.”

“Ooo, here’s something I might be able to do.”

“Nope.”

(After about an hour of looking)

“Maybe this one…???”

“Hey, I’m doing it!”

And so this is how my model came into being. Here is an image of it without any cool stuff going on:

The code is as follows –

moveto 0,0,0
offset = 2
round = 0
repeat 8
repeat 2
move 62 – (offset * round)
yaw 60
move 30 – (offset * round)
yaw 60
move 32 – (offset * round)
yaw 60
move 30
yaw -60
move 2 + (offset * round)
yaw -60
move 0 + (offset * round)
yaw -60
move 32 + (offset * round)
yaw -60
move 32 – (offset * round)
yaw 120
move 30 – (offset * 2 * round)
yaw 60
move 32 – (offset * round)
yaw 60
end
yaw 60
move offset
yaw -60
round = 1 + round
end

nsides = 6
tube

Then, I wondered if I could make it look cooler by adding more of a third dimension to it. Here are the results:

To achieve this, I added the following after I move by the offset in the inner loop:

if round < 7
pitch -90
move offset
pitch -90
end

I also thought it would be cool to do one where it is getting bigger in both directions, so I added this where I would have originally just moved by the offset above:

if round % 2 == 0
move (offset * round)
else
move -(offset * round)
end

And this was the result.