CS 110 (Introduction to Computing)

Spring 2012

Assignment #3

Due by 12 midnight on Wednesday, February 15, 2012

Task: Design a sketch of your choice. Write functions to draw iconic shapes that will be in your scene. Your functions should take these parameters: an x and a y that define the starting location (center or corner) of the shape, and a scale factor (or two if you wish to scale in both x and y directions independently). You may wish to add additional parameter for color, fill, stroke, etc. Function-drawn shapes should draw properly no matter where on screen, and what scale factor is used.

Design at least two complex shapes that are drawn via functions. You should use at least one function per shape, but possibly more as it is advisable to build complex shapes from simpler basic shapes, which are drawn via simpler functions. For example, if you decide to write a function to draw the Park Science Building (or any building), it will probably be a good idea to have a function that draws a window with parameterized location and size, and probably more for such things as the roof, the doors, etc. For each complex shape, show variations of location/size of the shape via multiple function calls.

Requirements:

Extra Credit:

Carefully read the Assignment Submission Policy for how to submit your assignment.