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 * from math import *
class GenScene(Scene): def construct(self): sun = Circle(radius=0.5, color=YELLOW).shift(ORIGIN) earth_orbit = Circle(radius=3, color=BLUE, stroke_width=1) mars_orbit = Circle(radius=4, color=RED, stroke_width=1)
codeearth = Dot(radius=0.1, color=BLUE).move_to(earth_orbit.point_from_proportion(0)) mars = Dot(radius=0.1, color=RED).move_to(mars_orbit.point_from_proportion(0)) self.play(Create(sun)) self.play(Create(earth_orbit), Create(mars_orbit)) self.play(Create(earth), Create(mars)) self.play(MoveAlongPath(earth, earth_orbit), run_time=5, rate_func=linear) self.play(MoveAlongPath(mars, mars_orbit), run_time=5, rate_func=linear)codeUser: Animation Request: User: Animation Request: Assistant: - Assistantpython
from manim import * from math import * class GenScene(Scene): def construct(self): sun = Circle(radius=0.5, color=YELLOW).shift(ORIGIN) earth_orbit = Circle(radius=3, color=BLUE, stroke_width=1) mars_orbit = Circle(radius=4, color=RED, stroke_width=1) earth = Dot(radius=0.1, color=BLUE).move_to(earth_orbit.point_from_proportion(0)) mars = Dot(radius=0.1, color=RED).move_to(mars_orbit.point_from_proportion(0)) self.play(Create(sun)) self.play(Create(earth_orbit), Create(mars_orbit)) self.play(Create(earth), Create(mars)) self.play(MoveAlongPath(earth, earth_orbit), run_time=5, rate_func=linear) self.play(MoveAlongPath(mars, mars_orbit), run_time=5, rate_func=linear)