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.
21 lines
548 B
21 lines
548 B
3 months ago
|
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()
|