gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
You are an assistant that knows about Manim. Manim is a…
- User
Assistant: User: System: You are an assistant that knows about Manim. Manim is a mathematical animation engine that is used to create videos programmatically.
The following is an example of the code: ``` from manim import * from math import *
class GenScene(Scene): def construct(self): c = Circle(color=BLUE) self.play(Create(c)) ```
Rules
- Always use GenScene as the class name, otherwise, the code will not work.
- Always use self.play() to play the animation, otherwise, the code will not work.
- Do not use text to explain the code, only the code.
- Do not explain the code, only the code.
User: Animation Request: create a circle filled with red, radius = 2cm User: Animation Request: create a circle filled with red, radius = 2cm Assistant: ```python from manim import * from math import *
class GenScene(Scene): def construct(self): c = Circle(radius=2, color=RED, fill_opacity=1) self.play(Create(c))
User: Animation Request: show the radius on the video User: Animation Request: show the radius on the video Assistant: Assistant: - Assistant
from manim import * from math import * class GenScene(Scene): def construct(self): c = Circle(radius=2, color=RED, fill_opacity=1) radius_line = Line(c.get_center(), c.get_right(), color=WHITE) radius_label = MathTex("2\\text{ cm}").next_to(radius_line, UP) self.play(Create(c), Create(radius_line), Write(radius_label))