//Anders Joura //October 2, 2009 //This program creates 4 moving, sine-wave-based shapes //on a field consisting of an imported image. void setup() { size(400, 600); noStroke(); fill(0); } float angle = 0.0; void draw() { PImage img; size(400,600); background(0); img = loadImage("Tiberius.jpg"); image(img,0,0); for (int x = 0; x <= width; x += 22) { float y1 = width/200 + (sin(angle) * width/20); fill(220,200,0); rect(0, 100, x, y1); angle += PI/2.0; } for (int x = 0; x <= width; x += 22) { float y1 = width/200 + (sin(angle) * width/20); fill(220,150,0); rect(0, 200, x, y1); angle += PI/4.0; } for (int x = 0; x <= width; x += 22) { float y1 = width/200 + (sin(angle) * width/20); fill(220,100,0); rect(0, 300, x, y1); angle += PI/6.0; } for (int x = 0; x <= width; x += 22) { float y1 = width/200 + (sin(angle) * width/20); fill(220,50,0); rect(0, 400, x, y1); angle += PI/8.0; } stroke(255); int i = 1; while(i<11) { point( (width/11)*i, height/2 ); i++; } }