xxxxxxxxxx
50
function setup(){
createCanvas(400,400)
numDivs = 1500;
radius = 10;
sizes = []
speed = []
radi = []
for(a = 0; a<TAU; a+=TAU/numDivs){
sizes.push(random(0.1,1.1))
speed.push(random(2,5))
radi.push(random())
}
FPS = 25;
frameRate(FPS);
//createLoop({duration:5, gif:true})
}
function draw(){
background(0,50);
translate(width/2, height/2);
t = frameCount/FPS/3;
for(n = 0; n<numDivs; n++){
a = TAU/numDivs * n + t/speed[n]
r = radius + radi[n]*150
x = (r)*sin(a);
y = (r)*cos(a) + r*sin(a)/500;
d = dist(0,0,x,y)
strokeWeight(sin(d/20+t+a)*2+2+sizes[n]);
stroke(127.5+127.5*sin(x/2+y/2),
127.5+127.5*cos(x/2+y/2),
127.5)
x = (r)*sin(d/10+a);
y = (r)*cos(d/10+a) + r*sin(a)/500;
point(x, y);
}
//noLoop();
}