xxxxxxxxxx
53
function setup() {
createCanvas(windowWidth, windowHeight);
angleMode(DEGREES);
radius = cos(30) * height / 2;
ellipseMode(CENTER);
}
function draw() {
background(255);
translate(width / 2, height / 2 - 30);
noFill();
strokeWeight(2);
for (i = 0; i < 3; i++) {
strokeWeight(10);
stroke(220, 0, 0);
arc(0, 0, height / 2, height / 2, 39, 141); //ROJO
stroke(0, 0, 130);
arc(0, 0, height * 3 / 4, height * 3 / 4, 56.5, 123.5); //AZUL
stroke(0);
rotate(120);
}
rotate(60);
noFill();
for (i = 0; i < 3; i++) {
strokeWeight(10);
stroke(0, 180, 0);
rotate(120);
translate(0, height / 8);
arc(0, 0, radius, radius, 120, 240); //VERDE
arc(0, 0, radius, radius, 300, 60); //VERDE
translate(0, -height / 8);
}
rotate(-60);
stroke(60, 0, 100);
ellipse(0, 0, height / 4);
stroke(0);
for (i = 0; i < 3; i++) {
strokeWeight(10);
translate(0, height / 4);
ellipse(0, 0, radius);
translate(0, -height / 4);
rotate(120);
}
}