The CHANGELOG is a record of major changes and releases for Turtle.
View Source
<#
.SYNOPSIS
Project CHANGELOG
.DESCRIPTION
The CHANGELOG for the project
.NOTES
The CHANGELOG is a record of major changes and releases for the project.
#>
param(
# We can provide the repository url by hard-coding it, or it can be provided in site or page metadata.
[uri]
$RepositoryUrl = "https://github.com/PowerShellWeb/Turtle",
# We can provide the changelog path by hard-coding it, or it can provided in site or page metadata.
[string]
$ChangeLogPath = '../CHANGELOG.md'
)
# Push into this location, in case we are building this file interactively.
if ($PSScriptRoot) { Push-Location $PSScriptRoot}
# Get my own help
$myHelp = Get-Help $MyInvocation.MyCommand.ScriptBlock.File
if ($myHelp) {
# If we have page metadata
if ($page -is [Collections.IDictionary]) {
# Replace 'Project' in the title with the url, to make the title and description more helpful
$page.Title = $myHelp.SYNOPSIS -replace 'Project', {
$RepositoryUrl.Segments[-1] -replace '/'
}
$page.Description = $myHelp.Description.text -join [Environment]::NewLine -replace 'The Project', {
$RepositoryUrl.Segments[-1] -replace '/'
}
}
# If we have notes, replace the project with our name
$myNotes = $myHelp.alertSet.alert.text -join [Environment]::NewLine -replace 'The Project', {
$RepositoryUrl.Segments[-1] -replace '/'
}
if ($myNotes) {
# and convert our notes from markdown.
(ConvertFrom-Markdown -InputObject $myNotes).Html
}
}
# Break up the space a bit with horizontal rules.
"<hr/>"
# Display source for this page
"<details>"
"<summary>View Source</summary>"
"<pre>"
"<code class='language-PowerShell'>"
[Web.HttpUtility]::HtmlEncode($MyInvocation.MyCommand.ScriptBlock)
"</code>"
"</pre>"
"</details>"
# Break up the space a bit with horizontal rules.
"<hr/>"
# Get our changelog
(Get-ChildItem -Path $ChangeLogPath |
ConvertFrom-Markdown | # and convert it from markdown
# Then, replace issue links
Select-Object -ExpandProperty HTML) -replace '(?<=[\(\,)]\s{0,})\#\d+', {
$match = $_
if ($RepositoryUrl) {
# with actual links to the issues.
$issueNumber = $($match -replace '\#' -as [int])
"<a href='$RepositoryUrl/issues/$issueNumber'>" + "#$issueNumber" + "</a>"
} else {
"$match"
}
}
# If we pushed into the location, pop back out.
if ($PSScriptRoot) { Pop-Location}
# We're done!
Turtle 0.2:
Turtles All The Way Down
A turtle can now contain .Turtles
Which can contain .Turtles
Which can contain .Turtles
Which can contain .Turtles
...
Turtle 0.1.10:
- Updated Methods
- New Shapes
- Added Demos
- Intro To Turtles (#197)
Turtle 0.1.9:
- Turtle Text Path Support
Get-Turtle
parameter improvements (#169, #170)Get-Turtle
tracks invocation info (#157)
Turtle 0.1.8:
- Turtle Performance
- New Moves:
- New Reflection Examples (#162)
Turtle 0.1.7:
- Morphing Turtles
Turtle.Morph
morphs shapes (#154)Turtle.get/set_Duration
control animation durations (#153)- Lots of new examples
- New Fractals:
Turtle 0.1.6:
- Vastly expanded Get-Turtle examples (#149)
- Check out https://psturtle.com/Commands/Get-Turtle
- New L-Systems:
- Fixing KochCurve parameter order (#147)
- Added New-Turtle docs (#148)
Turtle 0.1.5:
- New Shapes:
- Fixes:
Turtle 0.1.4
Turtle
Upgrades- New Properties:
- New Methods:
- Fixes:
Turtle.Towards()
returns a relative angle (#123)
Turtle 0.1.3
- Fixing
Get-Turtle
inline sets (#108, #107) - Fixing
.PNG/JPEG/WEBP
to no longer try to use msedge (#110) - Adding
Turtle.get/set_FillRule
to get or set the fill rule for the turtle. (#109)
Turtle 0.1.2
Get-Turtle/Turtle
can now get or set properties or methods- New Methods:
Turtle.Distance()
determines the distance to a pointTurtle.Towards()
determines the angle to a pointTurtle.Home()
sends the turtle to 0,0Turtle.lt/rt
aliases help original Logo compatibilityTurtle.Save()
calls Save-Turtle
- Explicitly exporting commands from module
Turtle 0.1.1
- Updates:
Turtle.get/set_ID
allows for turtle identifiersTurtle.ToString()
stringifies the SVG
- Fixes:
- New:
- New Fractals:
Turtle 0.1
- Initial Release
- Builds a Turtle Graphics engine in PowerShell
- Core commands
Get-Turtle
(aliasturtle
) runs multiple movesNew-Turtle
create a turtleMove-Turtle
performas a single moveSet-Turtle
changes a turtleSave-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 can draw a L system. Several are included:
turtle SierpinskiTriangle 10 4 |
Set-Turtle Stroke '#4488ff' |
Save-Turtle ./SierpinskiTriangle.svg