Phyllotaxis-007

Rupert Russell

Ballarat, Australia

  • Available
    Products
    64
  • Artist
    Notes

Apparel

Cases & Skins

Wall Art

Home Decor

Accessories

Stationery

Artist's 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-c...

float n = 100000;
float c = 34;
float start = 0;
float hu ;

void setup() {

size(13500, 11462);
// size(1350, 1350 );
colorMode(HSB, 360, 255, 255);
background(0);
stroke(0);
strokeWeight(2);
}

// https://raw.githubusercontent.com/CodingTrain/R...

void draw() {
noLoop();
translate(width / 2, height / 2);
// rotate(n * 0.3);
for (int i = 0; i < n; i++) {
float a = i * radians(137.5);
float r = c * sqrt(i);
float x = r * cos(a);
float y = r * sin(a);
// float hu = sin(start % 25006 + i ); // i+start;//
hu = i/230.0 % 255;
fill(hu, 255, 255);
println("hu = " + hu);
// noStroke();

ellipse(x, y, 40 + n / 150, 40 + n / 150);
}
save(“Saving Phyllotaxis-9-” + n + “.png”);
println(“saved”);
exit();
}

desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait
desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait