Add Lévy C curve
This commit is contained in:
parent
103645595d
commit
1b2defc067
1 changed files with 10 additions and 0 deletions
|
@ -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+-"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue