Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • This is hilarious. Most of these L-systems generate "morphic words", https://en.wikipedia.org/wiki/Morphic_word, a kind of L-system I have a particular affection for, because it seems to me like the simplest kind of aperiodic sequence.

    As a fascinating coincidence, it was specifically thanks to Mark Dominus that I was fiddling with L-systems on Monday, even though I was not yet aware of this article. I wanted plant models that were a little more stochastic and expressive than bare L-systems, but less verbose and clunky than the CGA shape grammars used in CityEngine. Claude suggested parameterizing Chris Coyne's "context-free design grammars", giving very pleasing results like

      # A monopodial tree: every node puts out one lateral and the axis carries
      # on at `ratio` scale, so the laterals shrink, and crowd together, in the
      # same geometric progression toward the tip.
    
      param ratio = 0.9 in 0.7..0.97
      param lateral = 0.5 in 0.2..0.8
      param spread = 50 in 0..90
      param divergence = 137.5 in 0..180
      param droop = 6 in -20..30
    
      start shoot
    
      shoot when size < 0.03: leaf 6 3
      shoot:
          limb 1 0.09
          shoot roll divergence tilt 0±5 scale ratio
          shoot tilt spread±10 bend droop scale lateral
    
    Further examples and 3-D rendering at http://canonical.org/~kragen/sw/plants.
  • > I tried to get Claude to help me with this article, but it said the premise was too stupid so I had to do it myself.

Explore Birbla archives