Write up for Project 6: Cityscape Take 2

Description

For this project, we were to re-create our cityscapes that were drawn with Turtle graphics with the Zelle graphics package instead. We were to incorperate each of the graphic objects (except for "entry") and to animate some aspect of the scene. One file was to contain only definitions (no top level code) and the other was to import each of the functions defined to draw the city.

The Scene

Explanation


I used loops to create the windows in each building and randomized loops to draw the stars individually in the sky. Randomized loops also run both the animation for the twinkling stars and the blinking lights in the buildings. Each of the buildings and the trees can be parameterized to be moved around the scene and to change the scale (the yield signs are not, but that is because I didn't realize I was going to add another sign until the very end!).

Zelle Graphics Objects


POINT- used in every object to draw it
CIRCLE- moon
RECTANGLE- buildings, trunk of tree, pole on sign, cross street
OVAL- "dome" on top of blue building
POLYGON- main street, signs
TEXT- "YIELD" on main street

Extensions


-Both the stars and the windows are animated.
-The buildings are fully parameterized and adjustable
-Randomness is used and looped to create a fairly realistic starry sky and to turn the windows off arbitrarily instead of mechanically one at a time.