カラーパーティクルの流れ

```/**
* Noisy Flow for Color Particles
*
* @author aa_debdeb
* @date 2016/03/05
*/

ArrayList<Particle> particles;
float rNoiseX, rNoiseY;
float gNoiseX, gNoiseY;
float bNoiseX, bNoiseY;

void setup(){
size(640, 640);
particles = new ArrayList<Particle>();
for(int i = 0; i < 1000; i++){
}
rNoiseX = random(5000);
rNoiseY = random(5000);
gNoiseX = random(5000);
gNoiseY = random(5000);
bNoiseX = random(5000);
bNoiseY = random(5000);

background(0);
strokeWeight(1);
}

void draw(){
for(Particle particle: particles){
// for java mode
//    float radian = map(noise(radianNoiseX + mouseX + particle.pos.x * 0.02, radianNoiseY + mouseY + particle.pos.y * 0.02), 0, 1, 0, TWO_PI * 5) + random(PI);
//    float r =  map(noise(rNoiseX + mouseX + particle.pos.x * 0.005, rNoiseY + mouseY + particle.pos.y * 0.005), 0, 1, 0, 255);
//    float g =  map(noise(gNoiseX + mouseX + particle.pos.x * 0.005, gNoiseY + mouseY + particle.pos.y * 0.005), 0, 1, 0, 255);
//    float b =  map(noise(bNoiseX + mouseX + particle.pos.x * 0.005, bNoiseY + mouseY + particle.pos.y * 0.005), 0, 1, 0, 255);
// for JavaScript mode
float radian = map(noise(radianNoiseX + mouseX + particle.pos.x * 0.02, radianNoiseY + mouseY + particle.pos.y * 0.02), 0.4, 0.6, 0, TWO_PI * 5) + random(PI);
float r =  map(noise(rNoiseX + mouseX + particle.pos.x * 0.005, rNoiseY + mouseY + particle.pos.y * 0.005), 0.4, 0.6, 0, 255);
float g =  map(noise(gNoiseX + mouseX + particle.pos.x * 0.005, gNoiseY + mouseY + particle.pos.y * 0.005), 0.4, 0.6, 0, 255);
float b =  map(noise(bNoiseX + mouseX + particle.pos.x * 0.005, bNoiseY + mouseY + particle.pos.y * 0.005), 0.4, 0.6, 0, 255);
color c = color(r, g, b, 20);
stroke(c);

particle.display();
}
}

void keyPressed(){
background(0);
}

class Particle{

PVector pos, pPos;
float step;

Particle(){
pos = new PVector(random(width), random(height));
step = map(random(1), 0, 1, 1, 1.5);
}

pPos = pos;