manim/tests/tests_data/basic_scenes.py
Devin Neal 6e5770a85f
Enforce formatting with CI (#221)
Enforce formatting with CI
2020-07-31 00:42:34 -07:00

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))