plant_1.sf 356 B

123456789101112131415161718192021222324
  1. #!/usr/bin/ruby
  2. include('LSystem/LSystem.sf')
  3. var rules = Hash(
  4. S => 'T-[[S]+S]+T[+TS]-S',
  5. T => 'TT', # or: 'T[S]T'
  6. );
  7. var lsys = LSystem(
  8. width: 1000,
  9. height: 1000,
  10. scale: 0.7,
  11. xoff: -200,
  12. yoff: 300,
  13. len: 8,
  14. angle: 25,
  15. color: 'dark green',
  16. );
  17. lsys.execute('S', 6, "plant_1.png", rules);