<%@LANGUAGE="VBSCRIPT" %> <% Response.CacheControl = "no-cache" %>
Lab 07 (Due by Monday, September 27th at 11:59PM)

Overview

IMPORTANT: This and all assignments for the rest of the semester will be turned in via Blackboard.

This lab will give you practice drawing primitive shapes and will help you gain familiarity with the setup/draw mechanism that Processing uses for animation.

Background

A bare bones graphical Processing application is structured as follows:

// Global variable declarations

void setup()
{
   // initialize variables here
}

void draw()
{
   // drawing code goes here
}

Remember that when your program starts up, the global variables are first created (but not initialized). Then, setup() is executed ONLY ONCE. After that, draw() will be called over and over again until the program terminates.

Assignment

Write a program in which four different images are displayed, sequentially in the drawing window. The first image is a line with a red background, the second is a triangle with a yellow background, the third is an inverted trapezoid with a pink/purple background, and the fourth is a rectangle with a green background. This sequence should repeat indefinitely.

Example output:

Lab 07 Example


Grading

You will be graded on whether or not your program works as specified in the assignment, the readability of your code, and the correctness of your output.