[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a rectangle with width 4 and height 2, centered at (1, 1).

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        rectangle = Rectangle(width=4, height=2)
        rectangle.move_to((1, 1))
        self.add(rectangle)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a VGroup and add a circle and a triangle to it.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular hexagon with side length 2 and color it yellow.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        hexagon = RegularPolygon(n=6, radius=2, color=YELLOW)
        self.add(hexagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the hexagon to the left by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular heptagon with side length 3 and color it green.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        heptagon = RegularPolygon(n=7, radius=3, color=GREEN)
        self.add(heptagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a line segment from (-3, 0) to (3, 0) and color it purple.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        line = Line((-3, 0), (3, 0), color=PURPLE)
        self.add(line)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the line segment upwards by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a rectangle with width 4 and height 2, centered at (1, 1).

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        rectangle = Rectangle(width=4, height=2)
        rectangle.move_to((1, 1))
        self.add(rectangle)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a VGroup and add a circle and a triangle to it.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular hexagon with side length 2 and color it yellow.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        hexagon = RegularPolygon(n=6, radius=2, color=YELLOW)
        self.add(hexagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the hexagon to the left by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular heptagon with side length 3 and color it green.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        heptagon = RegularPolygon(n=7, radius=3, color=GREEN)
        self.add(heptagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a line segment from (-3, 0) to (3, 0) and color it purple.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        line = Line((-3, 0), (3, 0), color=PURPLE)
        self.add(line)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the line segment upwards by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Scale the triangle by a factor of 0.5 in 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the pentagon by 90 degrees counterclockwise over 2 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a rectangle with width 4 and height 2, centered at (1, 1).

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        rectangle = Rectangle(width=4, height=2)
        rectangle.move_to((1, 1))
        self.add(rectangle)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a VGroup and add a circle and a triangle to it.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the VGroup by 45 degrees clockwise over 1.5 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular hexagon with side length 2 and color it yellow.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        hexagon = RegularPolygon(n=6, radius=2, color=YELLOW)
        self.add(hexagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the hexagon to the left by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular heptagon with side length 3 and color it green.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        heptagon = RegularPolygon(n=7, radius=3, color=GREEN)
        self.add(heptagon)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Rotate the heptagon by 60 degrees counterclockwise over 2 seconds.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a line segment from (-3, 0) to (3, 0) and color it purple.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        line = Line((-3, 0), (3, 0), color=PURPLE)
        self.add(line)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Move the line segment upwards by 2 units over 1 second.

[Assistant]
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)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a square with side length 5 and color it cyan.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        square = Square(side_length=5, color=CYAN)
        self.add(square)


[System] Write Manim scripts for animations in Python. Generate code, not text.

[User] Create a regular pentagon with side length 2 and color it orange.

[Assistant]
from manim import *
class MyScene(Scene):
    def construct(self):
        pentagon = RegularPolygon(n=5, radius=2, color=ORANGE)
        self.add(pentagon)