17



float y =0;
float angle = 0;
float amplitude = 14;
float waveGap = 8;
float frequency = 3;

void setup(){
size(400,400);
background(235,20,0);
strokeWeight(1);
stroke(255);
smooth();
//noFill();
//fill(255);
frameRate(30);

}

void draw(){
if(y < height){
float py = 0;
for(int i =0; i < width; i ++){
py = y + sin(radians(angle))*amplitude;
point(i,py);
angle += frequency;
}
y+= waveGap;
}
filter(BLUR,1);

}

コメント