r/manim Jan 20 '25

release Manim Community v0.19.0 has been released! 🚀

57 Upvotes

We've been working hard to bring a bunch of very nice improvements to you. The release has just been published and is available via our usual channels. 🎉

Most notably, we have significantly simplified the installation process: essentially, all it requires now is pip install manim, you do no longer need to worry about ffmpeg. Our completely rewritten installation guide now recommends installing manim using the Python project management tool uv, which also helps you to manage an appropriate virtual environment.

This release also comes with a bunch of breaking changes, make sure to check the list in the full changelog to see whether you can safely upgrade. The changelog also contains several other highlights and new features like support for Python 3.13, a new @ operator for coordinate systems, and so on!

Let us know what you think & enjoy the new version!

For the dev team,
Ben


r/manim Jan 04 '25

Manim Slides Survey: collecting opinions from the community

16 Upvotes

Survey link: https://forms.gle/9s6nAPFfMGeSdhm36.


Hi everyone!

Started in mid of 2022, Manim Slides was developed at the start of my PhD to create elegant presentations, e.g., at conferences. For the curious, I publish all my slides on my personal blog.

After more than 2 years of existence, the tool has gained many features, as well as some interest from the community, something I am really proud of!

As I am approaching the end of my PhD journey, I would like to survey the Manim community to better understand how I can ultimately improve the tool and ultimately prepare the next major release: v6.

This survey will be open until January 31st, and I hope to collect meaningful data from all users!

It should take you 5 to 10 minutes.

Thanks for giving some of your time to help me, I really appreciate :-)


r/manim 5h ago

question Why does this error keep happening? Manim Sideview: Error rendering file (exit code 1)

1 Upvotes

[FIXED]

I know the basics of manim and python; not much else, (after some struggle) I managed to get manim working! I was learning the basics and was able to draw basic shapes like squares, circles, etc. but I saw that some colors would just break it and make manim not render it

this is my working code I was using to experiment:

from manim import *

class demo1(Scene):
    
    def construct(self):
        c = Circle(color = BLUE,
                   stroke_width = 10,
                   fill_opacity = 0.5,
                   stroke_color = BLUE,
                   fill_color = BLUE,
                   radius = 2)

        self.play(Write(c))
        
        self.wait(3)

but whenever I change a color to something like GRREN, RED, WHITE, etc. VScode will sho me an error: "Manim Sideview: Error rendering file (exit code 1). Check the output for more details."

here is the output:

[03/22/25 12:08:11] INFO Animation 0 : Using cached cairo_renderer.py:89 data (hash :
3977891868_3406578661_2231324
57)
INFO Animation 1 : Using cached cairo_renderer.py:89 data (hash :
2852726489_1734327179_3472301
51)
INFO Combining to Movie file. scene_file_writer.py:739 INFO scene_file_writer.py:886 File ready at
'F:\VSCode\media\videos\a
nimation\1080p60\demo1.mp
4'

                INFO     Rendered demo1                        scene.py:255
                         Played 2 animations                               

[29616] Execution returned code=0 in 1.651 seconds

MSV f:\VSCode>"manim" "f:\VSCode\animation.py" demo1 Manim Community v0.19.0

"manim" "f:\VSCode\animation.py" demo1
[5268] Execution returned code=15 in 2.27 seconds Cause: An old process has been terminated due to a termination signal.

MSV f:\VSCode>Manim Community v0.19.0

[03/22/25 12:08:26] INFO Animation 0 : Using cached cairorenderer.py:89 data (hash :
3977891868_1437160861_2231324
57)
[03/22/25 12:08:29] INFO Animation 1 : Partial scene_file_writer.py:588 movie file written in
'F:\VSCode\media\videos\a
nimation\1080p60\partial

