instruction
stringclasses
1 value
output
stringlengths
67
242
input
stringlengths
35
85
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): triangle = RegularPolygon(n=3, radius=3, color=PINK) self.add(triangle) self.play(triangle.animate.scale(0.5), run_time=1)
Scale the triangle by a factor of 0.5 in 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon) self.play(pentagon.animate.rotate(-90 * DEGREES), run_time=2)
Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): rectangle = Rectangle(width=4, height=2) rectangle.move_to((1, 1)) self.add(rectangle)
Create a rectangle with width 4 and height 2, centered at (1, 1).
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) self.add(vgroup)
Create a VGroup and add a circle and a triangle to it.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): circle = Circle() triangle = Polygon((-1, -1), (1, -1), (0, 1)) vgroup = VGroup(circle, triangle) vgroup.rotate(-45 * DEGREES) self.add(vgroup)
Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon)
Create a regular hexagon with side length 2 and color it yellow.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): hexagon = RegularPolygon(n=6, radius=2, color=YELLOW) self.add(hexagon) self.play(hexagon.animate.shift(LEFT * 2), run_time=1)
Move the hexagon to the left by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon)
Create a regular heptagon with side length 3 and color it green.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): heptagon = RegularPolygon(n=7, radius=3, color=GREEN) self.add(heptagon) self.play(heptagon.animate.rotate(-60 * DEGREES), run_time=2)
Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line)
Create a line segment from (-3, 0) to (3, 0) and color it purple.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): line = Line((-3, 0), (3, 0), color=PURPLE) self.add(line) self.play(line.animate.shift(UP * 2), run_time=1)
Move the line segment upwards by 2 units over 1 second.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): square = Square(side_length=5, color=CYAN) self.add(square)
Create a square with side length 5 and color it cyan.
Manim is an animation engine for creating precise programmatic animations, primarily designed for explanatory math videos. It allows users to generate animations using Python code, enabling the creation of visually appealing and educational mathematical visualizations.
from manim import * class MyScene(Scene): def construct(self): pentagon = RegularPolygon(n=5, radius=2, color=ORANGE) self.add(pentagon)
Create a regular pentagon with side length 2 and color it orange.