CS 111 - Program Design I, Spring 2018

Project 1 - A Turtle Drawing

Due: Monday 2/19/2018 at 11:59 pm

For this project, we will want to use the Turtle class to draw a large multifaceted geometrical shape onto a picture. These modifications are to add "something" to the image. Normally this would be to draw something in the foreground of an image that is just a scene. Examples of such drawing can be shown by these examples or these examples.

The objectives of this assignment are to have you define your own python functions to add to the basic behavior of the Turtles in JES. You will write python functions with multiple parameters. You will then write a main function in python called main() to call on those python functions to draw connected multifaceted geometrical shapes that you have designed.

Requirements

  1. Design the shapes you want drawn. You should have a minimum of 10 different shapes (that could be connected) to create a large multifaceted shape -- a building for example. Note that drawing two squares count as "two different shapes".

  2. Write a Python program that does the following in a function called main(). Your Python program is to be in a file named using your own NetId followed by proj1. If your NetId was ptroy1, the file should be named: ptroy1proj1.py
    1. Creates a Picture for the turtles (prompt the user for the filename)
    2. Creates at least two Turtles in the Picture
    3. Uses variables to keep track of pen colors, shape lengths. These "variables" could be method parameters.
    4. Calls functions on each of the two Turtles to create a multifaceted geometrical shapes on the Picture. For example, you could draw multiple cabins in a beach picture along with sea stars or draw a blueprint of your dream home.
    5. Moves the turtles to different locations in the Picture and changes their orientation in order to draw the shapes as desired.
    6. Draws shapes by changing the default behavior of each JES Turtle. For example, you can change the color and thickness of the pen used in drawing the shapes.
    7. Saves the final picture drawn to the computer.

  1. Define and write multiple functions to draw shapes using the turtles. At a minimum, you must include the following 5 functions:
    1. A function to draw a rectangle of a specified width and height (e.g., the Turtle can be asked to draw rectangles of different dimensions by a call to the same method)
    2. A function to draw a hexagon of a specified length and color (e.g., the Turtle can be asked to draw hexagon of different lengths and colors).
    3. Three other functions to draw shapes of your own choosing. All functions must be flexible to allow the shape to be drawn in different sizes, or line thickness, or pen color.
Project Collaboration

You are allowed to receive help on this project from other students who are also taking CS 111. Each student must still complete and submit his/her own project. You will be required to include a Collaboration Statement somewhere on your project if you receive help. This statement can simply be something like the following:

For this project, I received help from the following member of CS 111.
  • Devang Jariwala, netID: djariw1
  • Shun Liang, netID: sliang2
  • Hongwei Zhu, netID: hzhu7

This statement should list each helping student's name in a comment in the "header comment" of your Python file that includes your main() function.

This project is to be written using good programming style. Elements of good programming style include:

  • Meaningful Variable Names
  • Proper Indentation of Code
  • Blank Lines between Code Sections
  • Use of Methods
  • In-Line Commenting
  • Header Comment for the File
  • Header Comments for each Method.

Submission of your Project

You must electronically submit all of your files (all .py files, any image files and any other files used) via the Information Link for Programming Project 1 in Blackboard. Note that each student is only expected to submit 1 .py file and 1 .jpg file.

This project was modified from project by Dr. Alvaro Monge for CECS-174 at CSULB.

CS 111 Home Page
Department of Computer Science
University of Illinois at Chicago

Topic revision: r2 - 2018-02-15 - 20:46:26 - Main.troy
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF