Preston Decker's Sixth CS151 Homework
Preston Decker's Sixth CS151 Homework
Explanations
1.Our task was to use the Zelle Graphics package to create a
cityscape complete with animation and multiple buildings.
1.5 First of all, I just want to note that I tried to use the gift package
to get the animation on the screen but failed, so I uploaded a screenshot
instead. If you haven't graded this by the end of break, I m going to ask if you
can help me with the city.gnf. I think I was close b/c I got the file, but the
file did not work.
2. The code I used for this lab largely originally came from our lab this
week, I performed modifications on it. For loops are used in the code for many
things, including creating loops that allow the 'earthquake' to run through
multiple random events, as well as to allow the creation of multiple clones. A
For loop also limited the amount of times that the random cycle would apply
to the black building's windows lights when the screen was clicked on,
eventually the for loop ran out, and the window closed.Within the building code,
append was used frequently to attach various objects to buildings. x0,y0,dx
Parameritization was used in order to allow these attachments to buildings to
remain with the buldings if they moved. Within the windows function, for loops
allowed the user to change the amount of windows shown in each building.
As far as objects go, the rectangle object was used for the buildings,
the line object created the diagonal line in the blue building, the circle
object created the black knoblike object in the door created by the oval object
in the blue building. The text object created the statement in the corner
concerning blessed vacation. Finally, the Polygon function was used to make the
tops of buildings.
I need to thank Mac Simpson and others for help and code for this
project.

