[racket] image.ss: can one make a rotation-invariant middle?

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Sun Feb 6 08:08:18 EST 2011

On Feb 5, 2011, at 11:18 PM, Yaron Minsky wrote:

> Sorry for the noise: I think I answered my own question.  You basically stick a pinhole in the image you want to place at its desired center

Yes, the "desired center" is sometimes tricky.  In particular, what one probably means by the "center" of an equilateral triangle is NOT the center of its bounding rectangle, but is rather 2/3 of the way down.

One thing I've done (without using pinholes, although that's perhaps a more intuitive approach) is to overlay a shape at specified (x,y) coordinates onto a transparent circle that's big enough to contain it completely.  You can do this using overlay/xy, or place-image, or whatever.


Stephen Bloch
sbloch at adelphi.edu




Posted on the users mailing list.