At first I thought the title was link-bait, but it isn't much of an exaggeration. The topic is explored deeply.
The sierpinski triangle page to end most sierpinski triangle pages
21–23 of 23 posts
Re: The sierpinski triangle page to end most sierpinski triangle pages
#22If you like this kind of stuff you might also like this:
Then paste/run this program:
var triangle = (function(){
function frag(len, depth, left){
if (left === undefined) left = !(depth % 2);
if (depth > 1) {
frag(len/2, depth-1, !left);
t[left?'lt':'rt'](60);
frag(len/2, depth-1, left);
t[left?'lt':'rt'](60);
frag(len/2, depth-1, !left);
} else {
t.fd(len);
}
}
return frag;
})();
/* position the turtle */
t.pu().bk(250).rt(90).bk(350).pd().color('#0f0');
/* build the triangle */
triangle(700, 8);Re: The sierpinski triangle page to end most sierpinski triangle pages
#23wow... well that's taken up most of my workday and ruined my time for side-projects at the same time. Brilliant article.