```-- | Various 'LSystem's.
-- For 'l0' through 'lB' see <http://paulbourke.net/fractals/lsys/>.
-- For 'lC' see <http://en.wikipedia.org/wiki/Penrose_tiling>.
module LSystem.Systems where

import Graphics.PS
import LSystem.LSystem
import LSystem.Render.PS

-- * 'LSystem' definitions

l0,l1,l2,l3,l4,l5,l6,l7,l8,l9,lA,lB :: LSystem
l0 = lSystem "F+F+F+F" [('F',"F+F-F-FF+F+F-F")]
l1 = lSystem "F+F+F+F" [('F',"FF+F-F+F+FF")]
l2 = lSystem "X" [('F',"FF")
,('X',"F-[[X]+X]+F[+FX]-X")]
l3 = lSystem "a" [('F',">F<")
,('a',"F[+x]Fb")
,('b',"F[-y]Fa")
,('x',"a")
,('y',"b")]
l4 = lSystem "Y" [('X',"X[-FFF][+FFF]FX")
,('Y',"YFX[+Y][-Y]")]
l5 = lSystem "F" [('F',"FF+[+F-F-F]-[-F+F+F]")]
l6 = lSystem "X" [('F',"FF")
,('X',"F[+X]F[-X]+X")]
l7 = lSystem "F" [('F',"F[+FF][-FF]F[-F][+F]F")]
l8 = lSystem "F" [('F',"FFF-[XY]+[XY]")
,('X',"+FY")
,('Y',"-FX")]
l9 = lSystem "FX" [('X',">[-FX]+FX")]
lA = lSystem "FX" [('Y',"-FX-Y")
,('X',"X+YF+")]
lB = lSystem "F+F+F" [('F',"F-F+F")]

lC :: LSystem
lC = lSystem "[7]++[7]++[7]++[7]++[7]" [('6',"8F++9F----7F[-8F----6F]++")
,('7',"+8F--9F[---6F--7F]+")
,('8',"-6F++7F[+++8F++9F]-")
,('9',"--8F++++6F[+9F++++7F]--7F")
,('F',"")]

lD :: LSystem
lD = lSystem "F+F+F+F+F+F" [('F',"F-F++F-F")]

-- * With turning angle and line scalar

l0d = (l0,90.0,1)
l1d = (l1,90.0,1)
l2d = (l2,22.5,1)
l3d = (l3,45.0,1.36)
l4d = (l4,25.7,1)
l5d = (l5,22.5,1)
l6d = (l6,20.0,1)
l7d = (l7,35.0,1)
l8d = (l8,22.5,1)
l9d = (l9,40.0,0.6)
lBd = (lB,120.0,1)
lCd = (lC,36.0,1)
lDd = (lD,60.0,1)

-- * PS Images

l0i,l1i,l2i,l3i,l4i,l5i,l6i,l7i,l8i,l9i,lAi,lBi,lCi,lDi :: Image
l0i = draw 0.4 (renderLO l0d 3 5)
l1i = draw 1.25 (renderLO l1d 3 5)
l2i = draw 1.0 (renderLO l2d 5 5)
l3i = draw 0.4 (renderLO l3d 12 5)
l4i = draw 1.0 (renderLO l4d 6 5)
l5i = draw 1.2 (renderLO l5d 4 5)
l6i = draw 0.5 (renderLO l6d 7 5)
l7i = draw 1.0 (renderLO l7d 4 5)
l8i = draw 0.1 (renderLO l8d 6 5)
l9i = draw 1.2 (renderLO l9d 10 40)
lAi = draw 0.8 (renderLO lAd 11 5)
lBi = draw 1.0 (renderLO lBd 6 5)
lCi = draw 2.0 (renderLO lCd 5 5)
lDi = draw 0.4 (renderLO lDd 5 1)

-- | Generate postscript file with drawings of 'l0' through 'lD'.
--
-- > systems_ps "/tmp/hls.ps"
-- > System.Process.system "gv /tmp/hls.ps"
systems_ps :: FilePath -> IO ()
systems_ps fn = ps fn (Paper 300 300) [l0i,l1i,l2i,l3i,l4i,l5i
,l6i,l7i,l8i,l9i,lAi,lBi
,lCi,lDi]

-- Local Variables:
-- truncate-lines:t
-- End:
```