xxxxxxxxxx
31
let a = 0;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
background(255);
}
function draw() {
a = a + 5;
funkyShape(width/2,height/2,80,80);
a = a + 1;
funkyShape(200,200,270,270);
funkyShape(200,200,.1,.1);
}
function funkyShape(x,y,w,h) {
push();
translate(x,y);
rotate(a);
fill(random(255));
stroke(50,20);
beginShape();
vertex(w,0);
vertex(w/2,0);
vertex(w/2,h);
vertex(100,h/2);
endShape(CLOSE);
pop();
}