@@ -2453,7 +2453,7 @@ return $this
24532453
24542454 $shapes = @(
24552455 "flower", "starflower", "goldenflower", 'triflower',
2456- "arcygon", "polygon",
2456+ "arcygon", "polygon", 'star',
24572457 "square", "circle", "rectangle", 'righttriangle',
24582458 "sierpinskitriangle","sierpinskiarrowheadcurve",
24592459 "sierpinskicurve","sierpinskisquarecurve",
@@ -4115,8 +4115,8 @@ return $this.LSystem('X', [Ordered]@{
41154115 $turtle.Pattern.Save("$pwd/SierpinskiTriangle2.svg")
41164116#>
41174117param(
4118- [double]$Size = 200 ,
4119- [int]$Order = 2 ,
4118+ [double]$Size = (Get-Random -Min 42 -Max 84) ,
4119+ [int]$Order = $(Get-Random -Min 3 -Max 5) ,
41204120 [double]$Angle = 120
41214121)
41224122return $this.LSystem('F-G-G', [Ordered]@{
@@ -4593,7 +4593,17 @@ return $this
45934593 <ScriptMethod >
45944594 <Name >Square</Name >
45954595 <Script >
4596- param([double]$Size = 50)
4596+ < #
4597+ .SYNOPSIS
4598+ Draws a square
4599+ .DESCRIPTION
4600+ Draws a square using Turtle graphics
4601+ .EXAMPLE
4602+ turtle square 42
4603+ #>
4604+ param(
4605+ [double]$Size = $(Get-Random -Min 21 -Max 42)
4606+ )
45974607$null = foreach ($n in 1..4) {
45984608 $this.Forward($Size)
45994609 $this.Rotate(90)
@@ -4626,9 +4636,9 @@ return $this
46264636#>
46274637param(
46284638 # The approximate size of the star
4629- [double]$Size = 50 ,
4639+ [double]$Size = $(Get-Random -Min 21 -Max 42) ,
46304640 # The number of points in the star
4631- [int]$Points = 6
4641+ [int]$Points = $(Get-Random -Min 5 -Max 7)
46324642)
46334643
46344644# To determine the angle, divide 360 by the number of points
0 commit comments