File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,45 @@ $null = foreach ($n in 1..$StepCount) {
391
391
$this.Rotate($Rotation)
392
392
}
393
393
394
+ return $this
395
+ </Script >
396
+ </ScriptMethod >
397
+ <ScriptMethod >
398
+ <Name >FlowerPetal</Name >
399
+ <Script >
400
+ < #
401
+ .SYNOPSIS
402
+ Draws a flower made of petals
403
+ .DESCRIPTION
404
+ Draws a flower made of a series of petals.
405
+
406
+ Each petal is a combination of two arcs and rotations.
407
+ .EXAMPLE
408
+ turtle FlowerPetal 60
409
+ #>
410
+ param(
411
+ # The radius of the flower
412
+ [double]
413
+ $Radius = 10,
414
+
415
+ # The rotation per step
416
+ [double]
417
+ $Rotation = 30,
418
+
419
+ # The angle of the petal.
420
+ [double]
421
+ $PetalAngle = 60,
422
+
423
+ # The number of steps.
424
+ [ValidateRange(1,1mb)]
425
+ [int]
426
+ $StepCount = 12
427
+ )
428
+
429
+ foreach ($n in 1..$stepCount) {
430
+ $this = $this.Petal($radius, $PetalAngle).Rotate($Rotation)
431
+ }
432
+
394
433
return $this
395
434
</Script >
396
435
</ScriptMethod >
You can’t perform that action at this time.
0 commit comments