Skip to content

Commit cc3e08e

Browse files
author
James Brundage
committed
feat: Turtle.BoxFractal ( Fixes #37 )
1 parent 768689c commit cc3e08e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Types/Turtle/BoxFractal.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
param(
3+
[double]$Size = 20,
4+
[int]$Order = 4,
5+
[double]$Angle = 90
6+
)
7+
return $this.L('F-F-F-F', [Ordered]@{
8+
F = 'F-F+F+F-F'
9+
}, $Order, [Ordered]@{
10+
'\+' = { $this.Rotate($Angle) }
11+
'-' = { $this.Rotate($Angle * -1) }
12+
'F' = { $this.Forward($Size) }
13+
})
14+

0 commit comments

Comments
 (0)