[plt-scheme] I miss end-of-time...

From: Anthony Cowley (acowley at seas.upenn.edu)
Date: Thu Mar 11 15:01:58 EST 2010

On Thu, Mar 11, 2010 at 2:34 PM, Stephen Bloch <BLOCH at adelphi.edu> wrote:
> In recent versions of the world/universe teachpacks, the "end-of-time" function has been removed.  This makes some animations considerably harder or more unnatural to write.
>
> Try this: write an animation of a disk whose radius starts at 0 and grows by 1 pixel per second.  The animation stops when the user presses any key on the keyboard.
>
> You could do this with a struct that contains a "quitting?" field, but my students won't see structs for several more weeks. So the model has to be just a number.  Now how could the key handler indicate, with a number, that the animation should stop?

Could you use a cons of your original model and a growth velocity?
It's more than a single number, but it's not exactly a struct.

Anthony


Posted on the users mailing list.