Manim v0.11.0 Release Tour#
This interactive worksheet contains an overview over the new features contained in the latest release of the community maintained version of Manim.
from manim import *
config.media_embed = True
config.verbosity = "WARNING"
config.media_width = "80%"
#2075: New method: Mobject.set_default
for changing default values#
With the new set_default
method it is easy to change default arguments for mobjects. For example, Text.set_default(color=RED)
changes the default color of Text
to red:
%%manim -qm -v WARNING ChangedDefaultDemo
class ChangedDefaultDemo(Scene):
def construct(self):
Text.set_default(color=BLUE)
t = Text("This is blue text, magic!")
# You can also change multiple arguments at once:
Circle.set_default(color=GREEN, fill_opacity=0.5)
c = Circle()
VGroup(t, c).arrange(DOWN)
self.add(t, c)
# Call the method without arguments to restore the default behavior!
Text.set_default()
Circle.set_default()
Manim Community v0.18.1
#2094: Implicit function plotting#
There is now a new Mobject allowing to plot points that satisfy some equation. Here is an example for the curves defined by \((x^2 + y^2)^2 - 42 (x^2 - y^2) = 0\) (yellow) and \(x^3 - x + 1 - y^2 = 0\) (red).
ImplicitFunction?
%%manim -qm -v WARNING ImplicitFunctionDemo
import numpy as np
class ImplicitFunctionDemo(Scene):
def construct(self):
plane = NumberPlane()
curve = ImplicitFunction(
lambda x, y: (x**2 + y**2)**2 - 42*(x**2 - y**2),
color=YELLOW,
max_quads=2000,
)
self.add(plane)
self.play(Create(curve))
self.wait()
elliptic_curve = ImplicitFunction(
lambda x, y: x**3 - x + 1 - y**2,
color=RED,
)
self.play(Create(elliptic_curve))
self.wait()
Manim Community v0.18.1
Animation 0: Create(ImplicitFunction): 0%| | 0/30 [00:00<?, ?it/s]
Animation 0: Create(ImplicitFunction): 33%|███▎ | 10/30 [00:00<00:00, 99.80it/s]
Animation 0: Create(ImplicitFunction): 67%|██████▋ | 20/30 [00:00<00:00, 85.85it/s]
Animation 0: Create(ImplicitFunction): 97%|█████████▋| 29/30 [00:00<00:00, 61.67it/s]
Animation 2: Create(ImplicitFunction): 0%| | 0/30 [00:00<?, ?it/s]
Animation 2: Create(ImplicitFunction): 47%|████▋ | 14/30 [00:00<00:00, 131.25it/s]
Animation 2: Create(ImplicitFunction): 93%|█████████▎| 28/30 [00:00<00:00, 106.07it/s]
#1991: Added support for boolean operations on VMobject
s#
Manim can now compute the union, intersection, and difference of mobjects!
%%manim -qm -v WARNING BooleanOperationDemo
class BooleanOperationDemo(Scene):
def construct(self):
VMobject.set_default(color=GREEN, fill_opacity=0.5)
Circle.set_default(radius=2, fill_opacity=0.5)
c1 = Circle(color=YELLOW).shift(LEFT)
c2 = Circle(color=BLUE).shift(RIGHT)
circles = VGroup(c1, c2)
self.add(circles.scale(0.5))
# Note: changing the default color and fill opacity for VMobject also affects subclasses
# like Union, Intersection, Difference, and Exclusion.
grid = VGroup(
Union(c1, c2),
Intersection(c1, c2),
Difference(c1, c2),
Exclusion(c1, c2)
).arrange_in_grid(2, 2, buff=3)
self.add(grid)
VMobject.set_default()
Circle.set_default()
Manim Community v0.18.1
#2118: Added 3D support for ArrowVectorField
and StreamLines
#
When passing a z_range
parameter to ArrowVectorField
or StreamLines
, the vector field will be rendered in three dimensions. Note: this example takes a bit longer to render.
%%manim -qm -v WARNING --disable_caching ThreeDArrowVectorField
class ThreeDArrowVectorField(ThreeDScene):
def construct(self):
def func(p):
return np.cross(p, np.array([0, 0, p[2]]))
vector_field = ArrowVectorField(
func,
x_range=[-2.5, 2.5, 1],
y_range=[-2.5, 2.5, 1],
z_range=[-1.5, 1.5, 1],
)
particle = Dot3D(OUT + RIGHT * 2)
self.add(vector_field, particle)
particle.add_updater(vector_field.get_nudge_updater(2))
self.move_camera(PI/3, -PI/4, run_time=3)
stream_lines = StreamLines(
func,
x_range=[-2.5, 2.5, 1.5],
y_range=[-2.5, 2.5, 1.5],
z_range=[-1.5, 1.5, 1.5],
)
self.play(FadeTransform(vector_field, stream_lines), run_time=0.5)
self.wait()
Manim Community v0.18.1
Animation 0: _MethodAnimation(ValueTracker), etc.: 0%| | 0/90 [00:00<?, ?it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 2%|▏ | 2/90 [00:00<00:04, 17.74it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 4%|▍ | 4/90 [00:00<00:04, 18.28it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 7%|▋ | 6/90 [00:00<00:04, 18.19it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 9%|▉ | 8/90 [00:00<00:04, 18.60it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 11%|█ | 10/90 [00:00<00:04, 18.72it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 13%|█▎ | 12/90 [00:00<00:04, 18.79it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 16%|█▌ | 14/90 [00:00<00:04, 18.91it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 18%|█▊ | 16/90 [00:00<00:03, 18.97it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 20%|██ | 18/90 [00:00<00:03, 19.02it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 22%|██▏ | 20/90 [00:01<00:03, 19.05it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 24%|██▍ | 22/90 [00:01<00:03, 19.11it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 27%|██▋ | 24/90 [00:01<00:03, 19.10it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 29%|██▉ | 26/90 [00:01<00:03, 18.96it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 31%|███ | 28/90 [00:01<00:03, 19.00it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 33%|███▎ | 30/90 [00:01<00:03, 19.00it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 36%|███▌ | 32/90 [00:01<00:03, 19.00it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 38%|███▊ | 34/90 [00:01<00:02, 18.99it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 40%|████ | 36/90 [00:01<00:02, 18.92it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 42%|████▏ | 38/90 [00:02<00:02, 19.03it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 44%|████▍ | 40/90 [00:02<00:02, 19.04it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 47%|████▋ | 42/90 [00:02<00:02, 19.07it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 49%|████▉ | 44/90 [00:02<00:02, 18.69it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 51%|█████ | 46/90 [00:02<00:02, 18.72it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 53%|█████▎ | 48/90 [00:02<00:02, 18.30it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 56%|█████▌ | 50/90 [00:02<00:02, 18.46it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 58%|█████▊ | 52/90 [00:02<00:02, 17.98it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 60%|██████ | 54/90 [00:02<00:01, 18.20it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 62%|██████▏ | 56/90 [00:03<00:01, 17.81it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 64%|██████▍ | 58/90 [00:03<00:01, 18.15it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 67%|██████▋ | 60/90 [00:03<00:01, 17.80it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 69%|██████▉ | 62/90 [00:03<00:01, 18.12it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 71%|███████ | 64/90 [00:03<00:01, 17.52it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 73%|███████▎ | 66/90 [00:03<00:01, 17.96it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 76%|███████▌ | 68/90 [00:03<00:01, 17.37it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 78%|███████▊ | 70/90 [00:03<00:01, 17.51it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 80%|████████ | 72/90 [00:03<00:01, 17.71it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 82%|████████▏ | 74/90 [00:04<00:00, 17.95it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 84%|████████▍ | 76/90 [00:04<00:00, 18.03it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 87%|████████▋ | 78/90 [00:04<00:00, 18.21it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 89%|████████▉ | 80/90 [00:04<00:00, 17.98it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 91%|█████████ | 82/90 [00:04<00:00, 18.06it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 93%|█████████▎| 84/90 [00:04<00:00, 17.49it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 96%|█████████▌| 86/90 [00:04<00:00, 17.77it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 98%|█████████▊| 88/90 [00:04<00:00, 17.89it/s]
Animation 0: _MethodAnimation(ValueTracker), etc.: 100%|██████████| 90/90 [00:04<00:00, 18.09it/s]
Animation 1: FadeTransform(Group): 0%| | 0/15 [00:00<?, ?it/s]
Animation 1: FadeTransform(Group): 7%|▋ | 1/15 [00:00<00:01, 7.14it/s]
Animation 1: FadeTransform(Group): 13%|█▎ | 2/15 [00:00<00:01, 6.63it/s]
Animation 1: FadeTransform(Group): 20%|██ | 3/15 [00:00<00:01, 6.55it/s]
Animation 1: FadeTransform(Group): 27%|██▋ | 4/15 [00:00<00:01, 6.53it/s]
Animation 1: FadeTransform(Group): 33%|███▎ | 5/15 [00:00<00:01, 6.50it/s]
Animation 1: FadeTransform(Group): 40%|████ | 6/15 [00:00<00:01, 6.50it/s]
Animation 1: FadeTransform(Group): 47%|████▋ | 7/15 [00:01<00:01, 6.52it/s]
Animation 1: FadeTransform(Group): 53%|█████▎ | 8/15 [00:01<00:01, 6.51it/s]
Animation 1: FadeTransform(Group): 60%|██████ | 9/15 [00:01<00:00, 6.49it/s]
Animation 1: FadeTransform(Group): 67%|██████▋ | 10/15 [00:01<00:00, 6.46it/s]
Animation 1: FadeTransform(Group): 73%|███████▎ | 11/15 [00:01<00:00, 6.39it/s]
Animation 1: FadeTransform(Group): 80%|████████ | 12/15 [00:01<00:00, 6.32it/s]
Animation 1: FadeTransform(Group): 87%|████████▋ | 13/15 [00:02<00:00, 6.32it/s]
Animation 1: FadeTransform(Group): 93%|█████████▎| 14/15 [00:02<00:00, 6.33it/s]
Animation 1: FadeTransform(Group): 100%|██████████| 15/15 [00:02<00:00, 6.32it/s]
Waiting 2: 0%| | 0/30 [00:00<?, ?it/s]
Waiting 2: 3%|▎ | 1/30 [00:00<00:03, 8.26it/s]
Waiting 2: 7%|▋ | 2/30 [00:00<00:03, 8.12it/s]
Waiting 2: 10%|█ | 3/30 [00:00<00:03, 8.15it/s]
Waiting 2: 13%|█▎ | 4/30 [00:00<00:03, 8.20it/s]
Waiting 2: 17%|█▋ | 5/30 [00:00<00:03, 8.23it/s]
Waiting 2: 20%|██ | 6/30 [00:00<00:02, 8.27it/s]
Waiting 2: 23%|██▎ | 7/30 [00:00<00:02, 8.28it/s]
Waiting 2: 27%|██▋ | 8/30 [00:00<00:02, 8.29it/s]
Waiting 2: 30%|███ | 9/30 [00:01<00:02, 8.30it/s]
Waiting 2: 33%|███▎ | 10/30 [00:01<00:02, 8.26it/s]
Waiting 2: 37%|███▋ | 11/30 [00:01<00:02, 8.27it/s]
Waiting 2: 40%|████ | 12/30 [00:01<00:02, 8.28it/s]
Waiting 2: 43%|████▎ | 13/30 [00:01<00:02, 8.27it/s]
Waiting 2: 47%|████▋ | 14/30 [00:01<00:01, 8.26it/s]
Waiting 2: 50%|█████ | 15/30 [00:01<00:01, 8.28it/s]
Waiting 2: 53%|█████▎ | 16/30 [00:01<00:01, 8.27it/s]
Waiting 2: 57%|█████▋ | 17/30 [00:02<00:01, 8.29it/s]
Waiting 2: 60%|██████ | 18/30 [00:02<00:01, 8.26it/s]
Waiting 2: 63%|██████▎ | 19/30 [00:02<00:01, 8.21it/s]
Waiting 2: 67%|██████▋ | 20/30 [00:02<00:01, 8.25it/s]
Waiting 2: 70%|███████ | 21/30 [00:02<00:01, 8.28it/s]
Waiting 2: 73%|███████▎ | 22/30 [00:02<00:00, 8.29it/s]
Waiting 2: 77%|███████▋ | 23/30 [00:02<00:00, 8.31it/s]
Waiting 2: 80%|████████ | 24/30 [00:02<00:00, 8.32it/s]
Waiting 2: 83%|████████▎ | 25/30 [00:03<00:00, 8.34it/s]
Waiting 2: 87%|████████▋ | 26/30 [00:03<00:00, 8.36it/s]
Waiting 2: 90%|█████████ | 27/30 [00:03<00:00, 8.32it/s]
Waiting 2: 93%|█████████▎| 28/30 [00:03<00:00, 8.33it/s]
Waiting 2: 97%|█████████▋| 29/30 [00:03<00:00, 8.32it/s]
Waiting 2: 100%|██████████| 30/30 [00:03<00:00, 8.29it/s]
To find out more about the exciting new features, fixed bugs, deprecated functions, and other improvements made in Manim v0.11.0, check out the full changelog at https://docs.manim.community/en/stable/changelog/0.11.0-changelog.html. Enjoy manimating!