import processing.sound.*;
SoundFile song;
int n;
Circle[] ellipse;
float ty = 0;
float noiseScale = 0.02;
void setup() {
size(400,400);
song = new SoundFile(this, "kgf.mp3");
song.loop();
n =100;
ellipse = new Circle[n];
for(int i=0; i<n; i++) {
ellipse[i] = new Circle(i);
}
}
void draw(){
background(0);
for(int i=0; i<n; i++) {
ellipse[i].display();
}
}
class Circle{
// float noise;
// //int index;
// color c;
Circle(int index) {
// //x = random(width);
// //y = random(height);
// //this.index = index;
// //noise = 0.0000000001;
// //int randomColor = int(random(1,4));
// // c = color(255, 255,255);
}
void display() {
//noStroke();
// fill(130, 5);
float tx = 0;
float x = 0, y = 0;
for(int i = 0; i < width; i++) {
stroke(noise(x*y)+100, 20,20 );
// stroke(c);
ellipse(i*5,noise(tx,ty)*width, 50, 5);
tx += map(i, 0, width, 0.00001, 0.1);
//x++;
//y++;
frameRate(60);
}
ty += map(20, 0, height, 0.00001, 0.1);
}
}