From 103645595d0963a5287f9b29010783343bc01575 Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Tue, 16 Jan 2018 23:36:41 +0000 Subject: [PATCH] Add Dragon curve --- src/Examples.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Examples.hs b/src/Examples.hs index 8472cec..54f3e1c 100644 --- a/src/Examples.hs +++ b/src/Examples.hs @@ -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)]