From instruction: Complexity, intensity and disorder
Code: cid by yaxu
Complexity, intensity and disorder applied to a line of dots. Complexity is number of dots (not sure about this one), intensity is size of dots and disorder is random positioning. It looks like a noisy vibrating string.
I'm testing the code by plugging sinusoidal waves with different periods into the parameters. Seems a nice relaxing way of exploring the combinations...
void setup() { noStroke(); } float oscillate(int rate) { float t = millis() / 1000.0; return((sin(t * PI / rate) + 1) / 2); } void draw() { background(0,0,0); // test with sinewaves running at different rates float complexity = oscillate(7); float intensity = oscillate(9); float disorder = oscillate(5); make(complexity, intensity, disorder); } void make(float complexity, float intensity, float disorder) { int foo = 1 + floor(10.0 * complexity); int step = (width / foo); for (int i = 0; i < foo; ++i) { ellipse(step * i + step / 2 + random(disorder * 10), width / 2 + random(disorder * 10), 1 + 20 * intensity, 1 + 20 * intensity ); } }
[download]
Written in Processing. Released under the GPLv3 license