xxxxxxxxxx
21
function setup() {
createCanvas(400, 400);
}
function draw() {
background(50);
//1. we developed a simple pinwheel-like shape.
push();
translate(width/2,height/2); // sets new vertex
rotate(frameCount * 0.01); // rotates below stuff
noStroke();
ellipse(0,0,100,20);
ellipse(0,0,20,100);
pop();
// issues: reusability. If I want to draw many of this custom shape, I have to copy the block of code many times.
}