You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
865 B

#%%
import manim
#%%
from manim import *
class MovingFrameBox(Scene):
def construct(self):
text=MathTex(
"\\frac{d}{dx}f(x)g(x)=","f(x)\\frac{d}{dx}g(x)","+",
"g(x)\\frac{d}{dx}f(x)"
)
self.play(Write(text))
framebox1 = SurroundingRectangle(text[1], buff = .1)
framebox2 = SurroundingRectangle(text[3], buff = .1)
self.play(
Create(framebox1),
)
self.wait()
self.play(
ReplacementTransform(framebox1,framebox2),
)
self.wait()
if __name__ == '__main__':
config = {
"quality": "medium_quality",
"preview": True,
"media_dir": "./logo_output",
"pixel_height": 1080,
"pixel_width": 1920
}
with manim.tempconfig(config):
scene = MovingFrameBox()
scene.render()