mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-29 10:02:11 +00:00
31 lines
875 B
Python
31 lines
875 B
Python
from manim import *
|
|
|
|
# This module is used in the CLI tests in tests_CLi.py.
|
|
|
|
|
|
class SquareToCircle(Scene):
|
|
def construct(self):
|
|
circle = Circle()
|
|
square = Square()
|
|
square.flip(RIGHT)
|
|
square.rotate(-3 * TAU / 8)
|
|
circle.set_fill(PINK, opacity=0.5)
|
|
|
|
self.play(ShowCreation(square))
|
|
self.play(Transform(square, circle))
|
|
self.play(FadeOut(square))
|
|
|
|
|
|
class WriteStuff(Scene):
|
|
def construct(self):
|
|
example_text = TextMobject(
|
|
"This is a some text", tex_to_color_map={"text": YELLOW}
|
|
)
|
|
example_tex = TexMobject(
|
|
"\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}",
|
|
)
|
|
group = VGroup(example_text, example_tex)
|
|
group.arrange(DOWN)
|
|
group.set_width(config["frame_width"] - 2 * LARGE_BUFF)
|
|
|
|
self.play(Write(example_text))
|