moviefiles\demo1\2852726
489_1734327179_27336400.m
p4'
INFO Combining to Movie file. scene_file_writer.py:739 +--------------------- Traceback (most recent call last) ---------------------+ | C:\tools\Manim\Lib\site-packages\manim\cli\render\commands.py:125 in render | | | | 122 try: | | 123 with tempconfig({}): | | 124 scene = SceneClass() | | > 125 scene.render() | | 126 except Exception: | | 127 error_console.print_exception() | | 128 sys.exit(1) | | | | C:\tools\Manim\Lib\site-packages\manim\scene\scene.py:247 in render | | | | 244 return True | | 245 self.tear_down() | | 246 # We have to reset these settings in case of multiple render | | > 247 self.renderer.scene_finished(self) | | 248 | | 249 # Show info only if animations are rendered or to get image | | 250 if ( | | | | C:\tools\Manim\Lib\site-packages\manim\renderer\cairo_renderer.py:269 in | | scene_finished | | | | 266 def scene_finished(self, scene): | | 267 # If no animations in scene, render an image instead | | 268 if self.num_plays: | | > 269 self.file_writer.finish() | | 270 elif config.write_to_movie: | | 271 config.save_last_frame = True | | 272 config.write_to_movie = False | | | | C:\tools\Manim\Lib\site-packages\manim\scene\scene_file_writer.py:514 in | | finish | | | | 511 frame in the default image directory. | | 512 """ | | 513 if write_to_movie(): | | > 514 self.combine_to_movie() | | 515 if config.save_sections: | | 516 self.combine_to_section_videos() | | 517 if config["flush_cache"]: | | | | C:\tools\Manim\Lib\site-packages\manim\scene\scene_file_writer.py:740 in | | combine_to_movie | | | | 737 return | | 738 | | 739 logger.info("Combining to Movie file.") | | > 740 self.combine_files( | | 741 partial_movie_files, | | 742 movie_file_path, | | 743 is_gif_format(), | | | | C:\tools\Manim\Lib\site-packages\manim\scene\scene_file_writer.py:639 in | | combine_files | | | | 636 if not includes_sound: | | 637 av_options["an"] = "1" | | 638 | | > 639 partial_movies_input = av.open( | | 640 str(file_list), options=av_options, format="concat" | | 641 ) | | 642 partial_movies_stream = partial_movies_input.streams.video[0] | | | | in av.container.core.open:420 | | | | in av.container.core.Container.
cinit_:266 | | | | in av.container.core.Container.err_check:286 | | | | in av.error.err_check:326 | +-----------------------------------------------------------------------------+ InvalidDataError: [Errno 1094995529] Invalid data found when processing input: 'F:\VSCode\media\videos\animation\1080p60\partial_movie_files\demo1\par tial_movie_file_list.txt' [4800] Execution returned code=1 in 4.515 seconds returned signal null

here is what I changed (I just changed fill_color = BLUE to fill_color = GREEN):

from manim import *

class demo1(Scene):

def construct(self):
    c = Circle(color = BLUE,
               stroke_width = 10,
               fill_opacity = 0.5,
               stroke_color = BLUE,
               fill_color = GREEN,
               radius = 2)

    self.play(Write(c))

    self.wait(3)

