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

Hands-on Activity: Fun With Loops

Each of the following is drawn at 400x400 scale, although my example code can generalize this to any NxN canvas. My generating code is linked in the right column, however you may choose to download a single zipfile with the entire collection, and place it within your Processing sketchbook.

For a few of these, we decided we wanted to work with a background landscape. The script for that is available as house.pde.

Image My Code
many lines manyLines.pde
manyLines2 manyLines2.pde
lineArt lineArt.pde
lineArt2 lineArt2.pde
lineArt3 lineArt3.pde
lineArt4 lineArt4.pde
houseFence houseFence.pde
houseBirds houseBirds.pde
houseStars houseStars.pde
randomCircles randomCircles.pde
staircase staircase.pde
staircaseNested staircaseNested.pde
pyramid pyramid.pde
pyramidPadded pyramidPadded.pde
pyramidNested pyramidNested.pde
brickwall brickwall.pde

For offset we use that (row % 2) alternates between 0 and 1.
colorMix1 colorMix1.pde
colorMix1b colorMix1b.pde
colorMix2 colorMix2.pde
colorMix3 colorMix3.pde

Michael Goldwasser
CSCI 144, Spring 2015
Last modified: Thursday, 22 January 2015
Assignments | Course Home | Documentation | Lab Hours/Tutoring | Schedule | Submit