Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save WilliamLivingood/8ee0241e971bf00ab29336b38f142e7e to your computer and use it in GitHub Desktop.

Select an option

Save WilliamLivingood/8ee0241e971bf00ab29336b38f142e7e to your computer and use it in GitHub Desktop.
LSystem design 2 / flower thing
LSystem desy2() {
float moveDist = 44f;
float rotateAngle = 25.7f;
float scaleFactor = 2.8f;
String axiom = "X";
HashMap<Character, String> rules = new HashMap<>();
// NOTE: no spaces in the strings:
rules.put('X', "F[+X][-X]FX");
rules.put('F', "FF");
// Create and return the Lsystem
return new LSystem(axiom, rules, moveDist, rotateAngle, scaleFactor);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment