-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsample06.pde
More file actions
27 lines (22 loc) · 732 Bytes
/
sample06.pde
File metadata and controls
27 lines (22 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
void sample06()
{
// gradiant from http://www.gradients.io/
color colorFrom = #3AA17E;
color colorTo = #00537E;
background(colorFrom);
NoiseGenerator ngen = new NoiseGenerator(0.01, 1.0);
ngen.setNoiseOctaveParam(4, 0.5);
ngen.setZNoise( 0.0,0.005);
runner.sampleName = "sample06";
runner.addLayer( new ParticlesLayer(2000,200, colorFrom, ngen) {
public void draw(Particle p)
{
color colorTo = #00537E;
//fill( lerpColor(c, target, (float)p.lifeTime/(float)150));
color lc = lerpColor(p.c, colorTo, 1.0-(float)p.lifeTime/(float)150);
stroke(lc, 100);
strokeWeight( 1 + ((float)p.lifeTime/(float)150)*30 );
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
}