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.FlowerPetal
1 parent b5344ea commit a8f7647Copy full SHA for a8f7647
Types/Turtle/FlowerPetal.ps1
@@ -0,0 +1,34 @@
1
+<#
2
+.SYNOPSIS
3
+ Draws a flower made of petals
4
+.DESCRIPTION
5
+ Draws a flower made of a series of petals.
6
+
7
+ Each petal is a combination of two arcs and rotations.
8
+.EXAMPLE
9
+ turtle FlowerPetal 60
10
+#>
11
+param(
12
+# The radius of the flower
13
+[double]
14
+$Radius = 10,
15
16
+# The rotation per step
17
18
+$Rotation = 30,
19
20
+# The angle of the petal.
21
22
+$PetalAngle = 60,
23
24
+# The number of steps.
25
+[ValidateRange(1,1mb)]
26
+[int]
27
+$StepCount = 12
28
+)
29
30
+foreach ($n in 1..$stepCount) {
31
+ $this = $this.Petal($radius, $PetalAngle).Rotate($Rotation)
32
+}
33
34
+return $this
0 commit comments