Skip to main content

Animation Basics

Animations are transformations applied to mobjects over time. ManimVTK provides a rich set of animation classes for creating smooth, beautiful movements and effects.
All animations are played using self.play() in your scene’s construct() method

Playing Animations

Basic Syntax

Multiple Animations

Animation Parameters

Animation Types

Creation Animations

Animations that introduce objects to the scene:
Draw the object from start to finish:

Removal Animations

Animations that remove objects from the scene:
Reverse of Create:

Transform Animations

Transform one object into another:
Types of transforms:
  • Transform - Morph one object into another
  • ReplacementTransform - Replace and morph
  • TransformFromCopy - Create copy that transforms
  • ClockwiseTransform - Transform with rotation

Movement Animations

Move objects around the scene:

Rotation Animations

Rotate objects:

Indication Animations

Draw attention to objects:
Briefly highlight:

The .animate Syntax

The most intuitive way to animate transformations:
Benefits:
  • Readable and intuitive
  • Supports method chaining
  • Works with most mobject methods
Examples:

Rate Functions

Control the timing and pacing of animations:
Common rate functions:
  • linear - Constant speed
  • smooth - Ease in and out
  • rush_into - Start slow, end fast
  • rush_from - Start fast, end slow
  • there_and_back - Go and return
  • running_start - Build momentum

Animation Composition

Succession

Animate one after another:

AnimationGroup

Group animations to play together:

LaggedStart

Start animations with a delay:

Advanced Techniques

Custom Run Time

UpdateFromFunc

Animate based on custom function:

ValueTracker

Animate a value over time:

Updaters

Continuous updates during animation:

Animation Timing

Wait Duration

Controlling Speed

Best Practices

Choose run times that feel natural:

Common Patterns

Intro → Content → Outro

Build Up Gradually

Transform Chain

Next Steps

Animations Reference

Complete animations API

Mobjects

Learn about animatable objects

Examples

Browse animation examples

Rate Functions

Explore timing functions