# Untitled

unknown
plain_text
2 years ago
2.3 kB
0
Indexable
Never
class OnePoint6(Scene):

def construct(self):
s_1 = Tex(r"For a set of vertices $W \in V$)", font_size=tex_font_size).to_edge(LEFT).to_edge(UP)
s_2 = Tex(r"$\phi_{in} = \Sigma_{u \in V \textbackslash W} \Sigma_{v \in W}f_{uv}$", font_size=tex_font_size).next_to(s_1, DOWN).to_edge(LEFT)
s_3 = Tex(r"$\phi_{out} = \Sigma_{u \in V} \Sigma_{v \in V \textbackslash W}f_{uv}$", font_size=tex_font_size).next_to(s_2, DOWN).to_edge(LEFT)

# 1.6
s_4 = Tex(r"Let $W \subseteq V$, with $y \in V \textbackslash W$", font_size=tex_font_size).next_to(s_3, DOWN).to_edge(LEFT)
# 1.6 Proof
s_6 = Tex(r"$\phi_{in}(W \cup {y})$", font_size=tex_font_size).next_to(s_4, DOWN).to_edge(LEFT)
s_7 = Tex(r"$= \Sigma_{u \in V \textbackslash (W \cup {y}} \Sigma_{v \in (W \cup {y}}f_{uv}$", font_size=tex_font_size).next_to(s_6, DOWN).to_edge(LEFT)
s_8 = Tex(r"$= \Sigma_{u \in V \textbackslash W}\Sigma_{v \in W}f_{uv} - \Sigma_{v \in W}f_{yv} + \Sigma_{u \in V \textbackslash W} f_{uy}$", font_size=tex_font_size).next_to(s_7, DOWN).to_edge(LEFT)
s_9 = Tex(r"$= \phi_{in}(W) - \Sigma_{v \in W}f_{yv} + \Sigma_{u \in V \textbackslash W}f_{uy}$", font_size=tex_font_size).next_to(s_8, DOWN).to_edge(LEFT)

s_10 = Tex(r"$\phi_{out}(W \cup {y})$", font_size=tex_font_size).next_to(s_9, DOWN).to_edge(LEFT)
s_11 = Tex(r"$= \Sigma_{u \in (W \cup {y})}\Sigma_{v \in V \textbackslash (W \cup {y})}f_{uv}$", font_size=tex_font_size).next_to(s_10, DOWN).to_edge(LEFT)
s_12 = Tex(r"$= \Sigma_{u \in W}\Sigma_{v \in V \textbackslash W}f_{uv} - \Sigma_{u \in W}f_{uy} + \Sigma_{v \in V \textbackslash W}f_{yv}$", font_size=tex_font_size).next_to(s_11, DOWN).to_edge(LEFT)
s_13 = Tex(r"$= \phi_{out}(W) - \Sigma_{u \in W}f_{uy} + \Sigma_{v \in V \textbackslash W}f_{yv}$", font_size=tex_font_size).next_to(s_12, DOWN).to_edge(LEFT)

animations = [
Write(s_1),
Write(s_2),
Write(s_3),
Write(s_4),
Write(s_6),
Write(s_7),
Write(s_8),
Write(s_9),
Write(s_10),
Write(s_11),
Write(s_12),
Write(s_13)
]

self.play(AnimationGroup(*animations, lag_ratio=2))