Last active
August 29, 2015 13:57
-
-
Save mattfelsen/9510125 to your computer and use it in GitHub Desktop.
Wall Drawing #271, Sol Lewitt, 1975
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Wall Drawing #271: Black circles, red grid, yellow arcs from four | |
corners, blue arcs from the midpoints of four sides | |
(ACG 195) 1975 | |
Originally colored pencil on wall | |
Solomon R. Guggenheim Museum | |
New York | |
Recreated by Matt Felsen in Processing, 2014 | |
*/ | |
int gridSpacing = 30; | |
void setup() { | |
size(displayWidth, displayHeight); | |
background(255); | |
noFill(); | |
noLoop(); | |
strokeWeight(0.5); | |
} | |
void draw() { | |
// draw grid | |
stroke(255, 0, 0); | |
drawGrid(); | |
// draw circles from center | |
stroke(0); | |
drawCircles(width/2, height/2, width * 1.2); | |
// draw circles from corners | |
stroke(255, 255, 0); | |
drawCircles(0, 0, width * 2.35); | |
drawCircles(width, 0, width * 2.35); | |
drawCircles(0, height, width * 2.35); | |
drawCircles(width, height, width * 2.35); | |
// draw circles from midpoints | |
stroke(50, 50, 255); | |
drawCircles(width/2, 0, width * 1.6); | |
drawCircles(width, height/2, width * 2.1); | |
drawCircles(width/2, height, width * 1.6); | |
drawCircles(0, height/2, width * 2.1); | |
} | |
void drawGrid() { | |
for (int i = 0; i < width; i+=gridSpacing) { | |
line(i, 0, i, height); | |
} | |
for (int i = 0; i < height; i+=gridSpacing) { | |
line(0, i, width, i); | |
} | |
} | |
void drawCircles(int x, int y, float limit) { | |
pushMatrix(); | |
translate(x, y); | |
for (int i = 0; i < limit; i+=gridSpacing) { | |
ellipse(0, 0, i, i); | |
} | |
popMatrix(); | |
} | |
boolean sketchFullScreen() { | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment