Objectives

Upon completing this assignment, you will be able to:

Description

In this assignment, you will create a drawing program. This program is required to do the following three things:

  1. As the user moves the mouse, shapes appear on the screen following the trail of the user's mouse movement. These shapes may simply accrue over the course of the program; in any case, they must stay on the screen for at least 2 frames.
  2. The speed of the mouse movement continuously alters some attribute of the drawing, for example the size of the shapes.
  3. When the user presses the mouse button, the color used to draw changes. It does not change between mouse presses.

You should note that the term 'drawing program' is intended loosely here. You may implement any form of interaction that meets these three requirements, and are encouraged to think creatively about what kind of shapes you choose to use, how these follow the user's mouse movements, how speed changes the drawing, and how you select new color choices.

Instructions

You may proceed in any way that you wish to accomplish the requirements of this assignment. We strongly recommend proceeding step by step to design the program, making a working program that fulfills the first requirement (and saving a scratch copy of it) before going on to add the second and third requirements. In each case, start simply, and debug as you go along until you have achieved each requirement. If you decide you want a complex interaction, we strongly recommend making a simple version first that fulfills all requirements so you'll have a back-up in case your more ambitious program turns out to be too hard.

Grading scheme

A+ - All required elements included, plus an interesting and creative approach to fulfilling the assignment requirements.

A - All required elements included and functioning correctly. Mouse movement clearly controls trail in some fashion, and speed and mouse presses lead to clear changes in the program behavior.

B - Competent response to the assignment, with some small errors that do not greatly affect the quality of the assignment (for example, shapes do not accumulate, or code is improperly formatted).

C - Some bigger errors, but with potential to develop into a competent response. For example, the code may not run, but with a few small syntactical fixes would properly fulfill the assignment; the code may work but not be comprehensibly written; or the code completely misses on one of the requirements, but still shows some understanding of the unit's material.

D - Serious errors show clear effort, but serious gaps in understanding, such as code that does not run and is not close to being correct, or fulfills only one of the requirements.

F - Little demonstrated effort, or clear effort with no understanding, such as code fragments submitted which are only the start of a response to the assignment.