float angle = 0.0;
void setup(){
size(500,400);
background(255);
noStroke();
smooth();
frameRate(10);
}
void draw(){
background(255);
fill(190);
rect(0,365, 500,400);
PFont font;
font = loadFont("BankGothic-Medium-48.vlw");
textFont(font);
fill(0);
textSize(30);
textAlign(RIGHT);
text("sadi pd1 Han", 490, 390);
fill(255);
rythme( -PI/700, 150, 170);
rythme( PI/1000, 110, 170);
rythme( PI/650, 150, 190);
rythme( PI/1600, 90, 180);
}
void rythme( float v_angle, int waveSize, float offset) {
for (int waveX = 0; waveX <= width ; waveX +=20){
float unitSize = random(5,30);
float waveY = offset + (sin(angle)* waveSize);
fill(random(235), random(235), random(235), random(235));
ellipse(waveX, waveY, unitSize, unitSize);
angle += v_angle;
}
}
void mousePressed(){
noLoop();
}
void mouseReleased(){
loop();
}