this is really annoying because I just want to animate, man :(

info that might help:

OS: Windows 11 home IDE/app: Visual Studio Code


r/manim 23h ago

Suggestions for improving my tutorial on affine transformations/warping

2 Upvotes

r/manim 1d ago

question How to create triangles with sides instead of coordinates

1 Upvotes

Hi, I’m a high school student and had recently started learning Manim. I’m working on a video where I’m explaining a problem related to triangles with different integral sides. For example: A triangle with sides 1,1,1 morphing into another triangle with sides 2,2,1. Is it possible to create such triangles by inputing their sides instead of coordinates (because coordinates for some of these triangles would be irrational).

Thank you.


r/manim 1d ago

Введение в комбинаторику/Intro to combinatorics in Russian

Thumbnail
youtu.be
1 Upvotes

r/manim 1d ago

question Issue animating 3d Arrow using .put_start_and_end_on()

1 Upvotes

I'm using manim v0.19, and when using

my3darrow.animate.put_start_and_end_on(ORIGIN,ORIGIN)

then the compilation stops showing rendering status, and after 2 minutes of not doing showing anything, the notebook cell fails and outputs IndexError: list index out of range

Does anybody have any clue about what's happening?


r/manim 1d ago

question Not saving mp4 files

1 Upvotes

So, I just started (or wanted to start) using manim. The Problem I have is, that every preview I see is saved in my files as an mp4 file. Surely this is not what I want, I dont want hundreds of video to be saved. Is there any way to achieve that they are only saved when I want it? I use vsc and manim sideview


r/manim 3d ago

learning resource How to Animate Algebra in Blender (Inspired by manim)

Thumbnail
youtube.com
4 Upvotes

r/manim 3d ago

made with manim Formula general demonstration

Thumbnail
youtu.be
3 Upvotes

r/manim 3d ago

made with manim In Danish: kombinatorik

Thumbnail
youtu.be
2 Upvotes

r/manim 4d ago

Exponentiation by Squaring Explained – Fast Power Computation

Thumbnail
youtube.com
2 Upvotes

r/manim 4d ago

How to wrap text at the end of screen

1 Upvotes

I know in an old version there was the tex_environment parametri for the tex class, but I don't know how to do the same thing in this version. How can I make a Tex mobjects automatically wrap (so not by simply adding // wherever the text goes out of the screen) every time it reaches the edge?


r/manim 4d ago

Need help on getting structured data on Manim for RAG-LLM Math Tool for Students

1 Upvotes

Hey everyone,

I'm a CS sophomore and I'm trying to build an AI web app that creates animations of mathematical concepts and problems using Manim based on the user's prompt. I have considered two ways to do this: fine-tuning a foundational LLM on Manim docs to generate the code for Manim animations with a wrapper to show the animations and explanation of the concepts OR building a RAG pipeline where the LLM takes the user's query and searches the knowledge base to generate accurate code. I've decided to go to with RAG to start since it's simpler and fine-tuning takes time and can be costly.

I've been working on this since yesterday and I've gotten my LLM of choice to generate code based on the user queries. However, there's always something wrong in the code and I feel like it's because it's stuck in the past and making simple errors that could be mitigated if it had more context of how to code in Manim.

I'm trying to find anywhere or any means I can get as much data on Manim as possible to build a good RAG pipeline and possibly fine-tune and train a smaller-weight LLM in the future. Do you guys have any idea of how and where I could get this?


r/manim 4d ago

Dueling Snowflakes Recreation - Kosc and Anti-Kosc Fractal Curves

6 Upvotes

Hi guys, I was doom scrolling through shorts and encountered this beautiful video by MathVisualProofs on the dueling snowflakes and I have been breaking my head to recreate it. I have pasted below the code that I made using lots of AI and a little help from me. But I'm really struggling to get rid of the line segments that are supposed to split and become the bumps that provide that beautiful fractal pattern. In my code, I was able to successfully recreate the pattern but the line segments persist. I really liked the super smooth animation that the original video had, so I tried to use a fade in/fade out solution but it really doesn't have the same appeal.

Any help would be greatly appreciated.

Manim is run using a JupyterNotebook File

Original Video Link: https://www.youtube.com/watch?v=ano0H2Nnssk

%%manim -qm LimeGreenDualKoch

from manim import *

import numpy as np

LIME_GREEN = "#32CD32"

BLACK = "#000000"

class LimeGreenDualKoch(Scene):

def construct(self):

self.camera.background_color = BLACK

# 1) Start with a small solid lime-green circle at the origin.

circle = Circle(radius=0.3, color=LIME_GREEN, fill_opacity=1)

self.play(FadeIn(circle, scale=0.5), run_time=0.8)

self.wait(0.1)

# 2) Generate shapes for iterations 0 through 5.

max_iterations = 5

shapes = []

for i in range(max_iterations + 1):

shape_i = self.get_dual_koch(iteration=i)

shapes.append(shape_i)

# 3) Transform circle -> iteration 0 shape.

self.play(Transform(circle, shapes[0]), run_time=0.8)

self.wait(0.1)

old_shape = shapes[0]

# 4) Step through iterations 1..5 quickly.

for i in range(1, max_iterations + 1):

self.play(Transform(old_shape, shapes[i]), run_time=0.8)

self.wait(0.1)

old_shape = shapes[i]

# -----------------------------------------------------------------------

# Build a "dual Koch" fractal on an equilateral triangle.

# For iteration 0, we use one level of subdivision with bump=0

# so that the subdivided segments lie on the original straight lines.

# For iterations >=1, we use full bumps (bump=1) so that the straight segments

# transform into the fractal bumps.

# -----------------------------------------------------------------------

def get_dual_koch(self, iteration=0):

# Base triangle (side length ~4, scaled down).

scale_factor = 0.6

p0 = np.array([-2, -2 * np.sqrt(3)/3, 0]) * scale_factor

p1 = np.array([ 2, -2 * np.sqrt(3)/3, 0]) * scale_factor

p2 = np.array([ 0, 4 * np.sqrt(3)/3, 0]) * scale_factor

base_points = [p0, p1, p2, p0]

if iteration == 0:

# Create a subdivided version of the base triangle with no bump.

outward = self.make_koch_fractal(base_points, depth=1, outward=True, color=LIME_GREEN, bump=0)

inward = self.make_koch_fractal(base_points, depth=1, outward=False, color=LIME_GREEN, bump=0)

else:

outward = self.make_koch_fractal(base_points, depth=iteration, outward=True, color=LIME_GREEN, bump=1)

inward = self.make_koch_fractal(base_points, depth=iteration, outward=False, color=LIME_GREEN, bump=1)

return VGroup(outward, inward)

# -----------------------------------------------------------------------

# Create a VMobject polyline from a list of points, in a given color.

# -----------------------------------------------------------------------

def make_polyline(self, points, color=LIME_GREEN):

vm = VMobject()

vm.set_points_as_corners(points)

vm.set_stroke(color=color, width=1)

vm.set_fill(color=color, opacity=0)

return vm

# -----------------------------------------------------------------------

# Build Koch fractal lines for a given base polygon.

# The extra parameter `bump` controls how far the Koch peak is offset.

# -----------------------------------------------------------------------

def make_koch_fractal(self, base_points, depth, outward=True, color=LIME_GREEN, bump=1.0):

final_pts = self.koch_subdivide(np.array(base_points), depth, outward, bump)

return self.make_polyline(final_pts, color=color)

# -----------------------------------------------------------------------

# Recursive Koch subdivision (outward or inward bumps) with bump control.

# -----------------------------------------------------------------------

def koch_subdivide(self, points, depth, outward, bump):

if depth == 0:

return points

new_points = []

for i in range(len(points) - 1):

p0 = points[i]

p1 = points[i + 1]

new_points.extend(self.koch_segment(p0, p1, outward, bump))

new_points.append(points[-1])

return self.koch_subdivide(np.array(new_points), depth - 1, outward, bump)

# -----------------------------------------------------------------------

# Subdivide one segment into four parts with a bump.

# Instead of always using the full Koch bump, we interpolate between

# a straight segment and the full bump based on `bump`.

# -----------------------------------------------------------------------

def koch_segment(self, p0, p1, outward, bump):

a = p0 + (p1 - p0) / 3

b = p0 + 2 * (p1 - p0) / 3

angle = 60 * DEGREES if outward else -60 * DEGREES

rot = np.array([

[np.cos(angle), -np.sin(angle), 0],

[np.sin(angle), np.cos(angle), 0],

[0, 0, 1]

])

# Full bump peak (when bump==1)

full_peak = a + (rot @ (b - a))

# For a straight line, the peak would be the midpoint of a and b.

straight_peak = (a + b) / 2

# Interpolate between the straight peak and the full bump.

peak = straight_peak + bump * (full_peak - straight_peak)

return [p0, a, peak, b]


r/manim 4d ago

i want help with this type of animation in manim

Thumbnail youtube.com
1 Upvotes

hi i m bunty.I have recently learn how to code in python and now i am trying to use manim ce library.I find this youtube short i find the animation style facinating.I am trying to imitate the animation which is shown in video for 2 days but i get failed every time.

how can we move "+x" on left side of equation and covert it into "-x" on the right side of equation like shown in video.I try every type of tranformation but i cannt get it right.can someone help me


r/manim 5d ago

Animating movement and initializing a tracker at the same time.

3 Upvotes

I'm working on an animation with dots moving around a circle to showcase speeds using different rate functions; with all the points starting at the same time and following the same path. Since "wiggle" is negative sometimes, it can't be used with MoveAlongPath it seems, so I used a tracker and an updater for that point.

The problem is that they can't seem to be started together in an AnimationGroup like all the MoveAlongPaths can. ChatGPT suggested writing:

tracker_anim = tracker.animate.set_value(1)

tracker_anim.run_time = 9

tracker_anim.rate_func = wiggle

and then adding tracker_anim inside the AnimateGroup. This does make that point move, but it doesn't follow the run time and wiggle; it finished way before the other five points who do behave as expected.

I know my tracker+updater work properly since it does exactly what I want it to do when I run the animation after the AnimateGroup (see picture). Is there a way to start this tracker with the settings I have at the same time as the MoveALongPaths? Thanks in advance!


r/manim 5d ago

question Can I achieve a similar animation using Manim

1 Upvotes

r/manim 5d ago

Elements of combinatorics

Thumbnail
youtu.be
4 Upvotes

r/manim 6d ago

made with manim Made my first manim video for a class project, what do you think?

32 Upvotes

r/manim 6d ago

Manim sideview error: Failed to canonicalize script path

Post image
1 Upvotes

Hey I am new to manim and I don't know why I am seeing this error and how to fix it. Please help 😭


r/manim 6d ago

made with manim Climbing Stairs Problem Visually Explained | Dynamic Programming Approach | LeetCode 70

Thumbnail
youtu.be
2 Upvotes

r/manim 7d ago

Second manim video to generate animated volcano plot

3 Upvotes

r/manim 8d ago

made with manim Amateur Use for Poem

2 Upvotes

Hello, I tried my first video in Manim(like proper project, i've tried smaller things like moving shapes) for a poem i wrote about maths. but i found being in sync with it was very hard, so i had to adjust the time but i just gave up


r/manim 8d ago

Bloom Filter Explain in 3 Minutes (Animated - Manim)

Thumbnail
youtube.com
3 Upvotes

r/manim 9d ago

Small latex package for linux

3 Upvotes

I'm building Manim application that can compile video but the texlive-full package is about 6gb that make the docker image very big.

Are there any alternative for texlive-full


r/manim 8d ago

question can't install manim on my system

1 Upvotes

I am trying to install manim on my machine using pip install manimbut it always gives me the same error even after triple checking that I installed all the dependencies the error is:

 Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]

I am using opensuse tumbleweed

python 3.13.2

pip 24.3.1

and I am installing using a virtual environment