#๐Ÿ”’ Can't use Manim

12 messages ยท Page 1 of 1 (latest)

prisma sirenBOT
#

@whole pagoda

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

whole pagoda
#

my code

#
from manim import *

class PythagoreanTheorem(Scene):
    def construct(self):
        # Create a right-angled triangle
        triangle = Polygon(
            ORIGIN, 3 * RIGHT, 3 * RIGHT + 4 * UP,
            stroke_color=WHITE,
            fill_color=BLUE,
            fill_opacity=0.5
        )

        # Add the squares on each side of the triangle
        square_a = Square(side_length=3, color=GREEN, fill_opacity=0.5).move_to(triangle.get_left())
        square_b = Square(side_length=4, color=RED, fill_opacity=0.5).move_to(triangle.get_top())
        square_c = Square(side_length=5, color=YELLOW, fill_opacity=0.5).move_to(triangle.get_corner(UP + RIGHT))

        # Display the shapes
        self.play(Create(triangle))
        self.play(Create(square_a), Create(square_b), Create(square_c))
        self.wait(1)

        # Highlight the squares and the triangle
        self.play(triangle.animate.set_fill(opacity=0.2))
        self.play(square_a.animate.set_fill(opacity=0.2), square_b.animate.set_fill(opacity=0.2), square_c.animate.set_fill(opacity=0.2))
        self.wait(1)

        # Write the Pythagorean theorem
        theorem_text = Tex("a^2 + b^2 = c^2").move_to(3 * DOWN)
        self.play(Write(theorem_text))
        self.wait(2)

        # Fade out all objects
        self.play(FadeOut(VGroup(triangle, square_a, square_b, square_c, theorem_text)))
        self.wait(1)

if __name__ == "__main__":
    pythagorean_scene = PythagoreanTheorem()
    pythagorean_scene.render()
#

I solve it

#

guys

#

add $

#

in the place that is wrong

#

don't know where, ask chat gpt

#

it will help

prisma sirenBOT
#

@whole pagoda

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Can't use Manim