pages of fin

A More Correct Version

(parts 1 | 2 )

After a bit of reading up on L-Systems to refresh my memory I realised that while I had constructed something to create recursive structures using XSL these were not actual L-Systems.

So the next day time to do it properly... this also proved fairly straightforward and so we get some more pretty pictures. Note that the related links do this sort of thing in much more suitable languages, my only hope for this being a reasonable thing to do in XSL is that browsers start to support display of SVG files that are generated on the client side from an XML and XSL file. If that does become the case at least you could say that it was a bandwidth saving way of putting fractal images onto a page.

Other people are doing strange things with XSL as well. The calculator being particularly perverse.

Koch Snowflake
<lsystem width="0.25" iterations="4" x="100" y="150" length="8" angle="60">
    <rule name="axiom">+f--f--f</rule>
    <rule name="f">f+f--f+f</rule>
</lsystem>

Bush
<lsystem width="0.5" iterations="7" x="200" y="400" length="40" angle="14">
    <rule name="y">------a</rule>
    <rule name="a">f[-b]+f[-a]+b@0.9</rule>
    <rule name="b">f[+a]-f[-b]+a@0.9</rule>
</lsystem>
Fern
<lsystem width="0.5" iterations="15" x="0" y="200" length="40" angle="66">
    <rule name="y">a</rule>
    <rule name="a">f[-b][+b]a@0.95</rule>
    <rule name="b">a@0.33</rule>
</lsystem>

Files