Spiral 003

Rupert Russell

Ballarat, Australia

  • Available
    Products
    52
  • Artist
    Notes
  • Artwork Comments 2

Apparel

Cases & Skins

Wall Art

Home Decor

Accessories

Stationery

Artist's Description

// “Circles” by Asher Salomon
// http://www.openprocessing.org/sketch/152505
// Licensed under Creative Commons Attribution ShareAlike
// https://creativecommons.org/licenses/by-sa/3.0
// https://creativecommons.org/licenses/GPL/2.0/

// float spacing = 82; // for Dooner
// float meanDiam = 40; // for Dooner

float spacing = 16;
float meanDiam = 8;
int click=0;
void setup(){
size(13500,13500);
ellipseMode(CENTER);
noStroke();
fill(255);
mouseX = width/2;
mouseY = height/2;
}
void draw(){
background(0);
int flipFlop = 1;
for(float y=spacing/2;y<width;y+=spacing){
flipFlop = (flipFlop+1)%2;
for(float x=spacing*(1-flipFlop*0.5);x<width;x+=spacing){
float dx = x-mouseX;
float dy = y-mouseY;
float radius = mag(dy,dx);
float angle = atan2(dy,dx)-frameCount*TWO_PI/40;
float variation = meanDiam/2*cos(radius*TWO_PI/spacing/4+angle);
float varried = meanDiam*1.25+variation;
ellipse(x,y,varried,varried);
}
}
}

// Save the screen as a png file when you press the s key exit if you type x
// note requires a global variable called click

void keyTyped() {
println("typed " + int(key) + " " + keyCode);

if (int(key) == 115) { // s for save
save(“circle005-” + click + “.png”);
println("Saved: " + “circle005-” + click + “.png”);
click ++;
}

if (int(key) == 120) {
exit(); // x to exit the program
}
}

Artwork Comments

  • Trena S
  • Bunny Clarke
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