[plt-dev] 2htdp/image: Where oh where have my pinholes gone?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Jan 13 11:56:25 EST 2010

On Wed, Jan 13, 2010 at 10:42 AM, Carl Eastlund <carl.eastlund at gmail.com> wrote:
> On Wed, Jan 13, 2010 at 11:23 AM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> Generally sounds like a good idea to me (not for this release, tho).
>
> Thanks.  And I certainly wouldn't expect a change like this by the
> upcoming release.
>
>> As a minor variation on this, the pinhole property of an image could
>> either be #f or a pair of numbers and the existence of a pinhole could
>> trigger drawing it (always). So your animation code would strip the
>> pinhole at the end, via a remove-pinhole function. Drawing a pinhole
>> would probably be a matter of drawing a horizontal and a vertical
>> black line with 50% opacity going thru the whole image that intersects
>> the coordinates of the pinhole. Something like that.
>
> Exactly what I had in mind.  Except for the part about always drawing
> the pinhole, and removing it for animations.  I hadn't thought of that
> -- it's a clever addition.  I like it.
>
> I wouldn't want the default pinhole drawing to pass through the image.
>  That makes it harder to see if the contents of the image are the
> same, for any pixels that fall under that black line.

Drawing with 50% opacity is going to make it pretty easy to see the
difference, I think. You'll be able to see "underneath" the lines. And
I believe that this has the property that comparing the images,
exactly as drawn, should be the same as comparing the images without
the extra lines and then comparing the pinhole coordinates (well, not
quite since the colors only use 2^24 different values, ie a fixed,
small set of integers instead of rationals, but in practice it will
work well I expect).

But we'll want to experiment with this to see how it looks.

> Single pixels
> can matter.  I'd rather have something just at the edges.  I recognize
> that for a large image, that can become hard to interpolate the
> pinhole point, which is why I suggested the numeric display.
>
> Maybe we can make the display more interactive, like syntax snips are.
>  Give right-click options for show pinhole / hide pinhole / numeric
> pinhole, etc.

This is also a good idea, but I think we want to have something that
looks good and is informative that doesn't make the image any bigger
(as a default) and then go from there.

Robby


Posted on the dev mailing list.