Last active
December 14, 2015 23:39
-
-
Save lisawilliams/5166958 to your computer and use it in GitHub Desktop.
A small processing sketch demonstrating a for loop.
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
// Define size of canvas | |
size(480, 120); | |
// Set background color (black) | |
background(0); | |
// Anti-alias: | |
smooth(); | |
// making shapes without an outer line: | |
noStroke(); | |
// For loop drawing circles on black background: | |
for (int y = 0; y <= height; y += 40) { | |
for (int x = 0; x <= width; x += 40) { | |
//color of circles | |
fill(255, 140); | |
ellipse(x, y, 40, 40); | |
fill(219, 51, 85); | |
ellipse(x, y, 30, 30); | |
fill(139,135, 136); | |
ellipse(x, y, 20, 20); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment