Skip to content

Turtle 0.1.4 #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c643e65
feat: `Turtle.get/set_Opacity` ( Fixes #115 )
StartAutomating Aug 9, 2025
fd31969
feat: `Turtle.get/set_Opacity` ( Fixes #115 )
Aug 9, 2025
6a63eae
feat: `Turtle.LSystem` improvement ( Fixes #116 )
StartAutomating Aug 10, 2025
1ee75ee
feat: `Turtle.LSystem` improvement ( Fixes #116 )
Aug 10, 2025
73e12b9
feat: `Turtle.LSystem` improvement ( Fixes #116 )
StartAutomating Aug 10, 2025
5fc6267
feat: `Turtle.LSystem` improvement ( Fixes #116 )
Aug 10, 2025
71ad086
docs: `Turtle.LSystem` improvement ( Fixes #116 )
StartAutomating Aug 10, 2025
1501421
docs: `Turtle.LSystem` improvement ( Fixes #116 )
StartAutomating Aug 10, 2025
a9d7fd0
docs: `Turtle.LSystem` improvement ( Fixes #116 )
Aug 10, 2025
50e800f
docs: `Turtle.LSystem` improvement ( Fixes #116 )
StartAutomating Aug 10, 2025
641f6f9
docs: `Turtle.LSystem` improvement ( Fixes #116 )
Aug 10, 2025
a79c861
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
StartAutomating Aug 10, 2025
dda63d1
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
d5f8375
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
dba7eab
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
af06aec
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
a8d772e
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
9103165
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
0f6656c
feat: `Turtle.get/set_PathAnimation` ( Fixes #117 )
Aug 10, 2025
03ebafe
feat: `Turtle.ArcLeft/ArcRight` ( Fixes #118 )
StartAutomating Aug 13, 2025
3ac0685
feat: `Turtle.ArcLeft/ArcRight` ( Fixes #118 )
Aug 13, 2025
9dc7d14
feat: `Turtle.Petal` ( Fixes #119 )
StartAutomating Aug 13, 2025
1bf9f6c
feat: `Turtle.Petal` ( Fixes #119 )
StartAutomating Aug 13, 2025
25b97c8
feat: `Turtle.Petal` ( Fixes #119 )
Aug 13, 2025
624cd45
feat: `Turtle.Petal` ( Fixes #119 )
StartAutomating Aug 13, 2025
87adc75
feat: `Turtle.Petal` ( Fixes #119 )
StartAutomating Aug 13, 2025
c5dcb7d
feat: `Get-Turtle` splatting ( Fixes #121 )
StartAutomating Aug 13, 2025
6343de4
feat: `Get-Turtle` empty turtle support ( Fixes #112 )
StartAutomating Aug 13, 2025
7fe0460
feat: `Get-Turtle` splatting ( Fixes #121 )
StartAutomating Aug 13, 2025
2a50438
feat: `Turtle.StepSpiral` ( Fixes #122 )
StartAutomating Aug 13, 2025
1aed035
feat: `Turtle.StepSpiral` ( Fixes #122 )
Aug 13, 2025
a054812
feat: Turtle.Spirolateral ( Fixes #120 )
StartAutomating Aug 13, 2025
b517669
feat: Turtle.Spirolateral ( Fixes #120 )
Aug 13, 2025
aa70204
fix: `Turtle.Towards` relative angle ( Fixes #123 )
StartAutomating Aug 14, 2025
3820425
fix: `Turtle.Towards` relative angle ( Fixes #123 )
Aug 14, 2025
c087d9e
docs: `Turtle.set_PathAnimation docs ( re #117 )
StartAutomating Aug 14, 2025
f68863f
docs: `Turtle.set_PathAnimation docs ( re #117 )
Aug 14, 2025
b5344ea
test: Rounding test for positions
StartAutomating Aug 14, 2025
a8f7647
feat: `Turtle.FlowerPetal` ( Fixes #124 )
StartAutomating Aug 14, 2025
7f4980f
feat: `Turtle.FlowerPetal` ( Fixes #124 )
Aug 14, 2025
12a1c25
feat: `Turtle.get/set_Width/Height` ( Fixes #125 )
StartAutomating Aug 14, 2025
b373046
feat: `Turtle.get/set_Width/Height` ( Fixes #125 )
Aug 14, 2025
6f710c5
feat: `Turtle.Horizontal/VerticalLine` ( Fixes #126 )
StartAutomating Aug 14, 2025
77e04a4
feat: `Turtle.Horizontal/VerticalLine` ( Fixes #126 )
Aug 14, 2025
2ea3c9a
feat: `Turtle.Spirolateral` ( Fixes #120 )
StartAutomating Aug 14, 2025
a081100
feat: `Turtle.Spirolateral` ( Fixes #120 )
Aug 14, 2025
f0ec39c
docs: `Turtle.Spirolateral` ( Fixes #120 )
StartAutomating Aug 14, 2025
52d5fe0
docs: `Turtle.Spirolateral` ( Fixes #120 )
Aug 14, 2025
0ce0495
docs: `Turtle.Spirolateral` ( Fixes #120 )
Aug 14, 2025
8b1558e
docs: `Turtle.StepSpiral` ( Fixes #122 )
StartAutomating Aug 14, 2025
08ab953
docs: `Turtle.StepSpiral` ( Fixes #122 )
StartAutomating Aug 14, 2025
100f765
docs: `Turtle.StepSpiral` ( Fixes #122 )
Aug 14, 2025
89435a8
docs: `Turtle.StepSpiral` ( Fixes #122 )
Aug 14, 2025
2bad1f9
release: Turtle 0.1.4
StartAutomating Aug 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## Turtle 0.1.4

* `Turtle` Upgrades
* `turtle` will return an empty turtle (#112)
* `turtle` now splats to script methods, enabling more complex input binding (#121)
* `LSystem` is faster and more flexible (#116)
* New Properties:
* `get/set_Opacity` (#115)
* `get/set_PathAnimation` (#117)
* `get/set_Width/Height` (#125)
* New Methods:
* `HorizontalLine/VerticalLine` (#126)
* `Petal` (#119)
* `FlowerPetal` (#124)
* `Spirolateral` (#120)
* `StepSpiral` (#122)
* Fixes:
* `Turtle.Towards()` returns a relative angle (#123)

---

## Turtle 0.1.3

* Fixing `Get-Turtle` inline sets (#108, #107)
Expand Down
27 changes: 18 additions & 9 deletions Commands/Get-Turtle.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function Get-Turtle {
# We want to keep track of the current member,
# and continue to the next word until we find a member name.
$currentMember = $null
$outputTurtle = $false
# We want to output the turtle by default, in case we were called with no parameters.
$outputTurtle = $true

# To do this in one pass, we will iterate through the words and arguments.
# We use an indexed loop so we can skip past claimed arguments.
Expand Down Expand Up @@ -116,15 +117,13 @@ function Get-Turtle {
}
# Now we know how long it took to get to the next member name.

# And we can determine if we have any parameters
# And we can determine if we have any parameters.
# (it is important that we always force any parameters into an array)
$argList =
if ($methodArgIndex -eq ($argIndex + 1)) {
@()
}
else {
@(if ($methodArgIndex -ne ($argIndex + 1)) {
$wordsAndArguments[($argIndex + 1)..($methodArgIndex - 1)]
$argIndex = $methodArgIndex - 1
}
})

# Look up the member information for the current member.
$memberInfo = $turtleType.Members[$currentMember]
Expand All @@ -145,8 +144,18 @@ function Get-Turtle {
) {
# If we have arguments,
if ($argList) {
# pass them to the method.
$currentTurtle.$currentMember.Invoke($argList)
# and we have a script method
if ($memberInfo -is [Management.Automation.Runspaces.ScriptMethodData]) {
# set this to the current turtle
$this = $currentTurtle
# and call the script, splatting positional parameters
# (this allows more complex binding, like ValueFromRemainingArguments)
. $currentTurtle.$currentMember.Script @argList
} else {
# Otherwise, we pass the parameters directly to the method
$currentTurtle.$currentMember.Invoke($argList)
}

} else {
# otherwise, just invoke the method with no arguments.
$currentTurtle.$currentMember.Invoke()
Expand Down
3 changes: 2 additions & 1 deletion Examples/BoxFractal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Examples/EndlessBoxFractal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Examples/EndlessHilbert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading