mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Super hacky AoPS logo class
This commit is contained in:
parent
fe7d1d5eaf
commit
78c3ee854d
1 changed files with 21 additions and 0 deletions
|
@ -77,6 +77,27 @@ class Speedometer(VMobject):
|
|||
self.rotate_needle(target_angle - self.get_needle_angle())
|
||||
return self
|
||||
|
||||
class AoPSLogo(SVGMobject):
|
||||
CONFIG = {
|
||||
"file_name" : "aops_logo",
|
||||
"height" : 1.5,
|
||||
}
|
||||
def __init__(self, **kwargs):
|
||||
SVGMobject.__init__(self, **kwargs)
|
||||
self.set_stroke(WHITE, width = 0)
|
||||
colors = [BLUE_E, "#008445", GREEN_B]
|
||||
index_lists = [
|
||||
(10, 11, 12, 13, 14, 21, 22, 23, 24, 27, 28, 29, 30),
|
||||
(0, 1, 2, 3, 4, 15, 16, 17, 26),
|
||||
(5, 6, 7, 8, 9, 18, 19, 20, 25)
|
||||
]
|
||||
for color, index_list in zip(colors, index_lists):
|
||||
for i in index_list:
|
||||
self.submobjects[i].set_fill(color, opacity = 1)
|
||||
|
||||
self.scale_to_fit_height(self.height)
|
||||
self.center()
|
||||
|
||||
class PartyHat(SVGMobject):
|
||||
CONFIG = {
|
||||
"file_name" : "party_hat",
|
||||
|
|
Loading…
Add table
Reference in a new issue