diff --git a/lindenmayer-system/lindenmeyer-system.html b/lindenmayer-system/lindenmeyer-system.html index a512192..e06ad67 100644 --- a/lindenmayer-system/lindenmeyer-system.html +++ b/lindenmayer-system/lindenmeyer-system.html @@ -189,7 +189,7 @@ function sierpinski() { * some other tree ************************************************/ - function other_tree(num_defects) { + function other_tree() { project.clear(); if(typeof num_defects == 'undefined') { num_defects = 0 }; var r = generate( @@ -204,22 +204,6 @@ function sierpinski() { 8 ); - var n = 0; - while(n < num_defects) { - var rnd = Math.floor(Math.random()*r.length); - if((r[rnd] != '[') & (r[rnd] != ']')) { - r[rnd] = '*'; - if(Math.random() > 0.9) { - if(Math.random() < 0.5) { - r.splice(rnd, 0, '+'); - } else { - r.splice(rnd, 0, '-'); - } - } - n += 1; - } - } - console.log(r); var p = draw( r,