Skip to main content

What is a Scene?

A Scene is the fundamental building block of ManimVTK. It’s a container for your animation that manages:
  • Mobjects (visual objects)
  • Animations (movements and transformations)
  • Camera (viewpoint and perspective)
  • Rendering (video output and VTK export)
Every ManimVTK animation starts with a scene class.

Basic Scene Structure

Key components:
  1. Import: from manimvtk import *
  2. Class definition: Inherit from Scene
  3. construct() method: Where you build your animation

The construct() Method

The construct() method is where all your animation logic lives:
The construct() method is called automatically when you render the scene

Scene Types

ManimVTK provides several scene types for different use cases:
Basic 2D scene - Default scene type
Use for:
  • 2D animations
  • Graphs and plots
  • Educational diagrams

Adding Objects to a Scene

Using add()

Instantly add objects without animation:

Using play()

Add objects with animation:

Adding Multiple Objects

Scene Methods

Animation Control

Play one or more animations:
Pause the animation:
Add objects without animation:
Remove objects from scene:

Camera Control (ThreeDScene)

Set the initial camera position:
Start continuous camera rotation:
Animate camera movement:

Scene Lifecycle

Understanding the order of operations:
Rendering process:
  1. construct() method executes
  2. Animations are recorded
  3. Frames are generated
  4. Video is encoded
  5. VTK export (if requested)

Configuration

In Scene Class

Via Command Line

Via Config File

Create manim.cfg:

Common Patterns

Simple Animation

Sequential Animations

Simultaneous Animations

Build Up and Transform

Best Practices

Break complex scenes into helper methods:
Give viewers time to process:

Debugging Scenes

Preview Frames

Use Lower Quality for Testing

Next Steps

Mobjects

Learn about creating and manipulating objects

Animations

Master animation techniques

Cameras

Control camera movement and perspective

Examples

Browse example scenes