Skip to content

Commit 5473e15

Browse files
docs: More Examples
1 parent 035f41f commit 5473e15

File tree

1 file changed

+41
-35
lines changed

1 file changed

+41
-35
lines changed

Commands/Get-Turtle.ps1

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -556,43 +556,12 @@ function Get-Turtle {
556556
'Rotate', 45 * 8
557557
)
558558
.EXAMPLE
559-
# We can combine negative arcs and positive movement to make a swirl
559+
# We can combine arcs and movement to make a pinwheel
560560
turtle @(
561-
'circlearc', -42, -60,
561+
'circlearc', 42, 60,
562562
'rotate',60,
563563
'forward',42 * 6
564-
)
565-
.EXAMPLE
566-
# We can create cool shapes by combining polygons and arcs
567-
turtle @(
568-
'circlearc', 42, -60,
569-
'rotate',60,
570-
'forward',42 * 6
571-
)
572-
573-
# And we can morph them
574-
575-
turtle @(
576-
'circlearc', 42, -60,
577-
'rotate',60,
578-
'forward',42 * 6
579-
) morph @(
580-
turtle @(
581-
'circlearc', 42, -60,
582-
'rotate',60,
583-
'forward',42 * 6
584-
)
585-
turtle @(
586-
'circlearc', 42, 60,
587-
'rotate',60,
588-
'forward',42 * 6
589-
)
590-
turtle @(
591-
'circlearc', 42, -60,
592-
'rotate',60,
593-
'forward',42 * 6
594-
)
595-
)
564+
)
596565
.EXAMPLE
597566
# Lets morph positive quadrants into negative quadrants
598567
$quadrants = Turtle @(
@@ -636,7 +605,44 @@ function Get-Turtle {
636605
'Rotate', 45 * 8
637606
)
638607
$octants
639-
)
608+
)
609+
.EXAMPLE
610+
# We can overlap pinwheels to make even more exotic shapes
611+
turtle @(
612+
@(
613+
'circlearc', 21, -60,
614+
'rotate',60,
615+
'forward',42 * 6
616+
'rotate', 30
617+
) * 12
618+
)
619+
.EXAMPLE
620+
# We can morph these exotic shapes to create hypnotic animations
621+
622+
$exoticShape = turtle (
623+
@(
624+
'circlearc', 21, -60,
625+
'rotate',60,
626+
'forward',42 * 6
627+
628+
'rotate', 30
629+
) * 12
630+
)
631+
632+
$exoticShape |
633+
turtle morph @(
634+
$exoticShape
635+
turtle (
636+
@(
637+
'circlearc', 21, 60,
638+
'rotate',60,
639+
'forward',42 * 6
640+
641+
'rotate', 30
642+
) * 12
643+
)
644+
$exoticShape
645+
)
640646
.EXAMPLE
641647
#### Turtles all the way down
642648
# Turtles can contain turtles.

0 commit comments

Comments
 (0)