-
Notifications
You must be signed in to change notification settings - Fork 3
/
sample02.pde
43 lines (35 loc) · 996 Bytes
/
sample02.pde
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
void sample02()
{
background(0, 30, 30);
NoiseGenerator ngen = new NoiseGenerator(0.01, 1.0);
ngen.setNoiseOctaveParam(4, 0.5);
runner.sampleName = "sample02";
runner.addLayer( new ParticlesLayer(10000,100, color(30, 100, 60), ngen) {
public void draw(Particle p)
{
strokeWeight(6);
stroke(p.c, 5);
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
ngen = new NoiseGenerator(0.01, 1.0);
ngen.setNoiseOctaveParam(4, 0.5);
runner.addLayer( new ParticlesLayer(10000, 150, color(255, 0, 0), ngen) {
public void draw(Particle p)
{
strokeWeight(2);
stroke(p.c, 10);
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
ngen = new NoiseGenerator(0.01, 1.0);
ngen.setNoiseOctaveParam(4, 0.5);
runner.addLayer( new ParticlesLayer(10000, 200, color(255), ngen) {
public void draw(Particle p)
{
strokeWeight(1);
stroke(p.c, 10);
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
}