Skip to content

Instantly share code, notes, and snippets.

@kade-robertson
Last active August 29, 2015 14:24
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 kade-robertson/96da72b13af6b1bf736c to your computer and use it in GitHub Desktop.
Save kade-robertson/96da72b13af6b1bf736c to your computer and use it in GitHub Desktop.
lsystem FractalTreePPCG {
    set symbols axiom = X;
    set iterations = 6;
    interpret F as DrawForward(10);
    interpret - as TurnLeft(25);
    interpret + as TurnLeft(-25);
    interpret [ as StartBranch;
    interpret ] as EndBranch;
    rewrite X to F - [ [ X ] + X ] + F [ + F X ] - X;
    rewrite F to F F;
}
process all with SvgRenderer;

Copy the above into this site to see a preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment