Art 454: Assignment 3 – Random Shapes

< 454 Home

In this assignment we will combine the basics of variables with iteration inside of while and for loops to create random shape compositions. Using the examples from class, create at least five sketches in Processing that draw random lines and shapes with varying colors and values. Make your sketches at least 3000 by 2000 pixels, and save the renderings as tif files. Print our your favorite sketch on 8 x 10 or larger paper. Email both the tif file and the pde file to patterson53@gapps.marshall.edu.

20 points
Due February 4

Learning: Go to Chapter six in the this training series.

Here’s the example from class:

void setup() {
size(1000, 200);
background(#FFFFFF);
smooth();
}

float alpha;
float red;
float blue;
float green;
float x;
float y;
float myStroke;
float counter = 0;

void draw () {
counter++;
println(counter);
if (counter < 500) { myStroke = random (0, 50); x = random(0, 1000); y = random(0, 200); alpha = random(0, 255); red = random(0, 255); blue = random(0, 255); green = random(0, 255); stroke(red, green, blue, alpha); strokeWeight(myStroke); point(x, y); } if (counter > 500) {
saveMyFile();
}
}

void saveMyFile() {
print("I will save the file now");
save("mytif.tif");
noLoop();
}