Lab 2

Writeup

For our second lab, we had to create our own cityscape by creating functions in BBEdit, each with its own set of variables and commands that would tell the "turtle" what to do. First, we limited our scene to one variable (dx), using multiples of that variable to design a building twice the size of the other. Then we got more complex, adding several other variables to control the scale, location, colors, and angles of our different buildings.

The parameters for each function I used were (x0, y0, dx, dy, angle, red, green, blue, dofill). The dx, dy, and angle parameters were used to control the scale of the buildings. The variables x0 and y0 were used to control the origin of the turtle, which I positioned so that each building lined up right next to each other. For extensions I experimented with different color values for the red, green, and blue parameters, enhancing a rather dull cityscape with an array of bright colors. I also used angles on my fifth building to explore a less conventional window pattern and add a roof to the building. Unfortunately the windows didn't come out exactly perfect, but I couldn't seem to figure out why. But I guess modern architecture doesn't have to be perfect, right?

Here are the two pictures: