@@ -15,40 +15,49 @@ def build_shapes(self):
1515 logo_green = "#87c2a5"
1616 logo_blue = "#525893"
1717 logo_red = "#e07a5f"
18+
1819 circle = Circle (color = logo_green , fill_opacity = 1 ).shift (LEFT )
19- square = Difference (Square ().shift (UP ), circle , color = logo_blue , fill_opacity = 1 ).shift (UR * 0.2 )
20- triangle = Difference (Triangle ().shift (RIGHT ), square , color = logo_red , fill_opacity = 1 ).shift (DR * 0.2 )
20+
21+ square = Square (color = logo_blue , fill_opacity = 1 ).shift (UP )
22+ triangle = Triangle (color = logo_red , fill_opacity = 1 ).shift (RIGHT )
23+
24+ square = Difference (square , circle , color = logo_blue , fill_opacity = 1 )
25+ triangle = Difference (triangle , square , color = logo_red , fill_opacity = 1 )
26+
27+ circle .shift (DL * self .gap )
28+ triangle .shift (DR * self .gap )
29+
2130 return VGroup (circle , square , triangle )
2231
2332 def build_text (self ):
24- logo_black = "#343434"
25- ds_m = MathTex (r"\mathbb{PM}" , fill_color = logo_black ).scale (5 )
33+ ds_m = MathTex (r"\mathbb{PM}" , fill_color = self .logo_black ).scale (5 )
2634 ds_m .shift (4.25 * LEFT + 1.5 * UP )
2735 return ds_m
2836
2937 def build_banner (self ):
3038 shapes = self .build_shapes ()
3139
32- font_color = "#343434"
33- logo_black = "#343434"
34-
35- ds_p = MathTex (r"\mathbb{P}" , fill_color = logo_black ).scale (2 )
40+ ds_p = MathTex (r"\mathbb{P}" , fill_color = self .logo_black ).scale (2 )
3641 ower = Tex ("ower" , tex_template = TexFontTemplates .gnu_freeserif_freesans ).scale (2 )
37- ower .next_to (ds_p , RIGHT , buff = SMALL_BUFF ).align_to (ds_p , DOWN ).set_color (font_color )
42+ ower .next_to (ds_p , RIGHT , buff = SMALL_BUFF ).align_to (ds_p , DOWN ).set_color (self . font_color )
3843 power = VGroup (ds_p , ower )
3944
40- ds_m = MathTex (r"\mathbb{M}" , fill_color = logo_black ).scale (2 )
45+ ds_m = MathTex (r"\mathbb{M}" , fill_color = self . logo_black ).scale (2 )
4146 anim = Tex ("anim" , tex_template = TexFontTemplates .gnu_freeserif_freesans ).scale (2 )
42- anim .next_to (ds_m , RIGHT , buff = SMALL_BUFF ).align_to (ds_m , DOWN ).set_color (font_color )
47+ anim .next_to (ds_m , RIGHT , buff = SMALL_BUFF ).align_to (ds_m , DOWN ).set_color (self . font_color )
4348 tmanim = VGroup (ds_m , anim )
4449
4550 banner = VGroup (power , tmanim ).arrange (RIGHT , buff = MED_SMALL_BUFF ).move_to (ORIGIN ).scale (1.5 )
46- banner .shift ( UP * 0.5 + LEFT * 0.5 )
47- shapes . next_to ( banner .get_critical_point (DR ), DR , buff = - 1 )
51+ banner .next_to ( shapes [ 1 ], LEFT )
52+ banner . align_to ( shapes [ 0 ] .get_critical_point (UP ) + self . gap , DOWN )
4853
4954 return VGroup (shapes , banner ).move_to (ORIGIN )
5055
51- def __init__ (self ):
56+ def __init__ (self , font_color = "#343434" , logo_black = "#343434" , gap = 0.4 ):
57+ self .font_color = font_color
58+ self .logo_black = logo_black
59+ self .gap = gap
60+
5261 shapes = self .build_shapes ()
5362 ds_m = self .build_text ()
5463 super ().__init__ (* shapes , ds_m )
0 commit comments