Manim
Creating animations with the python's library Manim
Install / Use
/learn @antonin-lfv/ManimREADME
Index
Exemples basiques
<br/>Formules latex
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116814422-3126d680-ab59-11eb-8f6a-bacefb3eeaed.gif" height="350"> <p/> <details> <summary >Code</summary>class latex_formules(Scene):
def construct(self):
latex = MathTex(r"\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}")
self.play(FadeInFrom(latex))
self.wait()
</details>
<br/>
Identités remarquables
<br/>(a-b)²
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/117114850-a0384100-ad8c-11eb-8661-9f693e2f5369.gif" height="350"> <p/> <details> <summary>Code</summary>class IR_amoinsb_2(Scene): # (a-b)^2
def construct(self):
formula = TexMobject(
"(", # 0
"a", # 1
"-", # 2
"b", # 3
")", # 4
"^{2}", # 5
"=", # 6
"a", # 7
"^{2}", # 8
"-", # 9
"2", # 10
"a", # 11
"b", # 12
"+", # 13
"b", # 14
"^{2}" # 15
)
formula.scale(2)
self.play(Write(formula[0:7])) # 0 à 6
formula[7].set_color(RED)
formula[14].set_color(BLUE)
formula[11].set_color(RED)
formula[12].set_color(BLUE)
self.wait()
self.play(
ReplacementTransform(formula[1].copy(), formula[7]),
Write(formula[8]),
ReplacementTransform(formula[2].copy(), formula[9]),
ReplacementTransform(formula[3].copy(), formula[9]),
Write(formula[13]),
ReplacementTransform(formula[3].copy(), formula[14]),
Write(formula[15]),
run_time=2
)
self.wait(1.5)
self.play(
Write(formula[10]),
ReplacementTransform(formula[1].copy(), formula[11]),
ReplacementTransform(formula[3].copy(), formula[12]),
run_time=2
)
self.wait()
</details>
<br/>
a²-b²
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/117114404-1b4d2780-ad8c-11eb-949d-91e5afe31f37.gif" height="350"> <p/> <details> <summary>Code</summary>class IR_a_b_2(Scene): # a^2-b^2
def construct(self):
formula = Tex(
"a", # 0
"^{2}", # 1
"-", # 2
"b", # 3
"^{2}", # 4
"=", # 5
"(", # 6
"a", # 7
"-", # 8
"b", # 9
")", # 10
"(", # 11
"a", # 12
"+", # 13
"b", # 14
")" # 15
)
formula.scale(2)
self.play(Write(formula[0:6])) # 0 à 5
formula[7].set_color(RED)
formula[9].set_color(BLUE)
formula[14].set_color(RED)
formula[12].set_color(BLUE)
self.wait()
self.play(
ReplacementTransform(formula[0].copy(), formula[7]),
ReplacementTransform(formula[0].copy(), formula[12]),
Write(formula[6]), Write(formula[11]),
Write(formula[10]), Write(formula[15]),
run_time=1.5
)
self.wait(0.5)
self.play(
Write(formula[8]), Write(formula[13]),
ReplacementTransform(formula[3].copy(), formula[9]),
ReplacementTransform(formula[3].copy(), formula[14]),
run_time=1.5
)
self.wait()
</details>
<br/>
Texte en couleur et entouré
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/117121735-4ee07f80-ad95-11eb-92b4-addd94c2ad31.gif" height="350"> <p/> <details> <summary>Code</summary>class TextColor(Scene): # f(x)=ax+b
def construct(self):
text = Tex("f(x)", "=", "a", "x", "+", "b")
text[0].set_color(WHITE)
text[1].set_color(WHITE)
text[2].set_color(BLUE)
text[3].set_color(WHITE)
text[4].set_color("#FFFFFF") # Hexadecimal color
text[5].set_color(RED)
# text.to_corner(DL)
frameBoxa = SurroundingRectangle(text[2], buff=0.8 * SMALL_BUFF)
frameBoxa.set_stroke(BLUE, 3)
boxtextea = Tex("{\\normalsize On fait varier a}")
boxtextea.set_color(BLUE, 3)
boxtextea.next_to(text[2].get_center(), UP, buff=0.7)
frameBoxb = SurroundingRectangle(text[5], buff=0.8 * SMALL_BUFF)
frameBoxb.set_stroke(RED)
boxtexteb = Tex("{\\normalsize et b}")
boxtexteb.set_color(RED)
boxtexteb.next_to(text[5].get_center(), UP, buff=0.7)
self.play(Write(text))
self.wait(.1)
self.play(ShowCreation(frameBoxa))
self.play(Write(boxtextea))
self.wait(0.4)
self.remove(frameBoxa)
self.wait(0.1)
self.remove(boxtextea)
self.play(ShowCreation(frameBoxb))
self.play(Write(boxtexteb))
self.wait(0.4)
self.remove(frameBoxb)
self.wait(0.1)
self.remove(boxtexteb)
self.wait(0.5)
</details>
<br/>
Aligner du texte
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116814430-3d129880-ab59-11eb-9d5f-674b6488c26c.gif" height="350"> <p/> <details> <summary>Code</summary>class Aligner_text(Scene):
def construct(self):
text1 = Tex("text1").shift(2 * UL) # UpLeft
text2 = Tex("text2")
text3 = Tex("text3").shift(2 * DR) # DownRight
group = VGroup(text1, text2, text3).scale(1.1)
self.add(group)
self.play(group.animate.arrange(RIGHT, .25, center=False))
</details>
<br/>
Ligne couleurs gradient
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116814437-4b60b480-ab59-11eb-89bf-99db2bfba138.gif" height="350"> <p/> <details> <summary>Code</summary>class LigneGradient(Scene):
def construct(self):
line_gradient = Line(LEFT * 4, RIGHT * 4)
line_gradient.set_color(color=[PURPLE, BLUE, YELLOW, GREEN, RED])
self.add(line_gradient)
self.wait()
</details>
<br/>
Animation carré déformé
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116870605-1a44ba80-ac13-11eb-8072-09fe52358a35.gif" height="350"> <p/> <details> <summary >Code</summary>class WarpSquare(Scene):
def construct(self):
square = Square()
self.add(square)
self.play(ApplyPointwiseFunction(
lambda point: complex_to_R3(np.exp(R3_to_complex(point))),
square
))
self.wait()
</details>
<br/>
Déplacement disque
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116870651-2b8dc700-ac13-11eb-8b8e-2536f580eabe.gif" height="350"> <p/> <details> <summary >Code</summary>class movecircle(Scene):
def construct(self):
sphere = Sphere().set_color(RED)
self.add(sphere)
self.play(ApplyMethod(sphere.shift, UP), run_time=2)
self.play(ApplyMethod(sphere.scale, 0.4), run_time=2)
self.wait()
</details>
<br/>
Distance Euclidienne
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116870660-2f214e00-ac13-11eb-9588-56b55423cde0.gif" height="350"> <p/> <br/>Graphiques 2D
<br/>Polygone
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116814445-561b4980-ab59-11eb-979f-dd322a001660.gif" height="350"> <p/> <details> <summary>Code</summary>class polygon(GraphScene):
def construct(self):
self.setup_axes(animate=True)
polyg = [self.coords_to_point(0,0), #P1
self.coords_to_point(0,3.5), #P2
self.coords_to_point(3.5,1.75), #P3
self.coords_to_point(3.5,0), #P4
self.coords_to_point(0,0)] #P1 pour fermer la figure
plol = Polygon(*polyg).move_to(UP+DOWN)
self.play(ShowCreation(plol))
</details>
<br/>
Ligne verticale sous une courbe
<br/> <p align="center"> <img src="https://user-images.githubusercontent.com/63207451/116870663-30527b00-aRelated Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
350.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
