-
Notifications
You must be signed in to change notification settings - Fork 0
/
chapters.py
66 lines (49 loc) · 2.31 KB
/
chapters.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
from manim import *
from manimlib.mobject.mobject import *
from manim_slides import Slide
class TitleScene(Slide):
def construct(self):
# title slide
ecc_crypto = Text("Elliptic curve cryptography").scale(1.5)
author = Text("Alex Hornyai", color=YELLOW)
author.next_to(ecc_crypto, DOWN)
self.play(Write(ecc_crypto))
self.wait(0.25)
self.play(Write(author))
self.wait()
self.next_slide()
# whoami slide
whoami = Text("whoami").move_to(3*UP)
self.play(
FadeOut(author),
Transform(ecc_crypto, whoami)
)
self.wait(0.25)
list = BulletedList("CTF player", "secondary school student", "IT security and cryptography fan", "Main categories: Cryptography, web, binary exploitation", color=YELLOW)
list.align_to(whoami)
self.play(
LaggedStartMap(FadeIn, list, shift=0.5 * DOWN, lag_ratio=0.25)
)
class OverviewScene(Slide):
def construct(self):
overview = Text("Chapters").move_to(3*UP)
overview_list = BulletedList("Math introduction", "Elliptic curves", "A famous NSA backdoor", "ECDSA", "EdDSA", color=YELLOW)
rect = SurroundingRectangle(overview_list[0])
self.play(
Write(overview),
LaggedStartMap(FadeIn, overview_list, shift=0.5 * DOWN, lag_ratio=0.25)
)
self.play(DrawBorderThenFill(rect))
class GitHubScene(Slide):
def construct(self):
img = ImageMobject("ecdsa_examples/github_ecc_cryptanalysis.png").scale(0.8)
url = Text("https://github.com/ahornyai/ecc_cryptanalysis").scale(0.7).next_to(img, DOWN)
self.play(FadeIn(img, shift=DOWN), Write(url))
class EndingScene(Slide):
def construct(self):
thanks = Text("Thanks for your attention").move_to(2*UP).set_color(YELLOW)
github_logo = ImageMobject("logo/github.png").scale(0.5).move_to(4*LEFT + 2.5*DOWN)
linkedin_logo = ImageMobject("logo/linkedin.png").scale(0.4).move_to(5*RIGHT + 2.5*DOWN)
github = Text("ahornyai").scale(0.5).next_to(github_logo, LEFT)
linkedin = Text("Hornyai Alex").scale(0.5).next_to(linkedin_logo, LEFT)
self.play(Write(thanks), FadeIn(github_logo, shift=DOWN), FadeIn(linkedin_logo, shift=DOWN), Write(github), Write(linkedin))