[plt-scheme] 2htdp/image

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Mon Nov 16 20:24:47 EST 2009

Robby,

I just started looking at the new image2e teachpack and it looks
great. The extra triangles, polygons, etc. are especially welcome.

However, is there any reason you set out to break backwards compatibility?

For example, the new overlay method draws front to back whereas the
old one did back to front. The new one also lines pictures up on the
top right corner whereas the old one used pinholes, which for most
images were in the center. Having the new versions of overlay and
overlay/xy do roughly what the old ones did seems like it would make
adoption fairly painless, so if they could default to back to front
and line up on centers, I'd be really happy.

Ditto with beside and above--any way those could default to use
centers, since that's often the most reasonable way to line up images?
Then beside-places and above-places would be available for other
choices.

I'm also missing image->color-list, color-list->image,
image->alpha-color-list, and alpha-color-list->image. Were you
planning to add them or no?

Since we'll be using images before we've gotten to polymorphic
functions, can you provide image=? and image=~? so students don't get
a whiff of equal? and equal~? before they should?

Finally, there are a few functions that Stephen Bloch's tiles
teachpack provides that would be nice:

rotate-cw
rotate-ccw
rotate-180
  (these are nice because students can flip things around before
knowing how to use any kinds of arguments other than images)

reflect-vert
reflect-horiz
reflect-main-diag
reflect-other-diag
  (I don't think you have reflection in there, yet)

crop-top
crop-bottom
crop-left
crop-right
  (really nice for cutting off parts and putting back together)

Obviously, some of these are pretty easy and I'd be happy to send in a
patch if you give your blessing. Others, like the ->color-list and
crop- functions are more work, so you'll need to decide if you think
they're useful.

Todd


On Tue, Oct 13, 2009 at 6:06 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> The new HtDP 2e image library is ready for earlier adopters. It isn't
> part of the release that recently went out, but it is available in the
> SVN build of DrScheme (and will be available tomorrow in the nightly
> builds). At the moment, it contains only some basic image operations,
> but I expect to be adding more over the coming weeks. Let me know if
> there are particular operations that you'd like me to get to first.
>
> Here's a quick list of the differences between this and the current
> image teachpack:
>
>  - copying and pasting does not introduce jaggies
>  - equal comparisions are more efficient
>  - added rotation & scaling
>  - got rid of pinholes (see the new overlay, beside, etc functions)
>
> All of the currently implemented functionality is documented here:
>
>  http://pre.plt-scheme.org/docs/html/teachpack/2htdpimage.html
>
> Thanks,
> Robby
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.