-
Notifications
You must be signed in to change notification settings - Fork 0
/
text_only.py
68 lines (58 loc) · 2.2 KB
/
text_only.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from manim_setup import *
class Title(Scene):
def construct(self):
lines = VGroup(
Text("Perfect Graphs", font_size=80, font=FONT, weight=BOLD),
Text("Alex Duchnowski & Luke Hammer", font_size=50, font=FONT),
)
lines.arrange(DOWN, buff=LARGE_BUFF)
self.play(Write(lines[1]))
self.wait(2)
self.play(Write(lines[0]))
self.wait()
self.play(LaggedStartMap(FadeOut, lines, run_time=1.25))
class PerfectDefinition(Scene):
def construct(self):
text = VGroup(
Tex(r"A graph $G$ is \underline{perfect} if and only if"),
Tex("the chromatic number equals"),
Tex("the size of the maximum clique"),
Tex("both in the graph itself and"),
Tex("in every induced subgraph."),
)
text.arrange(DOWN, aligned_edge=LEFT)
self.play(Write(text), run_time=5)
self.wait()
self.play(LaggedStartMap(FadeOut, text))
class WeakPerfectGraphTheorem(Scene):
def construct(self):
lines = VGroup(
Text("The Weak Perfect Graph Theorem", font=FONT, weight=BOLD),
Tex(r"A graph $G$ is perfect if and only if $\bar G$ is perfect."),
)
lines.arrange(DOWN, buff=LARGE_BUFF)
self.play(Write(lines[0]))
self.wait()
self.play(Write(lines[1]))
self.wait()
self.play(LaggedStartMap(FadeOut, lines))
class StrongPerfectGraphTheorem(Scene):
def construct(self):
lines = VGroup(
Text("The Strong Perfect Graph Theorem", font=FONT, weight=BOLD),
VGroup(
Tex("A graph $G$ is perfect if and only if"),
Tex("it contains no odd hole or antihole."),
).arrange(DOWN, aligned_edge=LEFT),
)
lines.arrange(DOWN, buff=LARGE_BUFF)
self.play(Write(lines[0]))
self.wait()
self.play(Write(lines[1:]))
self.wait()
self.play(LaggedStartMap(FadeOut, lines))
class Thanks(Scene):
def construct(self):
thanks = Text("Thanks For Watching!", font_size=80, font=FONT)
self.play(Write(thanks))
self.play(LaggedStartMap(FadeOut, thanks, run_time=0.25))