Add Dragon curve
This commit is contained in:
parent
e720d90160
commit
103645595d
1 changed files with 11 additions and 0 deletions
|
@ -7,6 +7,7 @@ module Examples
|
|||
, kochSnowflake
|
||||
, sierpinski
|
||||
, sierpinskiArrow
|
||||
, dragon
|
||||
) where
|
||||
|
||||
import Lib
|
||||
|
@ -69,3 +70,13 @@ sierpinskiArrow = LSystem
|
|||
60
|
||||
10
|
||||
[('A',Forward), ('B',Forward), ('+',TurnRight), ('-',TurnLeft)]
|
||||
|
||||
-- | Dragon curve
|
||||
dragon = LSystem
|
||||
"FX+-"
|
||||
"FX"
|
||||
[('X', "X+YF+"),
|
||||
('Y', "-FX-Y")]
|
||||
90
|
||||
10
|
||||
[('F',Forward), ('+',TurnRight), ('-',TurnLeft)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue