|
51 | 51 | <Name>c</Name> |
52 | 52 | <ReferencedMemberName>CubicBezierCurve</ReferencedMemberName> |
53 | 53 | </AliasProperty> |
| 54 | + <AliasProperty> |
| 55 | + <Name>Cobweb</Name> |
| 56 | + <ReferencedMemberName>Spiderweb</ReferencedMemberName> |
| 57 | + </AliasProperty> |
54 | 58 | <AliasProperty> |
55 | 59 | <Name>CubicBézierCurve</Name> |
56 | 60 | <ReferencedMemberName>CubicBezierCurve</ReferencedMemberName> |
|
175 | 179 | <Name>SierpińskiTriangle</Name> |
176 | 180 | <ReferencedMemberName>SierpinskiTriangle</ReferencedMemberName> |
177 | 181 | </AliasProperty> |
| 182 | + <AliasProperty> |
| 183 | + <Name>Spoke</Name> |
| 184 | + <ReferencedMemberName>Spokes</ReferencedMemberName> |
| 185 | + </AliasProperty> |
| 186 | + <AliasProperty> |
| 187 | + <Name>Stick</Name> |
| 188 | + <ReferencedMemberName>Sticks</ReferencedMemberName> |
| 189 | + </AliasProperty> |
| 190 | + <AliasProperty> |
| 191 | + <Name>Sticks</Name> |
| 192 | + <ReferencedMemberName>Spokes</ReferencedMemberName> |
| 193 | + </AliasProperty> |
178 | 194 | <AliasProperty> |
179 | 195 | <Name>Styles</Name> |
180 | 196 | <ReferencedMemberName>Style</ReferencedMemberName> |
|
191 | 207 | <Name>VLineBy</Name> |
192 | 208 | <ReferencedMemberName>VerticalLine</ReferencedMemberName> |
193 | 209 | </AliasProperty> |
| 210 | + <AliasProperty> |
| 211 | + <Name>Web</Name> |
| 212 | + <ReferencedMemberName>Spiderweb</ReferencedMemberName> |
| 213 | + </AliasProperty> |
194 | 214 | <AliasProperty> |
195 | 215 | <Name>xPos</Name> |
196 | 216 | <ReferencedMemberName>xcor</ReferencedMemberName> |
@@ -3466,6 +3486,103 @@ return $this |
3466 | 3486 |
|
3467 | 3487 | </Script> |
3468 | 3488 | </ScriptMethod> |
| 3489 | + <ScriptMethod> |
| 3490 | + <Name>Spokes</Name> |
| 3491 | + <Script> |
| 3492 | + <# |
| 3493 | +.SYNOPSIS |
| 3494 | + Draws spokes of a wheel |
| 3495 | +.DESCRIPTION |
| 3496 | + Draws spokes of a wheel, or sticks around a point. |
| 3497 | +.NOTES |
| 3498 | + This was adapter from Cynthia Solomon's example on LogoThings |
| 3499 | +.LINK |
| 3500 | + https://logothings.github.io/logothings/logo/Sticks.html |
| 3501 | +.EXAMPLE |
| 3502 | + turtle spokes 42 5 |
| 3503 | +.EXAMPLE |
| 3504 | + turtle spokes 42 6 |
| 3505 | +.EXAMPLE |
| 3506 | + turtle spokes 42 8 |
| 3507 | +.EXAMPLE |
| 3508 | + turtle spokes 42 6 morph @( |
| 3509 | + turtle spokes 42 6 |
| 3510 | + turtle rotate 90 spokes 42 6 |
| 3511 | + turtle rotate 180 spokes 42 6 |
| 3512 | + turtle rotate 270 spokes 42 6 |
| 3513 | + turtle spokes 42 6 |
| 3514 | + ) show |
| 3515 | +.EXAMPLE |
| 3516 | + turtle spokes pathAnimation ( |
| 3517 | + [Ordered]@{ |
| 3518 | + type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3519 | + } |
| 3520 | + ) show |
| 3521 | +.EXAMPLE |
| 3522 | + turtle viewbox 84 turtles @( |
| 3523 | + turtle spokes 42 6 pathAnimation ( |
| 3524 | + [Ordered]@{ |
| 3525 | + type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3526 | + } |
| 3527 | + ) |
| 3528 | + turtle spokes 42 6 pathAnimation ( |
| 3529 | + [Ordered]@{ |
| 3530 | + type = 'rotate' ; values = 360, 0 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3531 | + } |
| 3532 | + ) |
| 3533 | + ) show |
| 3534 | +.EXAMPLE |
| 3535 | + turtle viewbox 84 turtles @( |
| 3536 | + turtle start 42 42 stroke red spokes 42 6 pathAnimation ( |
| 3537 | + [Ordered]@{ |
| 3538 | + type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3539 | + } |
| 3540 | + ) |
| 3541 | + turtle start 42 42 stroke red spokes 42 6 pathAnimation ( |
| 3542 | + [Ordered]@{ |
| 3543 | + type = 'rotate' ; values = 360, 0 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3544 | + } |
| 3545 | + ) |
| 3546 | + turtle start 42 42 stroke green spokes 42 8 pathAnimation ( |
| 3547 | + [Ordered]@{ |
| 3548 | + type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3549 | + } |
| 3550 | + ) |
| 3551 | + turtle start 42 42 stroke green spokes 42 8 pathAnimation ( |
| 3552 | + [Ordered]@{ |
| 3553 | + type = 'rotate' ; values = 360, 0 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3554 | + } |
| 3555 | + ) |
| 3556 | + turtle start 42 42 stroke blue spokes 42 10 pathAnimation ( |
| 3557 | + [Ordered]@{ |
| 3558 | + type = 'rotate' ; values = 0, 360 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3559 | + } |
| 3560 | + ) |
| 3561 | + turtle start 42 42 stroke blue spokes 42 10 pathAnimation ( |
| 3562 | + [Ordered]@{ |
| 3563 | + type = 'rotate' ; values = 360, 0 ;repeatCount = 'indefinite'; dur = "4.2s" |
| 3564 | + } |
| 3565 | + ) |
| 3566 | + ) show |
| 3567 | +#> |
| 3568 | +param( |
| 3569 | +# The radius of the spokes |
| 3570 | +[double] |
| 3571 | +$Radius = 42, |
| 3572 | + |
| 3573 | +# The number of spokes or sticks to draw |
| 3574 | +[int] |
| 3575 | +$SpokeCount = 6 |
| 3576 | +) |
| 3577 | + |
| 3578 | +$spokeAngle = 360 / $SpokeCount |
| 3579 | + |
| 3580 | +foreach ($n in 1..$([Math]::Abs($SpokeCount))) { |
| 3581 | + $this = $this.Forward($radius).Backward($radius * 2).Forward($radius).Rotate($spokeAngle) |
| 3582 | +} |
| 3583 | +return $this |
| 3584 | + </Script> |
| 3585 | + </ScriptMethod> |
3469 | 3586 | <ScriptMethod> |
3470 | 3587 | <Name>Square</Name> |
3471 | 3588 | <Script> |
|
0 commit comments