Typos in turtles (code and docs).

The name of the mathematician is Sierpinski.

* Serpinski => Sierpinski
* Rename serp => sierp.
This commit is contained in:
Rodolfo Henrique Carvalho 2012-02-09 22:33:52 -02:00 committed by Eli Barzilay
parent fc0fd4b537
commit 19f43d27aa
4 changed files with 14 additions and 14 deletions

View File

@ -84,7 +84,7 @@ and one at @math["\u3C0/3"], evaluate
@defform[(tprompt expr ...)]{ @defform[(tprompt expr ...)]{
Limits the splitting of the turtles. Before@racket[expr] is evaluated, Limits the splitting of the turtles. Before @racket[expr] is evaluated,
the state of the turtles (how many, their positions and headings) is the state of the turtles (how many, their positions and headings) is
``checkpointed.'' Then @racket[expr] is evaluated, and then the state ``checkpointed.'' Then @racket[expr] is evaluated, and then the state
of the turtles is restored, but all drawing that may have occurred of the turtles is restored, but all drawing that may have occurred
@ -171,16 +171,16 @@ As the name says...}
Draws a fractal that came up on an exam given at Rice in 1997 or so. Draws a fractal that came up on an exam given at Rice in 1997 or so.
} }
@defthing[serp-size real?]{ @defthing[sierp-size real?]{
A constant that is a good size for the @racket[serp] procedures.} A constant that is a good size for the @racket[sierp] procedures.}
@deftogether[( @deftogether[(
@defproc[(serp [serp-size real?]) void?] @defproc[(sierp [sierp-size real?]) void?]
@defproc[(serp-nosplit [serp-size real?]) void?] @defproc[(sierp-nosplit [sierp-size real?]) void?]
)]{ )]{
Draws the @as-index{Serpinski triangle} in two different ways, the Draws the @as-index{Sierpinski triangle} in two different ways, the
first using @racket[split] heavily. After running the first one, try first using @racket[split] heavily. After running the first one, try
executing @racket[(draw 10)].} executing @racket[(draw 10)].}

View File

@ -67,7 +67,7 @@ new turtles window.}
@defproc[(merge [turtles1 turtles?] [turtles2 turtles?]) turtles?]{ @defproc[(merge [turtles1 turtles?] [turtles2 turtles?]) turtles?]{
The @racket[split] and @racket[tprompt] forms provided by The @racket[split] and @racket[tprompt] forms provided by
@racketmodname[graphics/turtles] isn't needed for @racketmodname[graphics/turtles] aren't needed for
@racketmodname[graphics/value-turtles], since the turtles window is a @racketmodname[graphics/value-turtles], since the turtles window is a
value. value.

View File

@ -3,7 +3,7 @@
(require graphics/turtles) (require graphics/turtles)
(provide regular-poly regular-polys radial-turtles spaced-turtles (provide regular-poly regular-polys radial-turtles spaced-turtles
spokes spyro-gyra neato graphics-bexam serp-size serp serp-nosplit spokes spyro-gyra neato graphics-bexam sierp-size sierp sierp-nosplit
koch-size koch-split koch-draw lorenz lorenz1 peano-size koch-size koch-split koch-draw lorenz lorenz1 peano-size
peano-position-turtle peano fern-size fern1 fern2 gapped-lines) peano-position-turtle peano fern-size fern1 fern2 gapped-lines)
@ -91,9 +91,9 @@
(turn/radians (/ pi 2))) (turn/radians (/ pi 2)))
(gb square-size)) (gb square-size))
(define serp-size 120) (define sierp-size 120)
(define (serp distance) (define (sierp distance)
(define sqrt3 (sqrt 3)) (define sqrt3 (sqrt 3))
(define -2pi/3 (- 0 (/ (* 2 pi) 3))) (define -2pi/3 (- 0 (/ (* 2 pi) 3)))
(define pi/6 (/ pi 6)) (define pi/6 (/ pi 6))
@ -128,7 +128,7 @@
(turn/radians pi) (turn/radians pi)
(engine distance)) (engine distance))
(define (serp-nosplit distance) (define (sierp-nosplit distance)
(define sqrt3 (sqrt 3)) (define sqrt3 (sqrt 3))
(define -2pi/3 (- 0 (/ (* 2 pi) 3))) (define -2pi/3 (- 0 (/ (* 2 pi) 3)))
(define pi/6 (/ pi 6)) (define pi/6 (/ pi 6))

View File

@ -18,8 +18,8 @@
(move -150) (move -150)
(turn/radians (- (/ pi 4))) (turn/radians (- (/ pi 4)))
(graphics-bexam))) (graphics-bexam)))
("Serpinski (split)" ,(lambda () (serp serp-size))) ("Sierpinski (split)" ,(lambda () (sierp sierp-size)))
("Serpinski (no split)" ,(lambda () (serp-nosplit serp-size))) ("Sierpinski (no split)" ,(lambda () (sierp-nosplit sierp-size)))
("Koch (split)" ,(lambda () (koch-split koch-size))) ("Koch (split)" ,(lambda () (koch-split koch-size)))
("Koch (no split)" ,(lambda () (koch-draw koch-size))) ("Koch (no split)" ,(lambda () (koch-draw koch-size)))
("Lorenz Attractor" ,lorenz1) ("Lorenz Attractor" ,lorenz1)