Alyssa's Week 2 Assignment

Project 2: Turtle Graphics

By: Alyssa Belisle

19 February 2008

Task 1

The first task was to create a python file, cityshapes.py, where both turtle and turtleUtils were to be imported and implemented. In this file, the task was to create a building function that would only have one parameter, dx. Then other functions were to be made to add to the detail of the building, ie doors, windows, roofs, etc. However, the whole idea of this file was to parameterize all functions in terms of dx. Therefore, for any dx value called into the building function, similar buildings will be created. Then, by importing the cityshapes.py file into another python file, scene1.py, the building function can be called with only one parameter. The function is called twice and two buildings, one half the size of the other, are drawn by the turtle.

See Scene 1!!!

Task 2

The second task was to create a cityscape with five or more buildings using the previously defined functions from the first task. Extensions could be added to this second scene such as more windows, different types of buildings and other such things found in a cityscape. Once both the scenes were created, screen captures were to be taken and web pages and links were to be created for viewing on the World Wide Web.

See Scene 2!!!

Descriptions

I parameterized my building function in the first scene by dx only. It was the vertical side of my building that was set equal to dx. Then all the of the other sides of the building and all the values of the other functions were in terms of dx. However, in the second scene I added many parameters to all of my functions in order to help position the turtle as well as add color and fill to my cityscape. In the second scene I also created many new functions in order to create different shaped windows, domes, letters, and a background with a sun.

Back to homepage