So I am trying to make a program that grows the image “HI” using big-bang. I have it placed in the center of the canvas. I want the text size to start at 1 and stop growing when the size reaches 80. I’ve added the on-tick but it still won’t start at 1 and grow. Any ideas on what I am doing wrong?
edit-
(require 2htdp/image)
(require 2htdp/universe)
(define word "HELLO WORLD" )
(define (draw-world world )
(place-image (text word world "olive")
240 210
(empty-scene 500 300)))
(define (next t)
(cond [(>= (draw-world t) 80) t]
[else (+ t 1)]))
(big-bang 1
(on-tick add1)
(to-draw draw-world)
(stop-when zero?))
There are a few things. The most important one is in
draw-worldwhere you draw a text of size 11. If you instead draw a text of size
worldthen your text will have the same size as the current world.After fixing that bug, you will immediately spot the next thing to fix.
Update: