Created
March 31, 2013 15:59
-
-
Save lisawilliams/5281094 to your computer and use it in GitHub Desktop.
Easter Egg Sketch in Processing
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
// easter egg sketch! | |
// set the size of the background | |
size (360, 240); | |
// set the color of the background (robin's egg blue) | |
background (93, 199, 219); | |
// create a nested loop that repeats drawing eggs | |
for (int y = 0; y <= height; y += 40) { | |
for (int x = 0; x <= width; x += 40) { | |
// no outer line around the eggs | |
noStroke(); | |
// set color of eggs (purple) | |
fill(206, 93, 219); | |
// draw an oval -- x and y are the horizontal | |
// and vertical start points; 40 and 30 | |
// are the dimensions | |
ellipse (x, y, 40, 30); | |
} | |
} | |
// Let's create a nice decorative font for our message | |
PFont easterFont; | |
easterFont = loadFont("BernardMT-Condensed-36.vlw"); | |
textFont(easterFont); | |
// Let's set the color of the text -- white (255) | |
fill(255); | |
// Let's print our holiday message | |
// and set where it appears on the canvas | |
// (90px from left edge, 200 from top edge) | |
text("Happy Easter", 90, 200); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment