Assignments | Course Home | Documentation | Lab Hours/Tutoring | Schedule | Submit

Saint Louis University

Computer Science 144
Introduction to Computer Science: Multimedia

Michael Goldwasser

Spring 2015

Dept. of Math & Computer Science

Exercises and Hands-on Activities: Arrays

If you'd like to work locally, you may choose to download a single zipfile with the entire collection, and place it within your Processing sketchbook.

Sketch My Code
St. Louis Temperatures weather.pde

Improved version that defines plotDataLine() function.
weather2.pde
rainbow rainbow.pde
twinkle.pde

I can't say that I'm perfectly happy with this effect. If anyone has an idea for a better "twinkling" model, let me know.
stretching_ellipses.pde

Click and drag to draw ellipses.

The following keys cause actions:
  • 'c' clears the screen of all ellipses
  • 'u' removes the most recently drawn ellipse (if any)
  • 'a' aborts an ellipse that is currently being stretched

Now you can try to create some of these...

Sketch My Code
In this demonstration, 100 circles of radius 25 are drawn, with randomly chosen positions and circles. The user can click on a particular circle to recolor it. Note that we take care to make sure that when circles overlap, a mouse click only effects that circle which is visible at the clicked location.

For convenience, typing 's' will shuffle the scene.

clickable_circles.pde
Click to set off a firework explosion.
(You may not start a second until the first burns out.)

Our model spawns 200 particles, each with random angle, speed, lifespan, and color (given certain parameter bounds).

fireworks.pde
cycloid.pde
spirograph.pde

Michael Goldwasser
CSCI 144, Spring 2015
Last modified: Monday, 16 February 2015
Assignments | Course Home | Documentation | Lab Hours/Tutoring | Schedule | Submit