[plt-scheme] HtDP teachpacks in upcoming versions

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Fri Apr 27 15:25:19 EDT 2007

Two questions for the Assembled Gurus:

1) On Dec. 28, I sent out an implementation of an alternative API for  
the world teachpack.  It was based on the version of world.ss bundled  
with version 360, not the reorganized more recent version, but the  
point is "what do people think of this API?"  It allows the following  
animations:

Example 1: display an unchanging blue circle.
(run-animation 300 200 (circle 10  "solid" "blue") 1)
; The model is an image, so in the absence of a redraw handler, it  
uses the identity function as a redraw handler.

Example 2: display a blue circle moving right.
(define empty-box (rectangle 5 1 "solid" "white"))
(define (move-right pic)
    (image-beside empty-box pic))
(run-animation 500 100 (circle 10 "solid" "blue") 1 (on-tick move- 
right))
; Ditto, but this time there's a tick handler.

Example 3: display a growing blue circle.
(define (circle-of-size size)
     (circle size "solid" "blue"))
(run-animation 200 200 1 1 (on-tick add1) (on-redraw circle-of-size))
; This time the model isn't an image, so we need to specify a redraw  
handler.

I'm using this API in the "Programming for Poets" classroom this  
semester, and haven't run into any significant unanticipated problems  
with it yet.


2) Is there any likelihood of my "tiles" teachpack (or something like  
it that provides an algebra of images, e.g. horizontal concatenation,  
vertical concatenation, rotation, reflection, etc... scaling would be  
nice but I haven't written it yet) being bundled with the next  
release of DrScheme?


No, wait, three questions:
3) my "tiles" teachpack is built on the current image teachpack,  
which I gather is being seriously redesigned.  According to the  
version I svn-ed a few minutes ago, pinholes still exist.  Are they  
likely to still exist (say) a year from now?



Stephen Bloch
sbloch at adelphi.edu





Posted on the users mailing list.