Created
July 21, 2017 14:23
-
-
Save cornfact/50baedfa332f20dab0748fa98e64ae13 to your computer and use it in GitHub Desktop.
periodic
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.js"></script> | |
<script src="../easygrid.min.js"></script> | |
<script src="../underscore-min.js"></script> | |
<script src="../seedrandom.min.js"></script> | |
</head> | |
<body> | |
<script src="sketch.js"></script> | |
</body> | |
</html> |
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
//console.log("hello") | |
function setup() { | |
createCanvas(700, 500); | |
colorMode(HSL); | |
//ellipseMode(CORNER); | |
var tileSize = 50; | |
noStroke(); | |
for (var i = 0; i < 10; i++) { | |
for (var j = 0; j < 10; j++) { | |
push(); | |
translate(i * tileSize, j * tileSize); | |
//all shape, size and color goes here | |
fill(200 - (i * 10), j * 10, 50) | |
rect(0, 0, tileSize, tileSize) | |
fill(90 - (i * 10), j * 10, 50) | |
ellipse(tileSize/2, tileSize/2, 10, 10) | |
//ellipse(0, 0, 10, 10) | |
pop(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment