There are two different modes implemented, a twister mode, which is best suited for global deformations, and which was used to make the cartoon morphs and a bezier curve mode, inspired by Avid's Elastic Reality from 1999, which allows to control the movement very easy but also accurate. You can switch between both modes by pushing the button on the right.
To see the bezier warp in action, press 'x' to load, 'c' to build the constrains and 'a' to animate. Switch the different views with 'p'.
Click somewhere to add a new twister gizmo. Now you can move it by draging the center or change the orientation with the blue handle. You can also change the area of interest, where the decay is applied. The decay is modeled by the cos-square function given by Jarek's paper.
Shortcuts:
- a starts the animation
- i inverts the animation
- m makes a movie in application mode
The Bezier-mode is more sophisticated and the main part of the program. Click the 'new curve button to create a new curve. Place the control points with the mouse and hit enter to add the curve and backspace to dismiss it. Afterwards by clicking on the 'adjust curve' mode you can adjust the tangents and the control points, or add new points by clicking on the highlighted mid-points. You can also add anytime control points (not related to any curve) by just clicking on the image. You can drag them to their destination. Switching between source and destination can be obtained by hitting 'p'. To use the bezier-curves, press 'c' and the curves will be sampled based on the curve distance and the specific control points will be introduced. Shortcuts:
- a starts the animation
- p switches between first image, overlay of both and second image. When animating a fourth mode called warping is also available
- o Switches between source and destination. This is to place control points and specify their trajectory
- m makes a movie in application mode
- c extract control points from bezier-curves
- z save your work (does not work online)
- x load your work
Please note that the code does not seem to work properly with new versions of processing. The function
void paintSecondImage (float alpha)
blends the two images together, however the fill(...,alpha) does not work like in previous versions.
Click the applet to activate.
Source code: smile bezier button cg gaussianquad newton p3d twister
Built with Processing
|