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/26011af7f84a9fb0bc8f to your computer and use it in GitHub Desktop.
Save kade-robertson/26011af7f84a9fb0bc8f to your computer and use it in GitHub Desktop.
lsystem GosperCurveHexPPCG {
    set symbols axiom = F;
    set iterations = 4;
    interpret F as DrawForward(10);
    interpret G as DrawForward(10);
    interpret - as TurnLeft(60);
    interpret + as TurnLeft(-60);
    rewrite F to F + G + + G - F - - F F - G + ;
    rewrite G to - F + G G + + G + F - - F - G ;
}
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