My thought process was…hey, didn’t we already cover all of these concepts in labs? WE DID! SWEET! And then it was a mashing of code together on the environment lab. I originally wanted to texture each object separately, but when simply texturing them something different than the outer box was a huge hassle (probably done wrong) I thought, everything is coppery – perfect!
A hurdle that I encountered was trying to find free .obj files. One website was trying to sell a bonfire.obj for $30! That and neatly applying textures to individual objects. Couldn’t figure it out.
I would have made this beautiful, but it’s finals week and there are tests for which to be anxious.
]]>
First I needed to make a spiral,
for i to 5
for t in 0,30..360
x = 10 * cos t
y = 10 * sin t
z = 0.1 * (360 * i + t)
moveto x, y, z
end
end
Then I needed to be able to reverse down that same spiral to the beginning to start the second spiral.
for j in 4,3..0
for s in 360,330..0
x = 10 * cos s
y = 10 * sin s
z = 0.1 * (360 * j + s)
moveto x, y, z
end
end
Then I jumped over and made the second spiral.
for i through 4
for t in 0,30..360
x = 10 * cos (t + 180)
y = 10 * sin (t + 180)
z = 0.1 * (360 * i + t)
moveto x, y, z
end
end
I didn’t bother figuring out the reversing of this spiral, realizing I was going to alter my approach.
I knew I was going to be drawing at least some of the lines twice, so I altered the approach to a four step process:
Draw part of the first helix. Jump across to the other helix. Draw part of the second helix. Jump across to the other helix.
helix = 0
hc = 180
d = 10
for i through 4
for t in 0,30..360
if helix == 0
x = d * cos t
y = d * sin t
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos (t+hc)
y = d * sin (t+hc)
moveto x, y, z
helix = 1
else
x = d * cos (t + hc)
y = d * sin (t + hc)
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos t
y = d * sin t
moveto x, y, z
helix = 0
end
end
end

Once I completed that, I was at the top, and just needed to make my way back down while drawing the gaps in each helix, only duplicating the jumps across the helixes.
BOOM!
Final code:
helix = 0
hc = 180
d = 10
for i through 4
for t in 0,30..360
if helix == 0
x = d * cos t
y = d * sin t
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos (t+hc)
y = d * sin (t+hc)
moveto x, y, z
helix = 1
else
x = d * cos (t + hc)
y = d * sin (t + hc)
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos t
y = d * sin t
moveto x, y, z
helix = 0
end
end
end
helix = 0
for i in 4,3..0
for t in 360,330..0
if helix == 0
x = d * cos t
y = d * sin t
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos (t+hc)
y = d * sin (t+hc)
moveto x, y, z
helix = 1
else
x = d * cos (t + hc)
y = d * sin (t + hc)
z = 0.1 * (360 * i + t)
moveto x, y, z
x = d * cos t
y = d * sin t
moveto x, y, z
helix = 0
end
end
end
nsides = 10
tube
The only hurdles I faced were my limitations in geometry. I had to walk away from the computer many times…
The only bugs I faced were:
Hitting “fit” button multiple times would make it switch between actually fitting, a blank screen, and a screen with strange dark pixels
Adding comments will make the code not work. (Particularly after an else statement and on its own line.)
I kept playing with the program making stupid things…
The useless hammer:
Worthwhile hammer:
Mjolnir:
]]>

My thought process was: copy and paste CJ’s code and then try to get rid of the obvious errors. That was an easy first step. Next it was figuring out what was missing. I didn’t realize until after getting the magnets on the screen that although my code didn’t have errors, it didn’t work. Hours later…it still didn’t work.
My greatest hurdle was getting the Initialize and Draw methods working. I couldn’t wrap my head around them and there wasn’t anything in the instructions for me to base it off of. Also, the matrix multiplication math was over my head, and required a lot of guess and checking. Minor hurdles were everywhere.
]]>
I am simply awful at understanding directions without a frame of reference. I initially attempted to simply fumble my way through the instructions with the intention of fixing everything later. This turned into more of a mess than necessary.
The energy equation was easy to figure out, as was finding the WritePPM online. The greatest difficulty was figuring out where the math was wrong generating INF errors…and it was simply a lack of casting error.
I like moving around a random color generator around the for loops for rows and columns for prettiness’s sake.
]]>
-Schuh
]]>