Add Penrose P3 tiling
This commit is contained in:
parent
05feb56763
commit
76a579c981
2 changed files with 18 additions and 1 deletions
|
@ -8,4 +8,4 @@ import Examples
|
|||
main :: IO ()
|
||||
main =
|
||||
display (InWindow "L-System" (200, 200) (10, 10)) black (color white pic)
|
||||
where pic = drawLSystem $ iterateLSystem 7 plant
|
||||
where pic = drawLSystem $ iterateLSystem 6 penroseP3
|
||||
|
|
|
@ -11,6 +11,8 @@ module Examples
|
|||
, dragon
|
||||
, tree
|
||||
, plant
|
||||
-- * Tilings
|
||||
, penroseP3
|
||||
) where
|
||||
|
||||
import Lib
|
||||
|
@ -112,3 +114,18 @@ plant = LSystem
|
|||
25
|
||||
1
|
||||
[('F',Forward), ('+',TurnRight), ('-',TurnLeft), ('[',Push), (']',Pop)]
|
||||
|
||||
-- | Penrose P3
|
||||
penroseP3 =
|
||||
LSystem
|
||||
"MNOPA+-[]"
|
||||
"[N]++[N]++[N]++[N]++[N]"
|
||||
[('M',"OA++PA----NA[-OA----MA]++")
|
||||
,('N',"+OA--PA[---MA--NA]+")
|
||||
,('O',"-MA++NA[+++OA++PA]-")
|
||||
,('P',"--OA++++MA[+PA++++NA]--NA")
|
||||
,('A',"")]
|
||||
36
|
||||
10
|
||||
[('M',Forward), ('N',Forward), ('O',Forward), ('P',Forward), ('A',Forward),
|
||||
('+',TurnRight), ('-',TurnLeft), ('[',Push), (']',Pop)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue