ANIMATION FRAMEWORK
An animation framework for animating arbitrary changes in a visualization via morphing of geometries is provided. Geometry from a visualization is captured from before and after a change to the visualization, which is used to generate a series of frames to provide a smooth morphing animation of the change to the visualization. Transitional geometry representing a merged state between the initial geometry and the final geometry of the visualization is generated to build frames between the initial frame and the final frame. The morphing animation may be governed by a timing curve and may be built according to a display rate to ensure a smooth animation.
1 . A method for creating a morphing animation of a change to a visualization, comprising:
taking an initial snapshot of geometries comprising the visualization before the change;
taking a final snapshot of the geometries comprising the visualization after the change;
caching the initial snapshot and the final snapshot;
interpreting the cached snapshots to create merged geometries, wherein the merged geometries represent transitional states between the cached snapshots;
synthesizing a plurality of frames renderable as static images to comprise the morphing animation, wherein the frames are generated based on the merged geometries; and
transmitting the plurality of frames to a client to be rendered in the visualization, thereby providing the morphing animation of the change to the visualization.
2 . The method of claim 1 , further comprising:
taking an intermediate snapshot of the geometries comprising the visualization during the change; and
caching the intermediate snapshot.
3 . The method of claim 1 , wherein a final frame of the plurality of frames corresponds to the final snapshot, and the plurality of frames does not include a frame corresponding to the initial snapshot.
4 . The method of claim 1 , wherein generating, the plurality of frames further comprises:
receiving an animation loop, the animation loop including a duration and a Frames per Second (FPS) rate for playback of the morphing animation, wherein a number of frames of the plurality of frames synthesized does not exceed a number based on the duration and the FPS rate.
5 . The method of claim 4 , wherein the animating loop further includes a timing curve, wherein the timing curve specifies a rate at which the merged geometries illustrate the change from the initial geometry to the final geometry in the morphing animation.
6 . The method of claim 1 , wherein the snapshots and the plurality of frames are cached in a storyboard object, wherein the storyboard object is operable to provide repeated playback of the plurality of frames according to a timeline.
7 . The method of claim 1 , wherein an element of the geometries comprising the initial snapshot is associated with an element of the geometries comprising the final snapshot.
8 . The method of claim 7 , wherein an element of the geometries comprising the initial snapshot is not present in the final snapshot, further comprising:
associating the element with an arbitrary geometry in the final snapshot; and
wherein creating the merged geometries for the arbitrary geometry and the element includes at least one of:
fading the element out as the morphing animation progresses;
shrinking the element to the arbitrary geometry, wherein the arbitrary geometry is a point; and
merging the element into the arbitrary geometry, wherein the arbitrary geometry is a neighboring element sharing common geometry with the element in the initial snapshot.
9 . The method of claim 7 , wherein an element of the geometries comprising the final snapshot is not present in the initial snapshot, further comprising:
associating the element with an arbitrary geometry in the initial snapshot; and
wherein creating the merged geometries for the arbitrary geometry and the element includes at least one of:
fading the element in as the morphing animation progresses;
growing the element from the arbitrary geometry, wherein the arbitrary geometry is a point; and
splitting the element from the arbitrary geometry, wherein the arbitrary geometry is a neighboring element sharing common geometry with the element in the initial snapshot.
10 . A system for creating a morphing animation of a change to a visualization, comprising:
a processor; and
a memory storage including instructions, which when executed by the processor are operable to provide:
an animation engine operable to provide a morphing animation of a change to a visualization of data, the animation engine including:
a snapshot module, operable to respond to the change to the visualization by taking an initial snapshot of geometries comprising the visualization before the change and a final snapshot of the geometries comprising the visualization after the change;
a tweener module, operable to receive the initial snapshot and the final snapshot from the snapshot module, and interpret the snapshots to create merged geometries, wherein the merged geometries represent transitional states between the initial snapshot and the final snapshot;
a framing module, operable to receive the merged geometries from the tweener module to generate a plurality of frames renderable by a client as static images to comprise the morphing animation, wherein the frames are generated based on the merged geometries; and
a buffer module, operable to receive the plurality of frames from the framing module to store the plurality of frames and transmit the plurality of frames to the client to be rendered in the visualization, thereby providing the morphing animation of the change.
11 . The system of claim 10 , wherein the snapshot module is further operable to take an intermediate snapshot of the geometries comprising the visualization during the change.
12 . The system of claim 10 , wherein the tweener module is operable to synthesize a number of the merged geometries based on an animation duration and a Frames per Second (FPS) rate specified by the client, wherein the number of the merged geometries does not exceed a number of frames corresponding to the animation duration at the FPS rate.
13 . The system of claim 12 , wherein the tweener module is operable to synthesize the merged geometries at a highest steady rate that does not exceed the FPS rate.
14 . The system of claim 10 , wherein the buffer module includes multiple sub-buffers, wherein the sub-buffers enable the framing module to generate the plurality of frames independently from the rendering of the visualization.
15 . The system of claim 10 , wherein the tweener module is further operable to receive a timing curve, wherein the tweener module applies the timing curve to set a rate of change from the initial geometries to the final geometries in the transitional states.
16 . The system of claim 15 , wherein the timing curve is linear.
17 . The system of claim 10 , wherein the buffer module is further operable to store the plurality of frames in sequential order as a storyboard object, wherein the storyboard object is operable to provide repeated playback of the morphing animation of the change.
18 . A computing device for creating a morphing animation, comprising:
a processor; and
a memory storage including instructions, which when executed by the processor are operable to:
receive a timing curve, the timing curve including a duration of the morphing animation;
receive a Frames per Second (FPS) rate at which a client will render the morphing animation;
take an initial snapshot of geometries comprising the visualization before the change;
take a final snapshot of the geometries comprising the visualization after the change;
cache the initial snapshot and the final snap shot as key frames within a storyboard object;
interpret the cached snapshots to create merged geometries, wherein the merged geometries represent transitional states between the cached snapshots, wherein the transitional states are determined according to the timing curve;
generate a plurality of frames renderable as static images to comprise the morphing animation, wherein the frames are generated based on the merged geometries, and wherein a number of the plurality of frames does not exceed a number based on the duration and the FPS rate;
cache the plurality of frames within the storyboard object according to a timeline; and
transmit the storyboard object to the client to be rendered in the visualization, wherein the storyboard object is operable to provide repeated playback of the morphing animation of the change.
19 . The computing device of claim 18 , wherein an element of the geometries comprising the initial snapshot is not present in the final snapshot, further comprising:
associating the element with an arbitrary geometry in the final snapshot; and
wherein creating the merged geometries for the arbitrary geometry and the element includes at least one of:
fading the element out as the morphing animation progresses;
shrinking the element to the arbitrary geometry, wherein the arbitrary geometry is a point; and
merging the element into the arbitrary geometry, wherein the arbitrary geometry is a neighboring element sharing common geometry with the element in the initial snapshot.
20 . The computing device of claim 18 , wherein an element of the geometries comprising the final snapshot is not present in the initial snapshot, further comprising:
associating the element with an arbitrary geometry in the initial snapshot; and
wherein creating the merged geometries for the arbitrary geometry and the element includes at least one of:
fading the element into the geometries comprising the final snapshot as the morphing animation progresses;
growing the element from the arbitrary geometry, wherein the arbitrary geometry is a point; and
splitting the element from the arbitrary geometry, wherein the arbitrary geometry is a neighboring element sharing common geometry with the element in the initial snapshot.