CS 110 Lab Project 1
In this lab, you will practice graphics and lots of function/method invocation in Python.
Step 1: Sketching a picture
From your NextClass Assignment 3, you should have already completed this step: a draft of the picture you are going to create using Python and the graphics library. The picture must consist of any combination of lines, rectangles, circles, ovals, text, and polygons but should be made entirely by hand (i.e., not made by a computer program). The picture should have at least twenty of the above shapes (though more is always better), using at least one of each of the base objects in the graphics library. It will help to have some notion of the scale, in pixels, of the overall picture, and of the objects that you are placing withing the picture. Target a canvas size of around 640 by 480.The sketch should be on graph paper and should indicate the scale (pixels per 1/4 inch, for instance) as well as the (x,y) coordinates of the major objects in the picture.
Here are some examples made by earlier students in this
course:
Step 2: Rendering the picture
You should practice familiarity with graphical objects in Python by drawing your hand-drawn paper using graphical objects in Calico Python. Put your Python program that draws your picture in a file called Picture.py. To repeat a collection of objects on different parts of the screen, think of how you might do this using functions, with parameters to govern where on the canvas a repeatable set of steps should be placed.Refer to the following link (or to your handout) to see how to use the different graphical objects available to you: http://calicoproject.org/Calico_Graphics. Focus on the subsections documenting the various Shapes available to you.
You can get a screen capture of your picture using the Grab utility (you can find this under Applications -> Utilities) and save it as tiff file.
Grading Criteria
I will use the following factors when grading this assignment:- Draft completed well, on graph paper, and demonstrating forethought and design. Note that the end product may have changed considerably from the initial design. This is to be expected and will _not_ lose points.
- Style / Creativity
- Complexity
- Programming
- Use and naming of variables
- Good comments
- Simple functions
Submitting your lab
Make sure that all your work for this lab is in a folder called lab01. Copy this folder into your Assignment Inbox personal folder on the shared drives by the deadline.Please make sure that your lab01 directory has the following files:
-
Picture.py
-
your picture tiff