Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created September 1, 2013 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/6401962 to your computer and use it in GitHub Desktop.
Save tmcw/6401962 to your computer and use it in GitHub Desktop.
var quads = [0, -90, 90, 180, -180];
function fortor(a) {
// squares
// var n = 20;
// versus random
var n = ~~(Math.random() * 400)
return function(t) {
return (t % n) ? a : quads.map(fortor);
}
}
turtle(function(t) {
return [fortor(0)];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment