Xref: utzoo sci.math:3679 sci.bio:1181 comp.graphics:2472 comp.sys.mac:16006 Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!bbn!uwmcsd1!ig!agate!ucbvax!decwrl!adobe!newport!pettit From: pettit@newport.COM (Teri Pettit) Newsgroups: sci.math,sci.bio,comp.graphics,comp.sys.mac Subject: Re: shape-transform graphic programs Message-ID: <3920@adobe.COM> Date: 13 May 88 21:53:10 GMT References: <1815@ucdavis.ucdavis.edu> <1762@pixar.UUCP> <3058@saturn.ucsc.edu> Sender: news@adobe.COM Reply-To: pettit@newport.UUCP (Teri Pettit) Organization: Adobe Systems Incorporated, Mountain View Lines: 78 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