moving fan
@author
float y;
float hue;
void setup(){
size(320, 640);
colorMode(HSB, 360, 100, 100);
noStroke();
fill(0);
background(0, 0, 100);
y = height - 100;
}
void draw(){
fill(hue, 100, 100, 10);
float angle = map(noise(frameCount * 0.01 + 10000), 0, 1, 0, PI / 2);
float radious = map(noise(frameCount * 0.005 + 20000), 0, 1, 100, 600);
pushMatrix();
translate(width / 2, y);
rotate(-HALF_PI);
arc(0, 0, radious, radious, -angle, angle);
popMatrix();
pushMatrix();
translate(width / 2, y + height);
rotate(-HALF_PI);
arc(0, 0, radious, radious, -angle, angle);
popMatrix();
y--;
if(y < 0){
y = height;
}
hue += 0.5;
if(hue > 360){
hue -= 360;
}
}