Created
October 6, 2025 03:52
-
-
Save WilliamLivingood/8ee0241e971bf00ab29336b38f142e7e to your computer and use it in GitHub Desktop.
LSystem design 2 / flower thing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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