Skip to content

Instantly share code, notes, and snippets.

@uwezi
Last active March 19, 2023 13:29
Show Gist options
  • Save uwezi/b3e5c021cb1b8c24564b459e492e2af4 to your computer and use it in GitHub Desktop.
Save uwezi/b3e5c021cb1b8c24564b459e492e2af4 to your computer and use it in GitHub Desktop.
[animate a MathTable] Choose what to draw first and modify elements in a MathTable. #manim "mathtable #animate
# https://discord.com/channels/581738731934056449/1026084532207755295/1026136828954300426
from manim import *
class Tabla2(Scene):
def construct(self):
t=MathTable(
[["", 2,3,4],
[2,3,4,5],
[2, 2, 7, 12],
[4, 4, 9, 14]]
).scale(1)
self.play(Create(t[1:]))
self.wait(1)
for i in range(3):
self.play(Write(t[0][i]))
self.play(ReplacementTransform(t[0][1], MathTex(r"f(x)").move_to(t[0][1])))
self.wait(1)
self.play(Write(t[0][3:]))
self.wait(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment