Skip to content

Commit

Permalink
added sounds and changes in ceremony verifications
Browse files Browse the repository at this point in the history
  • Loading branch information
martawleklinska committed Jul 18, 2024
1 parent 613612c commit 1a884de
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 22 deletions.
Binary file modified data/sound/episode3/slide6-4.mp3
Binary file not shown.
Binary file added data/sound/episode3/slide6-5.mp3
Binary file not shown.
10 changes: 5 additions & 5 deletions zkmarek/video/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from zkmarek.video.slides.episode3.pairing import Pairing
from zkmarek.video.slides.episode3.trusted_setup import TrustedSetup
from zkmarek.video.slides.episode3.introduction import Introduction

from zkmarek.video.slides.episode3.credits import Credits as CreditsE3
config.width = 16
config.height = 9

Expand Down Expand Up @@ -178,18 +178,18 @@

EPISODE3 = [
# Intro(sound="data/sound/teaser2/slide0-0.mp3"),
Sponsored(),
# Sponsored(),
Introduction(),
TitleSlide("Pairing", sound="data/sound/episode3/slide1-4.mp3", wait_time=3),
TitleSlide("Pairing", sound="data/sound/episode3/slide1-4.mp3", wait_time=3.5),
Pairing(),
TitleSlide("Trusted setup", sound="data/sound/episode3/slide3-0.mp3", wait_time=1.5),
TrustedSetup(),
TitleSlide("Ceremony", sound="data/sound/episode3/slide4-4.mp3", wait_time=3),
Ceremony(),
CeremonyVerification(),
CeremonyVerification2(),
# Subscribe("data/sound/episode1/s28.wav"),
# Credits2(),
Subscribe("data/sound/episode1/s28.wav"),
CreditsE3(),
]

EPISODE4 = [
Expand Down
15 changes: 10 additions & 5 deletions zkmarek/video/slides/episode3/ceremony_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,31 +93,36 @@ def construct(self):
self.vector_k.next_to(self.title_label, DOWN, buff=0.8)

def animate_in(self, scene):
self.new_subsection(scene, "intro to verification", "data/sound/episode3/slide6-0.mp3")
scene.play(Write(self.title_label))
self.new_subsection(scene, "not the powers of tau", "data/sound/episode3/slide6-1.mp3")
self.new_subsection(scene, "should have the powers of tau", "data/sound/episode3/slide6-1.mp3")
scene.play(Write(self.title_label))
scene.play(Write(self.vector_k))

self.new_subsection(scene, "not powers of tau", "data/sound/episode3/slide6-2.mp3")
scene.play(FadeOut(self.vector_k))
scene.play(Write(self.header_label))
scene.play(Write(self.subheader_label))
scene.play(FadeIn(self.vec_g1))
scene.play(FadeIn(self.vec_g2))
scene.play(FadeIn(self.arrows_g1[0]))

self.new_subsection(scene, "pairing", "data/sound/episode3/slide6-3.mp3")
self.pairing1.animate_first(scene)
self.vec_g1.animate_transform_matching_shapes(scene, SETUP_WITH_TAU_G1)
self.vec_g2.animate_transform_matching_shapes(scene, SETUP_WITH_TAU_G2)

self.new_subsection(scene, "property of pairings", "data/sound/episode3/slide6-4.mp3")
self.pairing1.animate_rest(scene)

self.vec_g1.animate_transform_matching_shapes(scene, SETUP_START_G1)
self.vec_g2.animate_transform_matching_shapes(scene, SETUP_START_G2)

scene.play(FadeOut(self.arrows_g1[0]))
self.pairing1.animate_out(scene)
self.new_subsection(scene, "calculations correct", "data/sound/episode3/slide6-4.mp3")

self.new_subsection(scene, "calculations correct", "data/sound/episode3/slide6-5.mp3")
scene.play(Write(self.arrows_g1[1]))
scene.play(Write(self.pairing2))
scene.play(Unwrite(self.pairing2))
scene.play(FadeOut(self.pairing2))
scene.play(FadeOut(self.arrows_g1[1]))

scene.play(Write(self.arrows_g1[2]))
Expand Down
6 changes: 3 additions & 3 deletions zkmarek/video/slides/episode3/ceremony_verification_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def construct(self):
r"{{e(P_0^i, \tau_{[i+1]} \cdot G_2)}}",
r"{{e(P_0^i, \tau_{[i+1]} \cdot G_2)}} = e(P_0^{{i}}, {{ \tau_{[i+1]} }} \cdot G_2)}}",
r"{{e(P_0^i, \tau_{[i+1]} \cdot G_2)}} = e(P_0^{ {{i+1}} }, {{1}} \cdot G_2)",
r"{{e(P_0^i, Q_0^{[i+1]} }} = e(P_0^{ {{i+1}} }, G_2)"
r"{{e(P_0^i, Q_0^{[i+1]}) }} = e(P_0^{ {{i+1}} }, G_2)"
])
self.pairing.next_to(self.vec_next, DOWN, buff=0.5)

Expand Down Expand Up @@ -93,6 +93,6 @@ def animate_in(self, scene):

scene.play(FadeOut(self.vec_g1_current),
FadeOut(self.vec_next),
FadeOut(self.arrow))
FadeOut(self.arrow, self.tau_current, self.tau_next, self.header_label, self.subheader_label, self.title_label))

scene.wait(2)
scene.wait(5)
41 changes: 41 additions & 0 deletions zkmarek/video/slides/episode3/credits.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from manim import DOWN, UP, MoveToTarget, Text, VGroup, rate_functions

from zkmarek.video.constant import PRIMARY_COLOR, PRIMARY_FONT, SECONDARY_COLOR
from zkmarek.video.slides.common.slide_base import SlideBase


class Credits(SlideBase):
group: VGroup

def __init__(self):
super().__init__("Credits")

def construct(self):
self.group = VGroup()

def add_title(self, text: Text):
result = Text(text, font=PRIMARY_FONT, color=PRIMARY_COLOR)
if len(self.group) > 0:
result.next_to(self.group[-1], direction=DOWN, buff=1)
self.group.add(result)

def add_credit(self, text):
result = Text(text, font=PRIMARY_FONT, color=SECONDARY_COLOR, font_size=30)
result.next_to(self.group[-1], direction=DOWN, buff=0.2)
self.group.add(result)

def animate_in(self, scene):
self.add_title("Idea and voice")
self.add_credit("Marek Kirejczyk @zkmarek")
self.add_title("Code and animation")
self.add_credit("Marek Kirejczyk @zkmarek")
self.add_credit("Marta Wleklińska @martawleklinska")

# self.add_title("Special thanks")
self.add_title("Music from Udio AI music")
self.group.generate_target()
self.group.shift(5 * DOWN)
self.group.target.shift(16 * UP)
scene.play(
MoveToTarget(self.group, run_time=20, rate_func=rate_functions.linear)
)
7 changes: 5 additions & 2 deletions zkmarek/video/slides/episode3/introduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def animate_in(self, scene):
self.new_subsection(scene, "intro to tau", "data/sound/episode3/slide1-0.mp3")
scene.play(FadeIn(self.person1, self.person2, self.person3, self.person4))
scene.play(FadeIn(self.tau))
scene.play(FadeIn(self.thumb1, self.thumb2, self.thumb3, self.thumb4))
scene.play(FadeIn(self.thumb1))
scene.play(FadeIn(self.thumb2))
scene.play(FadeIn(self.thumb3))
scene.play(FadeIn(self.thumb4))

self.new_subsection(scene, "trusted setup Plonk, zk snarks", "data/sound/episode3/slide1-1.mp3")
self.person_wthumb = Group(self.person1, self.thumb1, self.person2, self.person3, self.person4, self.thumb2, self.thumb3, self.thumb4, self.tau)
Expand All @@ -57,7 +60,7 @@ def animate_in(self, scene):
scene.wait(0.5)

