Quadratic Koch Island
|
|
- This script is a simple example of non-branching Lindemayer systems (l-systems) at work.
-
 Koch Island
/*
This script is a simple example of non-branching Lindemayer systems (l-systems) at work. It is a fractal shape, that depending on the number of iterations, has infinitely scalable detail on its edge. If you choose to use more than 3 iterations it is possible this may take several hours to run.
IMPORTANT: This requires the 'aa_lsystem.mel' script from the script library, as well as the 'aa_turtle.mel'.
*/
$iterations = 2;
$start = "a+a+a+a";
$rules[0] = "a->a+a-a-aa+a+a-a";
$drawrules[0] = "a->move 1";
$drawrules[1] = "+->turn 90 0";
$drawrules[2] = "-->turn -90 0";
$lstring = aa_lsystem_replace($start,$rules,$iterations);
aa_lsystem_draw($lstring,$drawrules,>,0,0);
|
Quadratic Koch Island
|