[sci.math] shape-transform graphic programs

g570907053ea@deneb.ucdavis.edu (0040;0000008043;0;80;142;) (04/25/88)

  The classic formA->formB shape mappings done 'freehand' by D'Arcy Thompson
decades ago have been made into algorithms using the tensor calculus by
Fred. Bookstein (U. Michigan) since 1975.  Does anyone know of academically
(or commercially) available software, ideally on a Macintosh, to implement
Bookstein's methods?  His recent co-authored book, titled something like
_Morphometry and Evolution_ (~1985) includes core elements as FORTRAN source,
but that's pretty rudimentary.
  I program extensively, but my interest here is an application (dissertation
data, involving point-point transforms, rather than contour-countour).
  Thanks!


Ron Goldthwaite / UC Davis, Psychology and Animal Behavior
'Economics is a branch of ethics, pretending to be a science; 
 ethology is a science, pretending relevance to ethics.'

flip@pixar.UUCP (Flip Phillips) (04/28/88)

In article <1815@ucdavis.ucdavis.edu> g570907053ea@deneb.ucdavis.edu (0040;0000008043;0;80;142;) writes:
>
>  The classic formA->formB shape mappings done 'freehand' by D'Arcy Thompson
>decades ago have been made into algorithms using the tensor calculus by
>Fred. Bookstein (U. Michigan) since 1975.  Does anyone know of academically
>(or commercially) available software, ideally on a Macintosh, to implement
>Bookstein's methods?  His recent co-authored book, titled something like
>_Morphometry and Evolution_ (~1985) includes core elements as FORTRAN source,
>but that's pretty rudimentary.

I don't have any pointers to commercially available software, but I can
point you to a few things which may interest you. 

A professor I worked with for a while at The Ohio State University
Computer Graphics Research Group, Bill Kolomyjec, (now at Northern Ill. Univ,
DeKalb Ill.) did a lot of imagery of this type. (He was also at Mich.
State) Several projects for his class were based on this interpolation in 2D.

At the Computer Graphics Research Group, Chuck Csuri experimented with 
transformation through interpolation several years ago (60's/70's).

Recently, Tom Hutchinson (now with a west coast computer animation firm)
and Bill Sadler (now at U. of Arizona or arizona State, i don't remember)
did a film called 'Metafable'. (NCGA 1986 or 87) This film relied
heavily on 3D interpolation to convert characters into other characters.
Essentially they took advantage of the shape interpolation alg built into
the animation system there (Twixt, by julian gomez).

Note that I dont think any of these use the Tensor Calc methods of Bernstein
but I thought it may be of some interest. Maybe not...

	-- cheers
		flip





-- 
Flip Phillips                                        {sun | ucbvax}!pixar!flip
Pixar - Marin County, California

alibaba@ucscb.UCSC.EDU (Alexander M. Rosenberg) (04/28/88)

Adobe's Illustrator 88 will do shape transforms like you
described. I haven't seen them done, but it does require
that both object have the same number of points. I am not
sure how well the transoforms turn out, except for the
demonstration one of an "S" turned into a swan.

-------------------------------------------------------------------------------
-  Alexander M. Rosenberg  - INTERNET: alibaba@ucscb.ucsc.edu   - Yoyodyne    -
-  Crown College, UCSC     - UUCP:...!ucbvax!ucscc!ucscb!alibaba- Propulsion  -
-  Santa Cruz, CA 95064    - BITNET:alibaba%ucscb@ucscc.BITNET  - Systems     -
-  (408) 426-8869          - Disclaimer: Nobody is my employer  - :-)         -
-                          - so nobody cares what I say.        -             -

pettit@newport.COM (Teri Pettit) (05/14/88)

In article <3058@saturn.ucsc.edu> alibaba@ucscb.UCSC.EDU (Alexander M. Rosenberg) writes:
>Adobe's Illustrator 88 will do shape transforms like you
>described. I haven't seen them done, but it does require
>that both object have the same number of points. I am not
>sure how well the transoforms turn out, except for the
>demonstration one of an "S" turned into a swan.

CORRECTION: Illustrator 88 does NOT require that both objects have
the same number of points. It does require that either both objects
are closed paths, or both are open (though one can effectively
blend from between an open and a closed path by duplicating the
closed path exactly on top of itself and joining the overlaid
endpoints.)

Probably what you are thinking of is that the user interface
allows the user to select one or more points on each path
before starting the blend, and then the algorithm matches
the selected points into pairs (navigating the paths in the
order that each was created.) Any selected points on one
which are "left over" after this matching are treated just
like unselected points, and since it is hard to remember
whether one created a path in clockwise or counterclockwise
order, the best way to know which points you are matching
up to other points is to select the same number on each path.

In general, the more points you select, the more reasonable
the intermediate shapes look when you are blending between
two complex shapes.

Any points not matched up by this method are inserted into
the created paths according to the ratio of the perimeter
at which they are encountered, unless they come within a
threshhold distance of another point on the other path.
For example, if path A had 6 points and path B had 9 points,
and 3 points on each path were selected, and both paths
had an unselected point exactly halfway between two matched
selected points, then the intermediate created paths would have
11 control points (3 corresponding to the selected pairs,
1 corresponding to the unselected halfway points which just
happen to match each other in the perimeter trace, 2 corresponding
to the unmatched points from path A, and 5 corresponding
to the unmatched points from path B.)

[I should know because I am one of the implementors of Illustrator
88, and in fact did the S to Swan blending (I didn't draw either
the swan or the S, just played around with selecting control
points until I got the best sequence of intermediate shapes.)
The swan probably has close to a hundred control points, the
S has I believe 18. I think I selected 11 on each shape to get
the blend which is in the promotional illustration.]

Once the points are matched and interserted on the two
starting shapes, the intermediate shapes are created by
linearly spacing points along a straight line between
two matched points, and likewise interpolating slope
and curvature. This results in a sequence of shapes which
is seldom the most intuitive for animation-like effects
(since generally speaking, a point on one shape moves
through a path which is not necessarily a straight line
in getting to where it is on the final shape.) However,
for doing general shading effects, it gives much more
control than the user can get by choosing only between
radial and rectangular "fountains", and a straight line
is usually exactly what is wanted. The shape-transforming
feature was designed for exactly this purpose, to get
realistic "air brush" shading effects on shapes other
than circles and rectangles. That it can be used to
create illustrations where a V contorts itself into a
violin or an angel degrades into a devil is just frosting
on the cake. (If time permits, I would like to add more
flexible control over the sequence of blended shapes
to the next version of Illustrator (89?), but to tell
the truth this kind of flashy feature does not really 
rank in utility up to more important things like easier
text manipulation in an illustration.)

	-- Teri Pettit
	adobe!pettit@decwrl.dec.com