Phyllotaxis Magnets
Description: // Daniel Shiffman // http://codingtra.in // http://patreon.com/codingtrain // Code for: https://youtu.be/KWoJgHFYWxY // Coding Challenge #30: Phyllotaxis // http://algorithmicbotany.org/papers/abop/abop-ch4.pdf int n = 200010; float c = 8.5; float start = 0; float hu ; float radius; float rrr, ggg, bbb; void setup() { // size(13500, 13500); size(5000, 5000); // colorMode(HSB, 360, 255, 255); background(0); stroke(0); strokeWeight(.5); println("Running"); } // https://raw.githubusercontent.com/CodingTrain/Rainbow-Code/master/challenges/CC_30_Phyllotaxis/CC_30_Phyllotaxis.pde void draw() { noLoop(); translate(width / 2, height / 2); for (int i = 0; i < n; i++) { float a = i *...