manim

Parametric curve is always in front of Surface

Parametric curve is always in front of Surface Question: I am trying to build an animation of a Dehn twist in a torus in Manim. My goal is to get something that looks like this: I managed to parametrize the curve and surface correctly in Manim. As you can see, the portion of the parametric …

Total answers: 2

How does one add set symbols in manim?

How does one add set symbols in manim? Question: I’m trying to write the set of natural and real numbers in manim using MathTex, but I haven’t found a way that works. Every time I try to use shortcuts I’ve searched up about LaTeX, such as N, natnums, mathbb{N}, and such don’t work, returning the …

Total answers: 1

Divide by zero and adjust sample rate of sin(1/x)

Divide by zero and adjust sample rate of sin(1/x) Question: I want to create the function f(x)=sin(30/x) in Manim. However, I get an error because I’m dividing by zero. So I adjusted the definition set. The sample rate is also too low, how can I increase the number of sample rates so that the graph …

Total answers: 1

Why is ManimCE plotting a different graph than the one provided?

Why is ManimCE plotting a different graph than the one provided? Question: I’m trying to create a graph for the function (1+1/x)^x. I wrote it in python like this: def func(x): return pow(1+(1/x),x) I then plotted it like this: graph = axes.plot(lambda x: func(x), color=BLUE, stroke_width=2, x_range=[0,X_MAX]) (X_MAX is a variable that equals 1000) but …

Total answers: 2

Making a text box function for Manim, but Tex objects insert automatic line breaks

Making a text box function for Manim, but Tex objects insert automatic line breaks Question: I wrote the following code, which attempts to take a list of strings, and fit them inside of a bounding box of a specified width and height. It does this by inserting line breaks in appropriate places, and if the …

Total answers: 1

get_center ignoring submobjects

get_center ignoring submobjects Question: If I create a Dot and add (as a submobject) a label (Text mobject) above the dot and then call the get_center function, the center of the dot is moved because the function uses the submobjects to calculate the center of the mobject. >>> v = Dot() >>> v.get_center() array([0., 0., …

Total answers: 1

manim does not create an output file

manim does not create an output file Question: If I run python -m manimlib scene.py ket_bra My scene renders fine into the interactive viewer, but I don’t get any output file, the terminal prints the following ManimGL v1.6.1 [13:55:48] INFO Using the default configuration file, which you can modify in `c:usersmiikamanimmanimlibdefault_config.yml` config.py:323 INFO If you …

Total answers: 2

Manim exception in text mobject example

Manim exception in text mobject example Question: I’m trying to run this example from Manim community documentation: from manim import * class HelloWorld(Scene): def construct(self): text = Text(‘Hello world’).scale(3) self.add(text) For some reason I’m getting this error: TypeError: __init__() got an unexpected keyword argument ‘color’ I’m using the latest version of Manim community (0.14.0) What …

Total answers: 1

ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects Question: Error while installing manimce, I have been trying to install manimce library on windows subsystem for linux and after running pip install manimce Collecting manimce Downloading manimce-0.1.1.post2-py3-none-any.whl (249 kB) |████████████████████████████████| 249 kB 257 kB/s Collecting Pillow Using cached Pillow-8.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 …

Total answers: 7

A problem with rendering nested animations in Manim

A problem with rendering nested animations in Manim Question: Code from manim import * import numpy as np import math as math class MaclaurinSine(MovingCameraScene): def construct(self): self.camera.frame.scale(0.5) coords = NumberPlane() L = [] def next_graph (n,x): f = math.fsum([(((-1)**m)*(x**(2*m+1))/(math.factorial(2*m+1))) for m in range(n)]) return f graph_basic = coords.get_graph(lambda x:next_graph(0,x),x_range=[-17,17]) self.add(graph_basic) for i in range(1,20): graph1 …

Total answers: 1