0% found this document useful (0 votes)
11 views1 page

Código (Questão 1)

Uploaded by

Kayky Lopes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Código (Questão 1)

Uploaded by

Kayky Lopes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

from manim import*

class Questão1(Scene):
def construct(self):

# BACKGROUND CHANGE - BLACK TO WHITE

self.camera.background_color = WHITE

# REFERENCIAR INFORMAÇOES
#.1 CONSTRUIR FIGURA

r1 = 2*(2**0.5)

a = [-4, -r1, 0]
b = [-4, r1, 0]
c = [4, r1, 0]
d = [4, -r1, 0]

#.1.1 RECTANGLE

rectangle = Polygon(a, b, c, d)
rectangle.set_stroke(width = 2, color = BLACK)

#.1.2. ARCOS

center_arc1 = [-4, 0, 0]

arc1 = Arc(arc_center = center_arc1, radius = r1, start_angle = 3*PI/2, angle = PI )


arc1.set_stroke(width = 2, color = BLACK)
arc1.set_fill(color = ORANGE, opacity = 0.8)

arc2 = Sector(arc_center = d, outer_radius = 2*r1, start_angle = PI/2, angle = PI/2)


arc2.set_stroke(width = 2, color = BLACK)
arc2.set_fill(color = ORANGE, opacity = 0.8)

#.1.3 REFERENCIAS

lado = DoubleArrow(start = [-4.2, -(r1+0.5), 0], end = [4.2, -(r1+0.5), 0], tip_length = 0.2, tip_shape_start = StealthTip, tip_shape_end = StealthTip)
lado.set_stroke(width = 2, color = BLACK)

lado_label = MathTex(r'4 \;cm', font_size = 30, tex_template=TexFontTemplates.comfortaa).next_to(lado, DOWN)


lado_label.set_color(BLACK)

#.1.4 QUESTÃO

gradient = [BLACK, ORANGE]


question = Tex(r'Encontre a área laranja.', font_size = 50, tex_template=TexFontTemplates.comfortaa).next_to(lado_label, 3*DOWN)
question.set_stroke(width = 5)
question.set_color_by_gradient(gradient)

#.1.5 INFORMAÇAO

inf = Tex(r'A figura contém um semicirculo e um quarto de círculo', font_size = 25, tex_template=TexFontTemplates.comfortaa).next_to(rectangle, UP)
inf.set_color(BLACK)

# RENDER

self.play(FadeIn(arc1), FadeIn(arc2), FadeIn(rectangle), FadeIn(lado), FadeIn(lado_label), FadeIn(question), FadeIn(inf))

self.wait(2)

return super().construct()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy