]]>
Code:
moveto 0, 0, 0
scale 0.3, 0.3, 0.3
repeat 20
move -2
yaw -5
end
repeat 5
move 2
yaw 50
move -2
yaw -45
end
revolve 0, 1, 0, 360
radius = 0.5
move 5
yaw -105
move 20
move -20
yaw 90
pitch 45
move 25
pitch -45
yaw -90
move 20
repeat 2
move -20
yaw 90
pitch -45
move 25
pitch -45
yaw -90
move 20
end
tube
For these next two, I originally wanted to make a bracelet of pentagons, but once I started on that, it turned into a spiral of hexagons. It was difficult getting the hexagons to string together at the right place without it looking a bit funny, but once I figured out all of the right commands it was pretty straightforward. One just a bit tighter than the other, but I thought they were both pretty cool looking.
Code:
moveto 0, 0, 0
repeat 6
yaw 60
move 5
end
nsides = 30
repeat 30
repeat 3
yaw 60
move 5
end
pitch 30
yaw -60
yaw -58
repeat 4
move 5
yaw 60
end
move 5
end
yaw 60
move 5
tube
Code:
moveto 0, 0, 0
repeat 6
yaw 60
move 5
end
repeat 2
move -5
yaw -60
end
nsides = 30
repeat 30
repeat 4
yaw 60
move 5
end
pitch 30
yaw -60
yaw -58
repeat 4
move 5
yaw 60
end
move 5
end
yaw 60
move 5
tube
]]>
I began by construction the Image class, and then moved on to writing the main and creating the loops and equations needed to generate the dots. The most difficult part for me in this assignment was wrapping my head around storing the rgb values in a 1-d array. Once I figured that out, the rest was pretty straightforward!
]]>
]]>