Skip to content

Commit 807a56d

Browse files
docs: Adding Turtles All The Way Down to README ( Fixes #206 )
Adjusting pattern display size
1 parent e33acf6 commit 807a56d

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ For example, here is an example of a pattern comprised of Koch Snowflakes:
260260
261261
~~~
262262
<div align='center'>
263-
<img src='./Examples/KochSnowflakePattern.svg' alt='Snowflake Pattern' width='50%' />
263+
<img src='./Examples/KochSnowflakePattern.svg' alt='Snowflake Pattern' width='100%' height='50%' />
264264
</div>
265265
We can also animate the pattern, for endless variety:
266266

@@ -284,7 +284,7 @@ $turtle | save-turtle -Path ./EndlessSnowflake.svg -Property Pattern
284284
Pop-Location
285285
~~~
286286
<div align='center'>
287-
<img src='./Examples/EndlessSnowflake.svg' alt='Endless Snowflake Pattern' width='100%' />
287+
<img src='./Examples/EndlessSnowflake.svg' alt='Endless Snowflake Pattern' width='100%' height='50%' />
288288
</div>
289289
### Turtles all the way down
290290

@@ -330,11 +330,11 @@ if (-not $StepCount) {
330330
}
331331
332332
# Set up our turtles.
333-
$followThatTurtle = turtle square $Size turtles ([Ordered]@{
334-
t1 = turtle teleport 0 0
335-
t2 = turtle teleport $Size 0
336-
t3 = turtle teleport $Size $Size
337-
t4 = turtle teleport 0 $Size
333+
$followThatTurtle = turtle stroke '#4488ff' square $Size turtles ([Ordered]@{
334+
t1 = turtle teleport 0 0 stroke '#4488ff'
335+
t2 = turtle teleport $Size 0 stroke '#4488ff'
336+
t3 = turtle teleport $Size $Size stroke '#4488ff'
337+
t4 = turtle teleport 0 $Size stroke '#4488ff'
338338
})
339339
340340
# For each step
@@ -369,7 +369,7 @@ $followThatTurtle | Save-Turtle ./FollowThatTurtlePattern.svg Pattern
369369
</div>
370370
Let's see it as a pattern:
371371
<div align='center'>
372-
<img src='./Examples/FollowThatTurtlePattern.svg' alt='Follow That Turtle' width='100%' />
372+
<img src='./Examples/FollowThatTurtlePattern.svg' alt='Follow That Turtle' width='100%' height='50%' />
373373
</div>
374374

375375
Now let's imagine we have four turtles in the center, and they're trying to get away from the turtles in the corners.
@@ -396,7 +396,7 @@ What kind of shape will this produce?
396396
#>
397397
param(
398398
[double]
399-
$SquareSize = 420,
399+
$SquareSize = 200,
400400
[double]
401401
$HiderSpeed = 2,
402402
[double]
@@ -413,7 +413,7 @@ $stepCount = $squareSize/2 * (1 + ([Math]::Abs($attackerSpeed - $evaderSpeed)))
413413
414414
$hideAndSeek = turtle square $squareSize stroke '#4488ff' turtles ([Ordered]@{
415415
s1 = turtle teleport 0 0 stroke '#4488ff' # stroke 'red' pathclass 'red-stroke' fill red
416-
s2 = turtle teleport $squareSize stroke '#4488ff' 0 # stroke 'yellow' pathclass 'yellow-stroke' fill yellow
416+
s2 = turtle teleport $squareSize 0 stroke '#4488ff' # stroke 'yellow' pathclass 'yellow-stroke' fill yellow
417417
s3 = turtle teleport $squareSize $squareSize stroke '#4488ff' # stroke 'green' pathclass 'green-stroke' fill green
418418
s4 = turtle teleport 0 $squareSize stroke '#4488ff' # stroke 'blue' PathClass 'blue-stroke' fill blue
419419
h1 = turtle teleport $midpoint stroke '#4488ff' # stroke 'red' fill 'red'
@@ -470,7 +470,7 @@ if ($PSScriptRoot) { Pop-Location}
470470
</div>
471471
Let's see it as a pattern:
472472
<div align='center'>
473-
<img src='./Examples/FollowThatTurtleHideAndSeekPattern.svg' alt='Follow That Turtle Hide And Seek Pattern' width='100%' />
473+
<img src='./Examples/FollowThatTurtleHideAndSeekPattern.svg' alt='Follow That Turtle Hide And Seek Pattern' width='100%' height='50%' />
474474
</div>
475475

476476
### Turtles in HTML

README.md.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ $SnowFlakePattern = . $MakeSnowflakePattern
374374

375375
@"
376376
<div align='center'>
377-
<img src='./Examples/$($SnowFlakePattern.Name)' alt='Snowflake Pattern' width='50%' />
377+
<img src='./Examples/$($SnowFlakePattern.Name)' alt='Snowflake Pattern' width='100%' height='50%' />
378378
</div>
379379
"@
380380

@@ -391,7 +391,7 @@ $(
391391

392392
@"
393393
<div align='center'>
394-
<img src='./Examples/EndlessSnowflake.svg' alt='Endless Snowflake Pattern' width='100%' />
394+
<img src='./Examples/EndlessSnowflake.svg' alt='Endless Snowflake Pattern' width='100%' height='50%' />
395395
</div>
396396
"@
397397

@@ -434,7 +434,7 @@ Let's see it as a pattern:
434434

435435
@"
436436
<div align='center'>
437-
<img src='./Examples/FollowThatTurtlePattern.svg' alt='Follow That Turtle' width='100%' />
437+
<img src='./Examples/FollowThatTurtlePattern.svg' alt='Follow That Turtle' width='100%' height='50%' />
438438
</div>
439439
"@
440440

@@ -465,7 +465,7 @@ Let's see it as a pattern:
465465

466466
@"
467467
<div align='center'>
468-
<img src='./Examples/FollowThatTurtleHideAndSeekPattern.svg' alt='Follow That Turtle Hide And Seek Pattern' width='100%' />
468+
<img src='./Examples/FollowThatTurtleHideAndSeekPattern.svg' alt='Follow That Turtle Hide And Seek Pattern' width='100%' height='50%' />
469469
</div>
470470
"@
471471
#endregion Turtles All The Way Down

0 commit comments

Comments
 (0)