Polar Flower X

Rupert Russell

Ballarat, Australia

  • Available
    Products
    50
  • Artist
    Notes

Apparel

Cases & Skins

Wall Art

Home Decor

Accessories

Stationery

Artist's Description

// draws a Polar Flower
// Based on code from http://www.physics.emory.edu/~weeks/ideas/rose....
// Created with Processing

int screenWidth = 2000;
int screenHeight = 2000;

void setup() {
size(screenWidth, screenHeight);

background(#cccccc); // grey background
fill(#cccccc);
strokeWeight(1.5); // thin lines
smooth(); // antialias lines
}

float rad;
float theta;
float x;
float y;
float r;
float counter = 1;

void draw() {
for (rad = 1; rad < 70; rad++) {
counter = counter + (20/70);

for (theta = 0; theta <= 10 * PI; theta += 0.01) {

r = rad * (8 + sin(theta * 10 + rad / counter));
x = r * cos(theta) + screenWidth / 2;
y = r * sin(theta) + screenHeight / 2;
stroke(0, counter, counter);
ellipse(x,y,1 + rad /5 ,1 + rad /5);
}
}

for (rad = 70; rad < 100; rad ++) {
counter = counter – (20/70);
for (theta = 0; theta <= 10 * PI; theta += 0.01) {
r = rad * (8 + sin(theta * 10 + rad / counter));
x = r * cos(theta) + screenWidth / 2;
y = r * sin(theta) + screenHeight / 2;
stroke(0, counter, counter);
ellipse(x,y,1 + rad / 5, 1 + rad /5);
}
}

save(“polar_Xd.tif”);
noLoop();
}

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