xxxxxxxxxx
87
function setup() {
createCanvas(650,900);
background(240);
frameRate(1);
}
function draw() {
background(240);
//noStroke();
/*fill(204);
triangle(18, 18, 18, 360, 81, 360);
fill(102);
rect(random(width), random(height), 63, 63);
color (125,125,125,125);
*/
stroke(260);
fill(0);
//quad(189, 18, 216, 18, 216, 360, 144, 360);
quad(20+random(width),20+random(width),20+random(width),20+random(800),20+random(150),20+random(150),20+random(500),120+random(150));
fill(204);
//quad(189, 18, 216, 18, 216, 360, 144, 360);
quad(20+random(width),20+random(width),20+random(width),20+random(800),20+random(150),20+random(150),20+random(500),120+random(150));
fill(255);
var larg1 = 20+random(300);
ellipse(random(width), random(height),larg1,larg1);
/*
fill(204);
triangle(288, 18, 351, 360, 288, 360);
fill(255);
arc (random(width), random(height),larg1,larg1, PI, TWO_PI);
*/
fill(255);
//size(650, 900);
line(120, 80, 340, 300);
/**
* Linear Motion.
*
* Changing a variable to create a moving line.
* When the line moves off the edge of the window,
* the variable is set to 0, which places the line
* back at the bottom of the screen.
*/
stroke(255,0,0);
strokeWeight(random(100));
line(random (width), random (height), random (width), random (height));
stroke(255,0,0);
strokeWeight(random(100));
line(random (width), random (height), random (width), random (height));
}
/*function keyPressed(){
if(key=='s'||key=='S'){
saveFrame("line-######.png");
}
}
*/
function saveFile(){
save('Sarah-compo.png');
}
function mousePressed(){
saveFile();
}