Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.7 kB
1
Indexable
Never
class OnePointEight(Scene):
    def construct(self):
        s1 = Tex(r"Let $S \subset V$ with $s \in S$ and $t \notin S$", font_size=tex_font_size).to_edge(LEFT).to_edge(UP)
        explain = Tex(r"For any cut $K(S)$, $\Phi_{tot}(F) = \Delta(S) = \Sigma_{u \in S, v \in V \textbackslash S}$", font_size=tex_font_size).next_to(s1, DOWN).to_edge(LEFT)
        s2 = Tex(r"$\Delta(S) = \Phi_{tot}(F)$ by part ii of 1.7.", font_size=tex_font_size).next_to(explain, DOWN).to_edge(LEFT)
        s3 = Tex(r"$\Delta(S) = \phi_{out}(S) - \phi_{in}(S)$ from the definition of $\Delta$", font_size=tex_font_size).next_to(s2, DOWN).to_edge(LEFT)
        s4 = Tex(r"$= \Sigma_{u \in S} \Sigma_{v \in V \textbackslash S}f_{uv} - \Sigma_{u \in V \textbackslash S} \Sigma_{v \in S}f_{uv}$", font_size=tex_font_size).next_to(s3, DOWN).to_edge(LEFT)
        s5 = Tex(r"$= \Sigma_{u \in S} \Sigma_{v \in V \textbackslash S}f_{uv} - \Sigma_{v \in S} \Sigma_{u \in V \textbackslash S}f_{uv}$", font_size=tex_font_size).next_to(s4, DOWN).to_edge(LEFT)
        s6 = Tex(r"$= \Sigma_{u \in S} \Sigma_{v \in V \textbackslash S}f_{uv} + \Sigma_{u \in S} \Sigma_{v \in V \textbackslash S}(-f_{vu})$", font_size=tex_font_size).next_to(s5, DOWN).to_edge(LEFT)
        s7 = Tex(r"$= \Sigma_{u \in S, v \in V \textbackslash S}(f_{uv} - f{vu})$", font_size=tex_font_size).next_to(s6, DOWN).to_edge(LEFT)

        animations = [
            Write(s1),
            Write(explain),
            Write(s2),
            Write(s3),
            Write(s4),
            Write(s5),
            Write(s6),
            Write(s7)
        ]

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