1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
from manimlib.imports import *
import numpy as np
class LinearFunctional(Scene):
def construct(self):
big_box=Rectangle().scale(2.7)
box = Rectangle(height=2,width=2,color=DARK_GREY).set_fill(color=PURPLE,opacity=350)
arrow1 = Arrow(color=RED).shift(1.8*LEFT+0.5*UP)
arrow2 = Arrow(color=RED).shift(1.8*LEFT+0.5*DOWN)
arrow3 = Arrow(color=GREEN).shift(0.5*UP+1.8*RIGHT)
arrow4 = Arrow(color=GREEN).shift(0.5*DOWN+1.8*RIGHT)
Linear = TextMobject("LINEAR",color=BLACK).scale(0.5).shift(0.2*UP)
Functional = TextMobject("FUNCTIONAL",color=BLACK).scale(0.5).shift(0.2*DOWN)
u = TextMobject(r"$\vec{u}$",color=YELLOW).scale(0.7).shift(2.8*LEFT+0.5*UP)
v = TextMobject(r"$\vec{v}$",color=YELLOW).scale(0.7).shift(2.8*LEFT+0.5*DOWN)
f1 = TextMobject(r"$f_1$",color=YELLOW).scale(0.7).shift(2.8*RIGHT+0.5*UP)
f2 = TextMobject(r"$f_2$",color=YELLOW).scale(0.7).shift(2.8*RIGHT+0.5*DOWN)
text = TextMobject(r"The Linear Functional is a function that takes $\vec{u}, \vec{v} \in$ V as inputs and gives the output $f_1, f_2\in$ F.").scale(0.55).shift(2*DOWN)
self.play(ShowCreation(big_box))
self.play(ShowCreation(box))
self.play(ShowCreation(Linear),ShowCreation(Functional))
self.wait(2)
self.play(ShowCreation(arrow1),ShowCreation(u))
self.play(ShowCreation(arrow3),ShowCreation(f1))
self.wait(0.7)
self.play(ShowCreation(arrow2),ShowCreation(v))
self.play(ShowCreation(arrow4),ShowCreation(f2))
self.wait(1)
self.play(ShowCreation(text))
self.wait(4)
|