-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Took a first pass at reconstruction, a piece focused on the URX logo using only cube based shapes in two angles. The logo is illustrated by the cube's positioning over the logo.
- Loading branch information
James Lawrence Turner
committed
Jan 29, 2015
0 parents
commit 04574ab
Showing
6 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# James Lawrence Turner's Code Art Sketchbook | ||
|
||
#### Copyright James Lawrence Turner, 2015, All Rights Reserved | ||
|
||
## Reconstruction (flat panels) [Wed Jan 28, 2015] | ||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
class Block { | ||
float x, y, z, rotation, w, h, d; | ||
int brightness; | ||
Block(float x, float y, float z, float rotation, float w, float h, float d, int brightness) { | ||
this.x = x; | ||
this.y = y; | ||
this.z = z; | ||
this.rotation = rotation; | ||
this.w = w; | ||
this.h = h; | ||
this.d = d; | ||
this.brightness = brightness; | ||
} | ||
void draw() { | ||
pushMatrix(); | ||
translate(x, y, z); | ||
rotateY(rotation); | ||
pushStyle(); | ||
fill(brightness, 50); | ||
if(logoMask.get(int(x), int(y)) == color(255)) { | ||
int variance = int(random(30)); | ||
fill(variance, 121 + variance, 255); | ||
} | ||
box(w, h, d); | ||
popStyle(); | ||
popMatrix(); | ||
} | ||
} | ||
|
||
ArrayList<Block> b; | ||
PShape logo; | ||
PGraphics logoMask; | ||
|
||
void setup() { | ||
size(5000,5000,OPENGL); | ||
b = new ArrayList<Block>(); | ||
logo = loadShape("urx-logo.svg"); | ||
logo.disableStyle(); | ||
logo.scale(width / logo.width); | ||
|
||
logoMask = createGraphics(width, height); | ||
logoMask.beginDraw(); | ||
logoMask.background(0); | ||
logoMask.translate(0, height/4 + height / 16); | ||
logoMask.fill(255); | ||
logoMask.shape(logo); | ||
logoMask.endDraw(); | ||
|
||
for(int i = 0; i < 5000; i++) { | ||
b.add(new Block(random(width), random(height), random(200), (random(100) < 50 ? -PI/4 : PI), 10, 200, 100, int(random(150)) + 75)); | ||
} | ||
background(255); | ||
smooth(); | ||
noStroke(); | ||
noLoop(); | ||
} | ||
|
||
void draw() { | ||
lights(); | ||
fill(0); | ||
rect(0, height/4, width, height/2); | ||
for(Block bl : b) { bl.draw(); } | ||
save("output.png"); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mode.id=processing.mode.java.JavaMode | ||
mode=Java |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.