racket/collects/graphics/turtle-test.rkt
Eli Barzilay 672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00

46 lines
1.5 KiB
Racket

(module turtle-test mzscheme
(require mred
mzlib/class
mzlib/math
"turtle-examples.rkt"
"turtles.rkt")
(define frame (make-object frame% "Turtle Examples"))
(define options
`(("Triangle" ,(lambda () (regular-poly 3 100)))
("Hexagons" ,(lambda () (regular-polys 6 10)))
("Spokes" ,spokes)
("Spyro Gyra" ,spyro-gyra)
("Neato" ,neato)
("Graphics BExam" ,(lambda ()
(turn/radians (/ pi 4))
(move -150)
(turn/radians (- (/ pi 4)))
(graphics-bexam)))
("Sierpinski (split)" ,(lambda () (sierp sierp-size)))
("Sierpinski (no split)" ,(lambda () (sierp-nosplit sierp-size)))
("Koch (split)" ,(lambda () (koch-split koch-size)))
("Koch (no split)" ,(lambda () (koch-draw koch-size)))
("Lorenz Attractor" ,lorenz1)
("Peano" ,(lambda () (peano-position-turtle) (peano peano-size)))
("Fern" ,(lambda () (turn/radians (/ pi 2)) (move -100) (fern1 fern-size)))
("Gapped Lines" ,(lambda () (gapped-lines)))))
(for-each (lambda (test)
(send
(make-object button%
(car test)
frame
(lambda x
(turtles #t)
(clear)
(yield)
((cadr test))))
stretchable-width #t))
options)
(make-object grow-box-spacer-pane% frame)
(send frame show #t))