xxxxxxxxxx
43
const scale = 220;
const radius = 775;
let offScale ;
var angle = 0;
function setup() {
createCanvas(400, 400);
offScale = PI/2;
}
function draw() {
background('#FFB8B8');
fill(51, 0, 51, 100);
stroke(0);
strokeWeight(1);
translate(width/2 + cos(angle*3 - PI/2)*30, height/2 + sin(angle*3 - PI/2)*30)
//Experimental angle values.
arc(sin(angle) * scale, cos(angle)* scale, radius, radius, 4.179 -angle, 5.246 -angle);
arc(sin(angle + (2*PI/3))* scale, cos(angle + (2*PI/3))* scale, radius, radius, 2.085 -angle, 3.151 -angle);
arc(sin(angle + (4*PI/3))* scale, cos(angle + (4*PI/3))* scale, radius, radius, -0.01 -angle, 1.058 -angle);
strokeWeight(0);
//Stacking translucent objects is fun.
triangle(sin(angle) * scale/2, cos(angle)* scale/2,
sin(angle + (2*PI/3))* scale/2, cos(angle + (2*PI/3))* scale/2,
sin(angle + (4*PI/3))* scale/2, cos(angle + (4*PI/3))* scale/2);
triangle(sin(angle) * scale/4, cos(angle)* scale/4,
sin(angle + (2*PI/3))* scale/4, cos(angle + (2*PI/3))* scale/4,
sin(angle + (4*PI/3))* scale/4, cos(angle + (4*PI/3))* scale/4);
//Works way easier with three crossed circles but you get ugly lines outside the intersection.
/*
circle(sin(angle) * scale, cos(angle)* scale, radius);
circle(sin(angle + (2*PI/3))* scale, cos(angle + (2*PI/3))* scale, radius);
circle(sin(angle + (4*PI/3))* scale, cos(angle + (4*PI/3))* scale, radius);
*/
angle+=PI/150;
}