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.Pentaplexity
1 parent b6986f7 commit 999ca38Copy full SHA for 999ca38
Types/Turtle/Pentaplexity.ps1
@@ -0,0 +1,31 @@
1
+<#
2
+.SYNOPSIS
3
+ Draws a Pentaplexity
4
+.DESCRIPTION
5
+ Draws a Pentaplexity Fractal, using an L-System
6
+.LINK
7
+ https://paulbourke.net/fractals/lsys/
8
+.EXAMPLE
9
+ turtle Pentaplexity 42 1
10
11
+ turtle Pentaplexity 42 2
12
13
+ turtle Pentaplexity 42 3
14
15
+ turtle Pentaplexity 42 4
16
+#>
17
+param(
18
+# The size of each segment
19
+[double]$Size = 200,
20
+# The order of magnitude (the number of expansions)
21
+[int]$Order = 4,
22
+# The default angle.
23
+[double]$Angle = 36
24
+)
25
+return $this.LSystem('F++F++F++F++F', [Ordered]@{
26
+ F = 'F++F++F+++++F-F++F'
27
+}, $Order, [Ordered]@{
28
+ '\+' = { $this.Rotate($Angle) }
29
+ '-' = { $this.Rotate($Angle*-1)}
30
+ 'F' = { $this.Forward($Size) }
31
+})
0 commit comments