xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
noStroke();
let hugou = 1.0;
for (let i=0; i<5000; i++){
let y = random(height);
let param = y*100/windowHeight;
let shift = 100-random(param,100);
let eita = random(100);
if (shift < eita){hugou = hugou*(-1.0)}
let e = 100;
let shita = random(-(log(windowHeight-y)),log(windowHeight-y))
let x = random(windowWidth*1/2-(windowHeight-y)+e*hugou, windowWidth*1/2+(windowHeight-y))+e*hugou;
let diameter;
if (hugou<=0){
fill(random(127, 255), random(0,127),random(0,127),127);
diameter=random(min(y/10.0,10));
if (x>windowWidth/2 || x<0){
continue;
}
}
else{
fill(random(0,127), random(127,255),random(127,255),127);
diameter=random(max(10,sqrt((height-y))+5));
if (x<windowWidth/2 || x>windowWidth){
continue;
}
}
ellipse(x,y,diameter, diameter);
}
}