let r = 150,k=350,a=4,b=4,c=4
function setup() {
createCanvas(400, 400,WEBGL);
angleMode(DEGREES)
}
function draw() {
background(0);
r=k*sin(frameCount*2)
t = frameCount%360;
fill(20,200,200)
noStroke()
sphere(10,20,20)
fill(255)
push()
rotateZ(-frameCount/2)
rotateX(-frameCount/2)
rotateY(-frameCount/2)
for(let i=0;i<120;i++){
for (let j=0;j<90;j++){
push()
translate(r*cos(j*a)*sin(i*a),r*sin(j*b)*sin(i*c),r*cos(i*b))
sphere(1,3,3)
pop()
}
}
pop()
if(frameCount%90 == 0){
a = random(4,13)
b = (random(4,13))
c = random(4,13)
}
}