Program 3

Objective

The objective of this assignment is for you to make your previously mostly static sketch become an animation. Your prior program should have had some "interaction" which for most was probably drawing something at the cursor location. For this assignment your program will need to change over time, without any user interaction (although user interaction is also good). This will be done with the use of one or more user defined variables that get modified as the program runs and if-statements.

You will also be encouraged to make use of two additional standard Processing functions, translate() and rotate() that give you more freedom in the kinds of images and animations you can create.

Finally, you will get further practice with using variables to create an easy to understand, easy to modify program.

Program Specification

You may extend your program 2 drawing or start an entirely new drawing. If you do extend program 2, be sure and read "Giving Credit Where Credit Is Due." Creating an entirely new drawing is recommended. With the addition of translate(), rotate(), if-statement, and variables, you should now be able to create more complex and interesting sketches/programs, without having the program itself be complex and confusing.

Your program should have very few "magic numbers." The examples in the first 3 chapters of the text are filled with magic numbers - literals like 119 and 160 (see example 2-1 from the text). These make the program hard to modify and hard to understand. Although the textbook author has not eliminated all magic numbers in the early chapters, he has removed many. For example, the use of zoogX and zoogY in example 4-8.

Your program must include several examples of variables that control the placement or size of one or more objects so that simply changing the value of the variable moves or resizes the object (be sure and test this - remember the car example from class when I first tried to change the size). At least one of those user defined variables (i.e. not the system variables such as mouseX) must change with time so that your static sketch becomes an animation.

Ideally a program should have no magic numbers. For example, again in example 4-8 from the text you could declare two additional variables to eliminate the magic numbers 16 and 32:
int eyeWidth = 16;
int eyeHeight = 32;
Or better yet:
int eyeWidth = 16;
int eyeHeight = 2*eyeWidth;

Your program must also include at least one if-statement. For full credit you should make some use of translate and/or rotate.

What To Turn In

You will be submitting your program source file (.pde) in CrowdGrader.

The link for the assignment in CrowdGrader is here.

After the due date you will need to review 5 submissions by going to assignment link above

As soon as you have met with your partner to confirm you can work together you should follow the assignment link above and enter the email address for your partner in the group field.

When you and your partner have completed your sketch (program):

  • submit the .pde file as your CrowdGrader submission.  Submit ONLY the .pde file (e.g. MySketch.pde). On your personal computer that file is probably in Documents/Processing/MySketch. In BE109 it should be in x:Processing/MySketch (follow userName's home directory on the Desktop then Processing).
  • BOTH of you should paste a programming log into the text area on the submission page in Canvas. Use one of the sample logs as a template.
  • If you have added any files to your project (fonts or images) then you will need to create a zip file of the sketch folder including both the .pde file(s) and the data folder found there. For instructions on how to create the zip file see the resources.

Grading

See the grading rubric in CrowdGrader.

Although not part of the student review grading process in CrowdGrader, you will lose one point if you fail to submit a program log in Canvas.