Keyframes Spline Interpolator#
Tutorial on making keyframe-based animation in FURY using Spline interpolators.
Position keyframes as a dict object containing timestamps as keys and positions as values.
creating FURY dots to visualize the position values.
creating two timelines (one uses linear and the other uses’ spline interpolator), each timeline controls a sphere actor
Note: linear_interpolator is used by default. So, no need to set it for this first animation that we need to linearly interpolate positional animation.
creating a second timeline that translates another larger sphere actor using spline interpolator.
Setting 5th degree spline interpolator for position keyframes.
Wrapping animations up!#
Adding everything to a
Timeline to control the two timelines.
First we create a timeline with a playback panel:
timeline = Timeline(playback_panel=True)
Add visualization dots actor to the scene.
Adding the animations to the timeline (so that it controls their playback).
Adding the timeline to the show manager.
Now that these two animations are added to timeline, if the timeline is played, paused, …, all these changes will reflect on the animations.
Total running time of the script: ( 0 minutes 0.111 seconds)