You are an assistant that knows about Manim. Manim is a mathematical animation…
- 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: draw the solar system, include sun, earth and mars. draw the transfer around the sun User: Animation Request: draw the solar system, include sun, earth and mars. draw the transfer around the sun Assistant: ```python from manim import *
class GenScene(Scene): def construct(self): sun = Circle(radius=0.5, color=YELLOW).shift(ORIGIN) earth = Circle(radius=0.2, color=BLUE).shift(RIGHT * 3) mars = Circle(radius=0.15, color=RED).shift(RIGHT * 4)
earth_orbit = Circle(radius=3, color=WHITE, stroke_width=1, fill_opacity=0) mars_orbit = Circle(radius=4, color=WHITE, stroke_width=1, fill_opacity=0) self.play(Create(sun), Create(earth_orbit), Create(mars_orbit)) self.play(Create(earth), Create(mars)) earth_path = Arc(radius=3, angle=TAU, color=GREEN) mars_path = Arc(radius=4, angle=TAU, color=ORANGE) self.play(Create(earth_path), Create(mars_path)) self.play(MoveAlongPath(earth, earth_path), MoveAlongPath(mars, mars_path))User: Animation Request: User: Animation Request: Assistant: - Assistant
from manim import * class GenScene(Scene): def construct(self): sun = Circle(radius=0.5, color=YELLOW).shift(ORIGIN) earth = Circle(radius=0.2, color=BLUE).shift(RIGHT * 3) mars = Circle(radius=0.15, color=RED).shift(RIGHT * 4) earth_orbit = Circle(radius=3, color=WHITE, stroke_width=1, fill_opacity=0) mars_orbit = Circle(radius=4, color=WHITE, stroke_width=1, fill_opacity=0) self.play(Create(sun), Create(earth_orbit), Create(mars_orbit)) self.play(Create(earth), Create(mars)) earth_path = Arc(radius=3, angle=TAU, color=GREEN) mars_path = Arc(radius=4, angle=TAU, color=ORANGE) self.play(Create(earth_path), Create(mars_path)) self.play(MoveAlongPath(earth, earth_path), MoveAlongPath(mars, mars_path))