PowerShell implementation of the classic 'Logo', and demonstration of hosting the PowerShell Engine
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Monad Hosting
Examples.txt
PowerShellLogo.sln
README.md

README.md

PowerShellLogo

PowerShell implementation of the classic 'Logo', and demonstration of hosting the PowerShell Engine.

For more information, see:

Here's an example of a fancy fern done with PowerShell Logo:

################################################################################
##
## Draw a fern.
## Warning -- takes about 40 seconds to compute.
##
################################################################################

$turtle.Reset()

function fern($size)
{
   if($size -lt 5) { return }
   
   $turtle.Forward($size / 20)
   $turtle.Left(80)
   fern ($size * 0.3)
   
   $turtle.Right(82)
   $turtle.Forward($size / 20)

   $turtle.Right(80)
   fern ($size * 0.3)

   $turtle.Left(78)
   fern ($size * 0.9)

   $turtle.Left(2)
   $turtle.Backward($size / 20)
   
   $turtle.Left(2)
   $turtle.Backward($size / 20)
}

$turtle.PenUp()
$turtle.Left(90)
$turtle.Forward(50)
$turtle.Left(90)
$turtle.Forward(180)
$turtle.Right(180)
$turtle.PenDown()

fern 440