Code for video 074A ("Auflösen und Verbinden") 1/4, https://vimeo.com/dextroorg/074a Walter Gorgosilits, 02_2018 Version with sound by Chris Arrell, 29_10_2018 float aa = 1920; float bb = 1200; int num = 10000; float[] xli = new float[num]; float[] yli = new float[num]; float[] wli = new float[num]; float[] sli = new float[num]; float ww, xx, yy, dd, ff, x1, y1, xxc, yyc, ss, xi, yi, dx, dy, wwi, ssi, x2, y2, ff2, ddd; float[] iiili = new float[num]; float iii; void setup() {size(2133, 1200, P2D); background(90); frameRate(100); smooth(); for (int n = 0; n < num; n++) {wli[n] = random(360); xli[n] = randomGaussian()*2920; yli[n] = random(bb); sli[n] = 0.1; iiili[n] = 0;}} void draw() {background(90); for (int n = 0; n < num; n++) {xx = xli[n]; xx = xx*0.9975; yy = yli[n]; ww = wli[n]; ss = sli[n]; iii = iiili[n]; xx = xx +cos(ww*PI/180)*ss/10; yy = yy +sin(ww*PI/180)*ss/10; for (int i = 0; i < num; i++) {if (i != n) {xi = xli[i]; yi = yli[i]; dd = dist(xx, yy, xi, yi); if (dd <= 5 +iii*10) {ddd = max(1, dd); ff = 10/(ddd*ddd); xx = xx +(xx -xi)*ff; yy = yy +(yy -yi)*ff;} else {if (dd < 100) {ddd = max(1, dd); ddd = max(1, ddd*ddd); xx = xx -(xx -xi)/ddd; yy = yy -(yy -yi)/ddd;}} wwi = wli[i]; if (dd <= 20) {ddd = max(1, dd*dd); ddd = 20/ddd; xx = xx +cos(wwi*PI/180)*ddd; yy = yy +sin(wwi*PI/180)*ddd;} ssi = wli[i]; if (dd <= 20) {ddd = max(1, dd*dd); ss = ss -(ss -ssi)/ddd; }}} if (bb -yy < 200) {iii = min(4, iii +0.1);} iii = iii*0.998; if (yy < -30) {iii = iii*0.5;} pushMatrix(); translate(xxc, yyc); ww = (atan2(yy, xx)+PI)/PI*180; popMatrix(); xli[n] = xx; yli[n] = min(bb-100, yy +0.11 +1/yy/70) -iii; wli[n] = ww; sli[n] = dist(xxc, yyc, xx, yy)*0.01; iiili[n] = iii;} for (int n = 0; n < num; n++) {xx = xli[n]; yy = yli[n]; iii = iiili[n]; for (int i = 0; i < num; i++) {if (i != n) {xi = xli[i]; yi = yli[i]; dd = dist(xx, yy, xi, yi); if (dd < 40) {stroke(max(0, 255 -iii*128), max(0, 255 -iii*128), 255, (41 -dd)*4); strokeWeight(1 +iii/30); line(xx, yy+50, xi, yi+50);}}}} saveFrame();} (No points are displayed, just lines between them, and only when in close proximity to each other, just like our dear substance in solution becomes visible only in its coagulated form. The code is in 2D only. The appearance of 3D, of layers and of depth, results from the fact that the particles only have a subtle influence on one another. They can still rush past each other (faster ones thereby appearing to be closer to the observer) without forcing them to immediately adopt their speed and direction. This, like persuasion, takes place only gently, gradually. In the first version, black indicates the strength of the upward impulse, whereas in the second version, it stands for difference in this quality between neighboring particles. Like in all Dextro.org algorithms, one set of rules applies to all particles at all times. Variety only stems from different circumstances.)