xxxxxxxxxx
function setup() {
createCanvas(920, 690);
}
function draw() {
background(166, 184, 132);
setCenter(width/2, height/2);
// noFill();
// pentagons (multiple drawing)
push();
noFill();
rotate(frameCount * -0.005);
stroke(140, 117, 84);
strokeWeight(3);
polarPentagons(100, 160, 180);
pop();
// polygons (multiple drawing)
push();
noStroke();
fill(255, 255, 255, 120);
polarPolygons(23, 4+sin(frameCount/10), 40, 210);
pop();
// triangles (multiple drawing)
push();
stroke(253, 255, 242);
strokeWeight(2.5);
fill(127, 140, 102);
polarTriangles(23, 30-sin(frameCount/10)*10, 210);
pop();
// ellipses (multiple drawing)
push();
noFill();
rotate(frameCount * 0.005);
stroke(250, 240, 212);
strokeWeight(1.5);
polarEllipses(50, 100, 100, 100);
pop();
// octagon (single drawing)
push();
noStroke();
fill(255, 255, 255, 120);
polarOctagon(0, 20, 0)
pop();
// square (single drawing)
push();
noStroke();
rotate(frameCount * 0.005);
fill(232, 219, 181);
polarSquare(0, 10, 0)
pop();
// heptagon (single drawing)
push();
noFill();
rotate(frameCount * 0.005);
stroke(148, 100, 31);
strokeWeight(2);
polarHeptagon(0, 15, 0)
pop();
// line (single drawing)
push();
rotate(frameCount * 0.005);
stroke(148, 100, 31); //232, 219, 181
strokeWeight(2);
polarLine(90, 22, 0);
pop();
}
function mouseClicked(){
save("img_" + month() + '-' + day() + '_' + hour() + '-' + minute() + '-' + second() + ".jpg");
}