def animate_out(self, scene):
scene.play(FadeOut(self.person_wthumb, self.polynomial2))
scene.play(FadeOut(self.person1, self.person2, self.person3, self.person4, self.polynomial2))

def animate_tree(self, scene):
tree = VerkleTree().scale(0.8).shift(UP*1.5)
Expand Down
2 changes: 1 addition & 1 deletion zkmarek/video/slides/episode3/morphin_math_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def animate_out(self, scene: Scene):

def animate_first(self, scene: Scene):
scene.play(Write(self.texs[0]))
scene.wait(3)
scene.wait(1)
scene.play(Indicate(self.texs[0], color = PRIMARY_COLOR))
scene.wait(1)

Expand Down
2 changes: 2 additions & 0 deletions zkmarek/video/slides/episode3/pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def construct(self):
self.definition.next_to(self.definition_label, DOWN)
self.bilinearity_label.next_to(self.definition, DOWN, buff=0.8)
self.bilinearity.next_to(self.bilinearity_label, DOWN)
self.bilinearity2.next_to(self.bilinearity_label, DOWN)
self.bilinearity3.next_to(self.bilinearity_label, DOWN)
self.non_degeneracy_label.next_to(self.bilinearity, DOWN, buff=1)
self.non_degeneracy.next_to(self.non_degeneracy_label, DOWN)
self.computability_label.next_to(self.non_degeneracy, DOWN, buff=0.6)
Expand Down
15 changes: 9 additions & 6 deletions zkmarek/video/slides/episode3/trusted_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,34 @@ def construct(self):
def animate_in(self, scene):
self.new_subsection(scene, "intro to trusted setup", "data/sound/episode3/slide4-0.mp3")
scene.play(Write(self.title_label))
scene.wait(1.5)
scene.wait(1)
scene.play(Write(self.tau))
scene.play(FadeIn(self.person1, self.person2, self.person3, self.person4))
scene.play(FadeIn(self.person1))
scene.play(FadeIn(self.person2))
scene.play(FadeIn(self.person3))
scene.play(FadeIn(self.person4))
scene.wait(2)
scene.play(FadeIn(self.tau_number))
scene.wait(3)
scene.wait(1.5)
scene.play(FadeIn(self.question4, self.question1, self.question3, self.question2))

self.new_subsection(scene, "multiplying by G1", "data/sound/episode3/slide4-1.mp3")
scene.play(FadeOut(self.question4, self.question1, self.question3, self.question2, self.person1, self.person2, self.person3, self.person4, self.tau_number),Write(self.vector_g1))
self.vector_g1.animate_transform_matching_shapes(scene, SETUP_G1_2)
scene.wait(3)
scene.wait(3.5)
scene.play(Indicate(self.vector_g1[0][1], color = HIGHLIGHT_COLOR))
scene.wait(2)
scene.play(Indicate(self.vector_g1[0][1], color = HIGHLIGHT_COLOR))
scene.play(Indicate(self.vector_g1[1][1], color = HIGHLIGHT_COLOR))
scene.play(Indicate(self.vector_g1[3][1], color = HIGHLIGHT_COLOR))
self.new_subsection(scene, "multiplying by G2", "data/sound/episode3/slide4-2.mp3")
scene.play(Write(self.vector_g2))
scene.wait(3)
scene.wait(2)
scene.play(Indicate(self.vector_g2[0][1], color = HIGHLIGHT_COLOR), Indicate(self.vector_g1[0][1], color = HIGHLIGHT_COLOR))
self.vector_g1.animate_transform_matching_shapes(scene, SETUP_G1_3)

self.new_subsection(scene, "there are ec points", "data/sound/episode3/slide4-3.mp3")
self.vector_g2.animate_transform_matching_shapes(scene, SETUP_G2_2)
scene.wait(4.5)
scene.wait(3.5)


0 comments on commit 1a884de

Please sign in to comment.