On May 10, 2007, at 23:14 UTC, Ryan Dary wrote: > Does anyone know a good morphing algorithm that they'd share? I > think I have a good idea for an interface, and I wanted to produce a > Mac morphing program because they're hard to find. > > I think I understand the basics, but I don't know the actual graphic > processing portion of the application.
I'd use the Trimesh class. It would work basically like this: 1. Divide the image area up into a series of triangles based on features you can get the user to identify. For faces, this would be things like each pupil, tip of the nose, end of each eyebrow, ends and center of the mouth, ears, hair, etc. 2. Prepare two Trimeshes. One has the starting image as the texture; the other has the ending image. Set the vertices in both to where they belong for the first image (making the second one quite distorted). Set the alpha of the first one to fully opaque, and the second to fully transparent. Position them so the second one is slightly in front of the first. 3. Now, on each frame of the update, slightly increase the opacity of the second image, and shift the vertices in both Trimeshes towards where they belong for the final, second image. That should do it, I think... Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Strout Custom Solutions _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
