We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.BinaryTree()
1 parent bb9826e commit f62e32cCopy full SHA for f62e32c
Turtle.types.ps1xml
@@ -98,6 +98,26 @@ $Distance = 10
98
99
$this.Forward($Distance * -1)
100
101
+ </Script>
102
+ </ScriptMethod>
103
+ <ScriptMethod>
104
+ <Name>BinaryTree</Name>
105
+ <Script>
106
+ param(
107
+ [double]$Size = 20,
108
+ [int]$Order = 4,
109
+ [double]$Angle = 45
110
+)
111
+return $this.Rotate(-90).LSystem('0', [Ordered]@{
112
+ '1' = '11'
113
+ '0' = '1[0]0'
114
+}, $Order, [Ordered]@{
115
+ '[01]' = { $this.Forward($Size) }
116
+ '\[' = { $this.Rotate($Angle * -1).Push() }
117
+ '\]' = { $this.Pop().Rotate($Angle) }
118
+})
119
+
120
121
</Script>
122
</ScriptMethod>
123
<ScriptMethod>
0 commit comments