In The Algorithmic Beauty of Plants, there's an example parametric L-system (pg 69) showing the model of a flower crocus:
I haven't been able to quite figure out how to interpret the ~
symbol in the production:
p1: a(t) : t<Ta --> F(1)[&(30)~L(0)]/(137.5)a(t+1)
The text describing this above reads:
Production p1 describes the creation of successive internodes F and leaves L by the vegetative apex a. The leaves branch from the stem at an angle of 30° and spiral around the main axis with a divergence equal to 137.5°.
&
means 'bend down'/
means 'roll right'[
means start a new branch, save-state]
means jump back to the previous save-stateI understand that it's intending to indicate a spiral, or twisting, motion - but it's not clear if this is a "shift around a bit" or something that renders to multiple successive operations, throwing lots of additional elements in the rewriting.
I've dug around in the user manuals from Algorithmic Botany, but haven't found any references on what the end result of the production would be. The image above seems to show the leaves on opposite sides, spiraling around as they advance up the stem. If this just "twisted a bit and threw out a leaf" I'd expect to see only a single leaf, rather than the pair.
The same symbol is used in production 3, which displays the flower petals in a spiral as well:
p3 : A : * --> ~K(0)
Can anyone shed some light on what I'm missing?
Of course after asking here, I just found the answer. The ~
doesn't represent spiraling or twisting, but instead represents "present a surface".
I found a reference to it in James Hanan's 1992 dissertation on implementing L-systems, fortunately linked from the algorithmicbotany.com site.
According to the paper (pg 36 in the dissertation)
When the turtle encounters a symbol representing a surface preceded by a tilde (
~
), the corresponding surface is drawn. The exact position and orientation of a predefined surface S is determined using the user-defined contact-point Ps, heading vector Hs, and up vector Us as references.
The paper then goes on to show an example of rendering an Apple blossom and stamens, with appropriate L-system production statements, using the ~
symbol to indicate displaying the relevant surface based on the symbol that comes after the ~
.