xxxxxxxxxx
40
let x = 0;
let y = 0;
function setup() {
createCanvas(600, 600);
noStroke();
}
function draw() {
push();
rotateY(millis() / 1000);
fill(255, 0, 100,1);
circle(width/2, height/2, 400);
pop();
// Draw the rectangles providing the colours of the circle
for (let i = 0; i < height; i += 20) {
fill(255 - i / 2.3, 0, 100, 50);
// stroke(50 + i / 8);
strokeWeight(0.1);
stroke(255);
rect(0, i, width, 19);
}
// Draw circles rotating around the main circle to create the 'mask'
for (let i = 0; i < 150; i++) {
fill(255);
noStroke();
x += 0.05;
y += 0.05;
let sinX = sin(x) * 350;
let cosY = cos(y) * 350;
push();
// translate(width / 2, height / 2);
circle(sinX, cosY, 150);
pop();
}
}