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): heptagon = RegularPolygon(n=7, radius=2, color=PINK) self.add(heptagon) self.play(heptagon.animate.scale(1.5), run_time=2)
Scale the heptagon by a factor of 1.5 in 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((-2, -2), (2, 2), color=GREEN) self.add(line)
Create a line segment from (-2, -2) to (2, 2).
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((-2, -2), (2, 2), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1)
Rotate the line segment by 45 degrees counterclockwise 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): hexagon = RegularPolygon(n=6, radius=2, color=RED) self.add(hexagon)
Create a regular hexagon with side length 2 and color it red.
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=RED) self.add(hexagon) self.play(hexagon.animate.shift(RIGHT * 3), run_time=1.5)
Move the hexagon to the right by 3 units 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): line = Line((-2, -2), (2, 2), color=GREEN) self.add(line)
Create a line segment from (-2, -2) to (2, 2).
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((-2, -2), (2, 2), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1)
Rotate the line segment by 45 degrees counterclockwise 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): nonagon = RegularPolygon(n=9, radius=2, color=BLUE) self.add(nonagon)
Create a regular nonagon with side length 2 and color it blue.
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): nonagon = RegularPolygon(n=9, radius=2, color=BLUE) self.add(nonagon) self.play(nonagon.animate.scale(2), run_time=1.5)
Scale the nonagon by a factor of 2 in 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): line = Line((-1, -1), (1, 1), color=GREEN) self.add(line)
Create a line segment from (-1, -1) to (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): line = Line((-1, -1), (1, 1), color=GREEN) self.add(line) self.play(line.animate.rotate(90 * DEGREES), run_time=1)
Rotate the line segment by 90 degrees clockwise 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): decagon = RegularPolygon(n=10, radius=2, color=ORANGE) self.add(decagon)
Create a regular decagon with side length 2 and color it orange.
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): decagon = RegularPolygon(n=10, radius=2, color=ORANGE) self.add(decagon) self.play(decagon.animate.shift(DOWN * 3), run_time=1.5)
Move the decagon downward by 3 units 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): line = Line((-2, 0), (2, 0), color=GREEN) self.add(line)
Create a line segment from (-2, 0) to (2, 0).
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((-2, 0), (2, 0), color=GREEN) self.add(line) self.play(line.animate.shift(UP * 1), run_time=1)
Move the line segment upward by 1 unit 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=PURPLE) self.add(pentagon)
Create a regular pentagon with side length 2 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): pentagon = RegularPolygon(n=5, radius=2, color=PURPLE) self.add(pentagon) self.play(pentagon.animate.rotate(90 * DEGREES), run_time=1.5)
Rotate the pentagon by 90 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): line = Line((-3, 0), (3, 0), color=GREEN) self.add(line)
Create a line segment from (-3, 0) to (3, 0).
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=GREEN) self.add(line) self.play(line.animate.shift(DOWN * 2), run_time=1.5)
Move the line segment downward by 2 units 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): octagon = RegularPolygon(n=8, radius=2, color=TEAL) self.add(octagon)
Create a regular octagon with side length 2 and color it teal.
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): octagon = RegularPolygon(n=8, radius=2, color=TEAL) self.add(octagon) self.play(octagon.animate.rotate(90 * DEGREES), run_time=1)
Rotate the octagon by 90 degrees clockwise 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): line = Line((1, 1), (-1, -1), color=GREEN) self.add(line)
Create a line segment from (1, 1) to (-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): line = Line((1, 1), (-1, -1), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1.5)
Rotate the line segment by 45 degrees counterclockwise 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): heptagon = RegularPolygon(n=7, radius=2, color=PINK) self.add(heptagon)
Create a regular heptagon with side length 2 and color it pink.
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=2, color=PINK) self.add(heptagon) self.play(heptagon.animate.scale(1.5), run_time=2)
Scale the heptagon by a factor of 1.5 in 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((-2, -2), (2, 2), color=GREEN) self.add(line)
Create a line segment from (-2, -2) to (2, 2).
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((-2, -2), (2, 2), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1)
Rotate the line segment by 45 degrees counterclockwise 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): hexagon = RegularPolygon(n=6, radius=2, color=RED) self.add(hexagon)
Create a regular hexagon with side length 2 and color it red.
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=RED) self.add(hexagon) self.play(hexagon.animate.shift(RIGHT * 3), run_time=1.5)
Move the hexagon to the right by 3 units 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): line = Line((-2, -2), (2, 2), color=GREEN) self.add(line)
Create a line segment from (-2, -2) to (2, 2).
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((-2, -2), (2, 2), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1)
Rotate the line segment by 45 degrees counterclockwise 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): nonagon = RegularPolygon(n=9, radius=2, color=BLUE) self.add(nonagon)
Create a regular nonagon with side length 2 and color it blue.
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): nonagon = RegularPolygon(n=9, radius=2, color=BLUE) self.add(nonagon) self.play(nonagon.animate.scale(2), run_time=1.5)
Scale the nonagon by a factor of 2 in 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): line = Line((-1, -1), (1, 1), color=GREEN) self.add(line)
Create a line segment from (-1, -1) to (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): line = Line((-1, -1), (1, 1), color=GREEN) self.add(line) self.play(line.animate.rotate(90 * DEGREES), run_time=1)
Rotate the line segment by 90 degrees clockwise 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): decagon = RegularPolygon(n=10, radius=2, color=ORANGE) self.add(decagon)
Create a regular decagon with side length 2 and color it orange.
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): decagon = RegularPolygon(n=10, radius=2, color=ORANGE) self.add(decagon) self.play(decagon.animate.shift(DOWN * 3), run_time=1.5)
Move the decagon downward by 3 units 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): line = Line((-2, 0), (2, 0), color=GREEN) self.add(line)
Create a line segment from (-2, 0) to (2, 0).
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((-2, 0), (2, 0), color=GREEN) self.add(line) self.play(line.animate.shift(UP * 1), run_time=1)
Move the line segment upward by 1 unit 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=PURPLE) self.add(pentagon)
Create a regular pentagon with side length 2 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): pentagon = RegularPolygon(n=5, radius=2, color=PURPLE) self.add(pentagon) self.play(pentagon.animate.rotate(90 * DEGREES), run_time=1.5)
Rotate the pentagon by 90 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): line = Line((-3, 0), (3, 0), color=GREEN) self.add(line)
Create a line segment from (-3, 0) to (3, 0).
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=GREEN) self.add(line) self.play(line.animate.shift(DOWN * 2), run_time=1.5)
Move the line segment downward by 2 units 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): octagon = RegularPolygon(n=8, radius=2, color=TEAL) self.add(octagon)
Create a regular octagon with side length 2 and color it teal.
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): octagon = RegularPolygon(n=8, radius=2, color=TEAL) self.add(octagon) self.play(octagon.animate.rotate(90 * DEGREES), run_time=1)
Rotate the octagon by 90 degrees clockwise 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): line = Line((1, 1), (-1, -1), color=GREEN) self.add(line)
Create a line segment from (1, 1) to (-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): line = Line((1, 1), (-1, -1), color=GREEN) self.add(line) self.play(line.animate.rotate(-45 * DEGREES), run_time=1.5)
Rotate the line segment by 45 degrees counterclockwise 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): heptagon = RegularPolygon(n=7, radius=2, color=PINK) self.add(heptagon)
Create a regular heptagon with side length 2 and color it pink.
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=2, color=PINK) self.add(heptagon) self.play(heptagon.animate.scale(1.5), run_time=2)
Scale the heptagon by a factor of 1.5 in 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): circle = Circle(radius=2, color=RED) self.add(circle)
Create a circle with radius 2 and color it red.
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(radius=2, color=RED) self.add(circle) self.play(circle.animate.shift(RIGHT * 3), run_time=2)
Move the circle to the right by 3 units 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): square = Square(side_length=4, color=BLUE) self.add(square)
Create a square with side length 4 and color it blue.
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=4, color=BLUE) self.add(square) self.play(square.animate.scale(0.5), run_time=1)
Scale the square 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): line = Line((-2, -2), (2, 2), color=GREEN) self.add(line)
Create a line segment from (-2, -2) to (2, 2).
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((-2, -2), (2, 2), color=GREEN) self.add(line) self.play(line.animate.shift(RIGHT * 3), run_time=1)
Move the line segment to the right by 3 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=3, color=ORANGE) self.add(pentagon)
Create a regular pentagon with side length 3 and color it orange.
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=3, 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.