(self)
| 132 | |
| 133 | class SpiralInExample(Scene): |
| 134 | def construct(self): |
| 135 | logo_green = "#81b29a" |
| 136 | logo_blue = "#454866" |
| 137 | logo_red = "#e07a5f" |
| 138 | |
| 139 | font_color = "#ece6e2" |
| 140 | |
| 141 | pi = MathTex(r"\pi").scale(7).set_color(font_color) |
| 142 | pi.shift(2.25 * LEFT + 1.5 * UP) |
| 143 | |
| 144 | circle = Circle(color=logo_green, fill_opacity=0.7, stroke_width=0).shift(LEFT) |
| 145 | square = Square(color=logo_blue, fill_opacity=0.8, stroke_width=0).shift(UP) |
| 146 | triangle = Triangle(color=logo_red, fill_opacity=0.9, stroke_width=0).shift( |
| 147 | RIGHT |
| 148 | ) |
| 149 | pentagon = Polygon( |
| 150 | *[ |
| 151 | [np.cos(2 * np.pi / 5 * i), np.sin(2 * np.pi / 5 * i), 0] |
| 152 | for i in range(5) |
| 153 | ], |
| 154 | color=PURPLE_B, |
| 155 | fill_opacity=1, |
| 156 | stroke_width=0, |
| 157 | ).shift(UP + 2 * RIGHT) |
| 158 | shapes = VGroup(triangle, square, circle, pentagon, pi) |
| 159 | self.play(SpiralIn(shapes, fade_in_fraction=0.9)) |
| 160 | self.wait() |
| 161 | self.play(FadeOut(shapes)) |
| 162 | |
| 163 | |
| 164 | Triangle.set_default(stroke_width=20) |
nothing calls this directly
no test coverage detected