L-system: Difference between revisions

Content added Content deleted
m (julia example)
Line 149: Line 149:
=={{header|Julia}}==
=={{header|Julia}}==
Julia has the Lindenmeyer.jl package downloadable via the package manager in the usual fashion.
Julia has the Lindenmeyer.jl package downloadable via the package manager in the usual fashion.
<syntaxhighlight lang="julia"> using Lindenmayer
<syntaxhighlight lang="julia">using Lindenmayer


scurve = LSystem(Dict("F" => "F+F--F+F"), "F--F--F")
scurve = LSystem(Dict("F" => "F+F--F+F"), "F--F--F")
drawLSystem(scurve,
drawLSystem(scurve,
forward = 10,
forward = 16,
turn = 60,
turn = 60,
startingy = 0,
startingx = -200,
startingy = 100,
iterations = 3,
iterations = 3,
filename = "kochsnow.png",
filename = "kochsnow.png",
showpreview = true
showpreview = true
)
)

</syntaxhighlight>{{out}}
</syntaxhighlight>{{out}}
[[File:Kochsnowflake.png|alt=fractal image|Koch Snowflake]]
[[File:Kochsnowflake.png|alt=fractal image|Koch Snowflake]]



=={{header|Wren}}==
=={{header|Wren}}==