Skip to content

Turtle 0.1

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Jul 20:11
· 117 commits to main since this release
a845bda

Turtle 0.1:

  • Initial Release
  • Builds a Turtle Graphics engine in PowerShell
  • Core commands
    • Get-Turtle (alias turtle) runs multiple moves
    • New-Turtle create a turtle
    • Move-Turtle performas a single move
    • Set-Turtle changes a turtle
    • Save-Turtle saves a turtle
turtle Forward 10 Rotate 120 Forward 10 Roate 120 Forward 10 Rotate 120 |
    Set-Turtle Stroke '#4488ff' |
    Save-Turtle ./Triangle.svg
  • Core Object
    • .Heading controls the turtle heading
    • .Steps stores a list of moves as an SVG path
    • .IsPenDown controls the pen
    • .Forward() moves forward at heading
    • .Rotate() rotates the heading
    • .Square() draws a square
    • .Polygon() draws a polygon
    • .Circle() draws a circle (or partial circle)
  • LSystems
    • Turtle can draw a L system. Several are included:
      • BoxFractal
      • GosperCurve
      • HilbertCurve
      • KochCurve
      • KochIsland
      • KochSnowflake
      • MooreCurve
      • PeanoCurve
      • SierpinskiTriangle
      • SierpinskiCurve
      • SierpinskiSquareCurve
      • SierpinskiArrowheadCurve
      • TerdragonCurve
      • TwinDragonCurve
turtle SierpinskiTriangle 10 4 |
    Set-Turtle Stroke '#4488ff' |
    Save-Turtle ./SierpinskiTriangle.svg