Add Lévy C curve

This commit is contained in:
Dimitri Lozeve 2018-01-16 23:36:57 +00:00
parent 103645595d
commit 1b2defc067

View file

@ -2,6 +2,7 @@ module Examples
( -- * Space-filling curves ( -- * Space-filling curves
gosper gosper
, hilbert , hilbert
, levyC
-- * Fractals -- * Fractals
, koch , koch
, kochSnowflake , kochSnowflake
@ -33,6 +34,15 @@ hilbert = LSystem
10 10
[('F',Forward), ('+',TurnRight), ('-',TurnLeft)] [('F',Forward), ('+',TurnRight), ('-',TurnLeft)]
-- | Lévy C curve
levyC = LSystem
"F+-"
"F"
[('F', "+F--F+")]
45
10
[('F',Forward), ('+',TurnRight), ('-',TurnLeft)]
-- | Koch curve -- | Koch curve
koch = LSystem koch = LSystem
"F+-" "F+-"