CPSC 120: Lab Assignment 1

Due at 2:00 pm on Thursday, 02/06/2014

Home | Calendar | Announcements | Assignments | Example Code | Notes

Overview

This short assignment has two goals:

Reading

Exercises:

Variables and Assignment

  1. Modify Example #2 so that it draws its five dots vertically, from (100,100) to (100,400). Save the result as the sketch file prob-1.pde.

  2. Modify Example #2 so that it draws a line of 17 dots horizontally, rather than 5. The "line" should begin at (50, 50) of the right and extend to the right at (450,50), and have a blue dot in the middle, as in the following:

    Save the result as the sketch file prob-2.pde.

  3. Modify Example #4 so that the loop draws the "vertical" figure you did without a loop in Problem 1. Save the result as the sketch file prob-3.pde.
  4. Make a drawing that incorporates more than one "line" made out of dots. The lines should each be drawn with a loop, and you should have some variation in the colors that are used to draw each dot. Finally, there should be more than one dot size in the drawing. Use your creativity here!

    Save the result as the sketch file prob-4.pde.


Turn In

Make a folder in your turn in directory named "lab1". Copy all four of your solutions in to this folder. Consult the Linux tutorial from Lab #0 if you need a reminder of the details.


Standards

John H. E. Lasseter