xxxxxxxxxx
56
let angle = 0;
let space = 100;
let diam = 40;
let limit = 100;
let light = 0;
function setup() {
createCanvas(400, 400);
noFill();
strokeWeight(2);
background(0);
angleMode(DEGREES);
translate(width / 2, height / 2);
drawCircleOfCircles();
outerAndCenter();
}
function draw() {}
function drawCircleOfCircles() {
while (limit > -15) {
for (let i = 0; i < 10; i++) {
let x = cos(angle) * space;
let y = sin(angle) * space;
let r = map(x, -100, 100, 0, 255);
console.log(angle)
let g = map(y, -95, 95, 0, 255);
let b = map(angle, 0, 2970, 150, 255);
stroke(r+light, g+light, b+light);
circle(x, y, diam);
angle += 36;
}
space *= 0.75;
diam *= 0.75;
angle += 18;
limit -= 15;
light += 5;
}
}
function outerAndCenter(){
strokeWeight(3);
stroke(255);
circle(0, 0, 260);
circle(0, 0, 320);
fill(255);
circle(0,0,10);
}