Skip to content

Instantly share code, notes, and snippets.

@cornfact
Created July 21, 2017 14:29
Show Gist options
  • Save cornfact/4158b58a4d16cf40803c5e8149b90058 to your computer and use it in GitHub Desktop.
Save cornfact/4158b58a4d16cf40803c5e8149b90058 to your computer and use it in GitHub Desktop.
aperiodic
<!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>
//console.log("hello")
function setup() {
createCanvas(500, 500);
//colorMode(HSL);
noStroke();
for(var i = 0; i < 10; i++) {
for(var j = 0; j < 10; j++) {
push();
translate(i * 100, j * 100);
fill(0, 255, 0)
rect(0, 0, 50, 100)
fill(0)
rect(50, 0, 50, 100)
fill(0)
arc(50, 50, 100, 100, radians(90), radians(270));
fill(0, 255, 0)
arc(50, 50, 100, 100, radians(-90), radians(90));
pop();
}
}
// function greenRect(x, y) {
// noStroke();
// fill(0, 255, 0);
// rect(x, y, 50, 100);
// if(x < width && y < height) {
// greenRect(x + 100, y + 100);
// }
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment