Created
February 21, 2011 22:44
-
-
Save sattybhens/837846 to your computer and use it in GitHub Desktop.
red-recket png using processing
This file contains hidden or 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
| void setup() { | |
| size(16,16); | |
| noLoop(); | |
| noStroke(); | |
| colorMode(HSB,360,100,100); | |
| } | |
| void draw() { | |
| // top right red square | |
| fill(0,80,99); | |
| rect(8,3,5,5); | |
| // next red square, just lowered the S | |
| fill(0,60,99); | |
| rect(6,5,5,5); | |
| // this time two rectangles, otherwise this square shows after the next, again lowered the S | |
| fill(0,40,99); | |
| rect(4,7,5,5); | |
| fill(0,25,99); | |
| rect(2,9,5,5); | |
| // creates the file in the same dir as the Sketch | |
| save("red-rocket.png"); | |
| } |
This file contains hidden or 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
| PGraphics pg; | |
| void setup() { | |
| size(16,16); | |
| noLoop(); | |
| pg = createGraphics(16, 16, P2D); | |
| pg.beginDraw(); | |
| pg.noStroke(); | |
| // using Hue, Saturation and Brightness colormode. | |
| // for this I just modify the Saturation to get my shades of red. | |
| pg.colorMode(HSB,360,100,100); | |
| } | |
| void draw() { | |
| // top right red square | |
| pg.fill(0,80,99); | |
| pg.rect(8,3,5,5); | |
| // next red square, just lowered the S | |
| pg.fill(0,60,99); | |
| pg.rect(6,5,5,5); | |
| // this time two rectangles, otherwise this square shows after the next, again lowered the S | |
| pg.fill(0,40,99); | |
| pg.rect(4,7,5,2); | |
| pg.rect(7,9,2,3); | |
| pg.fill(0,25,99); | |
| pg.rect(2,9,5,2); | |
| pg.rect(5,11,2,3); | |
| pg.endDraw(); | |
| // creates the file in the same dir as the Sketch | |
| pg.save("red-rocket.png"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment