File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -835,6 +835,37 @@ param(
835835$this.Rotate($Angle * -1)
836836 </Script >
837837 </ScriptMethod >
838+ <ScriptMethod >
839+ <Name >LevyCurve</Name >
840+ <Script >
841+ < #
842+ .SYNOPSIS
843+ Draws a Levy Curve
844+ .DESCRIPTION
845+ Draws a Levy Curve L-System
846+ .LINK
847+ https://paulbourke.net/fractals/lsys/
848+ #>
849+ param(
850+ # The size of each segment.
851+ [double]$Size = 10,
852+ # The number of expansions (the order of magnitude)
853+ [int]$Order = 4,
854+ # The angle
855+ [double]$Angle = 45
856+ )
857+
858+ $this.LSystem('F', @{
859+ F='-F++F-'
860+ }, $Order, [Ordered]@{
861+ '\+' = { $this.Rotate($angle)}
862+ '-' = { $this.Rotate($angle * -1)}
863+ 'F' = { $this.Forward($size)}
864+ })
865+
866+
867+ </Script >
868+ </ScriptMethod >
838869 <ScriptMethod >
839870 <Name >LSystem</Name >
840871 <Script >
You can’t perform that action at this time.
0 commit comments