Skip to content

Instantly share code, notes, and snippets.

@kade-robertson

kade-robertson/FractalTreePPCG.md Secret

Last active Aug 29, 2015
Embed
What would you like to do?
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