File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -2424,6 +2424,66 @@ return $this.LSystem('F++F++F', [Ordered]@{
2424
2424
'F' = { $this.Forward($Size) }
2425
2425
})
2426
2426
2427
+ </Script >
2428
+ </ScriptMethod >
2429
+ <ScriptMethod >
2430
+ <Name >TurtleMonotile</Name >
2431
+ <Script >
2432
+ < #
2433
+ .SYNOPSIS
2434
+ Draws a turtle aperiodic monotile.
2435
+ .DESCRIPTION
2436
+ This function uses turtle graphics to draw an aperiodic monotile called a "Turtle"
2437
+ .EXAMPLE
2438
+ turtle rotate -90 turtleMonotile 100 save ./turtleMonotile.svg
2439
+ .LINK
2440
+ https://github.com/christianp/aperiodic-monotile/blob/main/turtle-monotile.logo
2441
+ #>
2442
+ param(
2443
+ [double]
2444
+ $A = 100,
2445
+
2446
+ [double]
2447
+ $B = 0
2448
+ )
2449
+
2450
+ if (-not $B) {
2451
+ $B = [Math]::Tan(60 * [Math]::PI / 180) * $A
2452
+ }
2453
+
2454
+ return $this.
2455
+ Rotate(90).
2456
+ Forward($a).
2457
+ Rotate(60).
2458
+ Forward($a).
2459
+ Rotate(-90).
2460
+ Forward($b).
2461
+ Rotate(60).
2462
+ Forward($b).
2463
+ Forward($b).
2464
+ Rotate(60).
2465
+ Forward($b).
2466
+ Rotate(90).
2467
+ Forward($a).
2468
+ Rotate(-60).
2469
+ Forward($a).
2470
+ Rotate(90).
2471
+ Forward($b).
2472
+ Rotate(-60).
2473
+ Forward($b).
2474
+ Rotate(90).
2475
+ Forward($a).
2476
+ Rotate(60).
2477
+ Forward($a).
2478
+ Rotate(-90).
2479
+ Forward($b).
2480
+ Rotate(60).
2481
+ Forward($b)
2482
+
2483
+ return
2484
+
2485
+
2486
+
2427
2487
</Script >
2428
2488
</ScriptMethod >
2429
2489
<ScriptMethod >
You can’t perform that action at this time.
0 commit comments