morphing

Duane Maxwell dmaxwell at san.rr.com
Fri Dec 7 03:33:39 UTC 2001


Gary McGovern asks:
> I was wondering if it is possible to morph (in the English dictionary
sense)a red rectangle into a yellow
> ellipse (at some point there would be a kind of orange rountangle) ?

For your simple case of rectangle->ellipse, you might be able to get away
with using a round-cornered square, then changing the corner radius until
it's a circle, interpolating the color, all the while also transforming the
object until you have the appropriate rectangle/ellipse.

For more complex objects, I don't know of a way to do this in Squeak at the
moment.

There are really two kinds of morphing commonly used - interpolation of
vector shapes, as seen in Flash and some 3D products, and image morphing, as
seen in such world-class award-winning products as the former Gryphon
Software's Morph (written by a supremely talented god-like programmer, I
might add).

In vector shape morphing, you need to decompose the representation of the
two shapes to a common primitive type, in this case probably splines, come
with a correspondence between the two shapes' control points, then
interpolate them along with any other important characteristics such as
color.

In image morphing, you create some sort of mapping between elements in the
two images, then cross-distort the two images and crosd-fade the pixels.
The mapping used in Morph, for instance, was  Delaunay triangulation of
control points and lines interactively provided by users.  Other programs
used a region/outline interpolation, sometimes done by interpolating shapes
a la vector morphing.

-- Duane






More information about the Squeak-dev mailing list