Skip to content

Commit

Permalink
added changed sounds in intro, pairings, trusted setup; corrections t…
Browse files Browse the repository at this point in the history
…o intro and pairings animation
  • Loading branch information
martawleklinska committed Jul 17, 2024
1 parent 26cb266 commit 6d9dff8
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 25 deletions.
Binary file modified data/sound/episode3/slide1-0.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide1-1.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide1-2.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide1-3.mp3
Binary file not shown.
Binary file added data/sound/episode3/slide1-4.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide2-1.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide2-2.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide2-3.mp3
Binary file not shown.
Binary file added data/sound/episode3/slide2-3_1.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide2-4.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide3-0.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide4-0.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide4-1.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide4-2.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide4-3.mp3
Binary file not shown.
Binary file modified data/sound/episode3/slide4-4.mp3
Binary file not shown.
31 changes: 18 additions & 13 deletions zkmarek/video/slides/episode3/introduction.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from manim import FadeIn, FadeOut, ImageMobject, LEFT, RIGHT, UP, DOWN, MathTex, Create, Group, MoveToTarget, Text, AddTextLetterByLetter
from manim import FadeIn, FadeOut, ImageMobject, LEFT, RIGHT, UP, DOWN, MathTex, Create, Group, MoveToTarget, Text, AddTextLetterByLetter, TransformMatchingShapes, VGroup
from zkmarek.video.slides.common.slide_base import SlideBase
from zkmarek.video.constant import SECONDARY_COLOR, PRIMARY_FONT
from zkmarek.video.constant import SECONDARY_COLOR, PRIMARY_FONT, PRIMARY_COLOR
from zkmarek.video.mobjects.verkle_tree import VerkleTree

class Introduction(SlideBase):
Expand All @@ -22,14 +22,12 @@ def construct(self):
self.thumb3 = thumb.copy().next_to(self.person3, UP+RIGHT).shift(DOWN+LEFT)
self.thumb4 = thumb.copy().next_to(self.person4, UP+RIGHT).shift(DOWN+LEFT)

self.question = Text("?", font = PRIMARY_COLOR, font_size=100, color = PRIMARY_COLOR)
self.tau = MathTex(r"\tau", font_size = 80, color = SECONDARY_COLOR)
self.plonk = Text("PLONK", font_size=100,
font=PRIMARY_FONT,
color=SECONDARY_COLOR)

self.plonk = Text("PLONK", font_size=100, font=PRIMARY_FONT, color=SECONDARY_COLOR)
self.groth = Text("Groth 16", font_size=80, font = PRIMARY_FONT, color = PRIMARY_COLOR)
self.polynomial = MathTex(r"p(x) = x^5+9x^4+6", font_size = 60, color = SECONDARY_COLOR).shift(DOWN)
self.polynomial1 = MathTex(r"p(\tau) = z", font_size = 60, color = SECONDARY_COLOR).next_to(self.polynomial, DOWN)

self.polynomial2 = MathTex(r"p(\tau) = \tau^5+9\tai^4+6", font_size = 60, color = SECONDARY_COLOR).shift(DOWN)
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))
Expand All @@ -43,22 +41,29 @@ def animate_in(self, scene):
scene.play(MoveToTarget(self.person_wthumb))
self.animate_tree(scene)

self.new_subsection(scene, "any polynomial", "data/sound/episode3/slide1-2.mp3")
self.new_subsection(scene, "no one knows", "data/sound/episode3/slide1-2.mp3")
scene.play(FadeIn(self.question))
scene.wait(3)
scene.play(FadeOut(self.question))
self.new_subsection(scene, "calculate polynomial", "data/sound/episode3/slide1-3.mp3")
self.person_wthumb.generate_target()
self.person_wthumb.target.shift(RIGHT*4+DOWN).scale(2)
scene.play(MoveToTarget(self.person_wthumb))

scene.play(FadeIn(self.polynomial))
scene.wait(0.5)
scene.play(FadeIn(self.polynomial1))
scene.wait(1.5)
scene.play(TransformMatchingShapes(VGroup(self.tau, self.polynomial), self.polynomial2))

scene.wait(0.5)

def animate_out(self, scene):
scene.play(FadeOut(self.person_wthumb, self.polynomial, self.polynomial1))
scene.play(FadeOut(self.person_wthumb, self.polynomial2))

def animate_tree(self, scene):
tree = VerkleTree().scale(0.8).shift(UP*1.5)
scene.play(AddTextLetterByLetter(self.plonk), run_time=1.5)
scene.play(FadeOut(self.plonk))
scene.play(FadeOut(self.plonk), FadeIn(self.groth))
scene.play(FadeOut(self.groth))
scene.play(Create(tree))
scene.wait(0.7)
scene.play(FadeOut(tree))
40 changes: 28 additions & 12 deletions zkmarek/video/slides/episode3/pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@ def construct(self):
self.chart = DiscreetePolynomialChart(41, poly).scale(0.55)
self.bilinearity_label = Text("Bilinearity", font_size=40, color=SECONDARY_COLOR, font = PRIMARY_FONT)
self.bilinearity1 = MathTex(r"e({{P}} \oplus {{P'}}, Q)", font_size = 40, color = SECONDARY_COLOR)
self.bilinearity = MathTex(r"e(P \oplus P', Q) = e({{P}}, Q) \oplus e({{P'}}, Q)", font_size=40, color=SECONDARY_COLOR)
self.bilinearity = MathTex(r"e({{P}} {{\oplus}} {{P'}}, Q) = e({{P}}, Q) {{\oplus}} e({{P'}}, Q)", font_size=40, color=SECONDARY_COLOR)
self.bilinearity2 = MathTex(r"e(P + P', Q) = e({{P}}, Q) \oplus e({{P'}}, Q)", font_size=40, color=SECONDARY_COLOR)
self.bilinearity3 = MathTex(r"e(P + P', Q) = e({{P}}, Q) \cdot e({{P'}}, Q)", font_size=40, color=SECONDARY_COLOR)

self.bilinearity1[1].set_color(PRIMARY_COLOR)
self.bilinearity1[3].set_color(PRIMARY_COLOR)
self.bilinearity[1].set_color(PRIMARY_COLOR)
self.bilinearity[3].set_color(PRIMARY_COLOR)
self.bilinearity[5].set_color(PRIMARY_COLOR)
self.bilinearity[7].set_color(PRIMARY_COLOR)
self.bilinearity[11].set_color(PRIMARY_COLOR)
self.bilinearity2[1].set_color(PRIMARY_COLOR)
self.bilinearity2[3].set_color(PRIMARY_COLOR)
self.bilinearity_morph = MorphinMathText([
r"{{e(aP, bQ)}}",
r"{{e(aP, bQ)}} = e({{a}}P, bQ){{ }}",
Expand Down Expand Up @@ -79,15 +83,18 @@ def construct(self):
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)
self.brace1_label.shift(RIGHT)

def animate_in(self, scene):
self.new_subsection(scene, "what is a pairing", "data/sound/episode3/slide2-0.mp3")
scene.play(Write(self.definition_label))
scene.play(Write(self.definition))

scene.play(FadeIn(self.brace1, self.brace2))
scene.play(FadeIn(self.brace1_label.shift(RIGHT)))
scene.wait(2)
scene.play(FadeIn(self.brace1_label))
scene.wait(0.6)
scene.play(Indicate(self.definition[2], color = HIGHLIGHT_COLOR), run_time=0.7)
scene.play(Indicate(self.definition[4], color = HIGHLIGHT_COLOR), run_time=0.7)
scene.play(FadeOut(self.brace1, self.brace2), FadeOut(self.brace1_label))

scene.play(FadeIn(self.brace3))
Expand All @@ -99,22 +106,30 @@ def animate_in(self, scene):
self.new_subsection(scene, "bilinear definition", "data/sound/episode3/slide2-1.mp3")
scene.play(Write(self.bilinearity_label))
scene.play(Write(self.bilinearity1))
scene.wait(2)
scene.wait(4.3)
scene.play(Indicate(self.bilinearity1[1], color = PRIMARY_COLOR))
scene.play(Indicate(self.bilinearity1[3], color = PRIMARY_COLOR))
scene.wait(1)
scene.play(TransformMatchingShapes(VGroup(self.bilinearity1[1].copy(), self.bilinearity1[3].copy(), self.bilinearity1), self.bilinearity))

scene.wait(3)
scene.play(Indicate(self.bilinearity[1], color = HIGHLIGHT_COLOR), Indicate(self.bilinearity[7], color = HIGHLIGHT_COLOR))
scene.play(Indicate(self.bilinearity[11], color = HIGHLIGHT_COLOR), Indicate(self.bilinearity[5], color = HIGHLIGHT_COLOR))

self.new_subsection(scene, "operations on ec and pairings", "data/sound/episode3/slide2-2.mp3")
scene.wait(3.5)
scene.wait(2)
scene.play(Indicate(self.bilinearity[3], color = HIGHLIGHT_COLOR))
scene.wait(0.5)
scene.play(Indicate(self.bilinearity[9], color = HIGHLIGHT_COLOR))
scene.wait(4)
scene.play(TransformMatchingShapes(self.bilinearity, self.bilinearity2))
self.play_sound(scene, "data/sound/episode3/slide2-2_1.mp3")
scene.wait(1)

scene.wait(4)
scene.play(TransformMatchingShapes(self.bilinearity2, self.bilinearity3))
scene.wait(2)
scene.wait(1)

self.new_subsection(scene, "multiplying", "data/sound/episode3/slide2-3.mp3")
self.bilinearity_morph.animate_in(scene)
self.play_sound(scene, "data/sound/episode3/slide2-3_1.mp3")

self.new_subsection(scene, "explaining the multiplying", "data/sound/episode3/slide2-4.mp3")
scene.play(self.bilinearity_morph.texs[-1].animate.next_to(self.bilinearity, DOWN))
Expand All @@ -124,8 +139,7 @@ def animate_in(self, scene):
scene.play(Unwrite(self.multiplying), Unwrite(self.multiplying_brace), Unwrite(self.multiplying_brace_label))
scene.wait(1)
scene.play(Indicate(self.bilinearity3, color = PRIMARY_COLOR))
scene.wait(2)
# scene.play(FadeOut(self.bilinearity_morph.texs[-1]))
scene.wait(3)

self.new_subsection(scene, "non degeneracy", "data/sound/episode3/slide2-5.mp3")
scene.play(Write(self.non_degeneracy_label))
Expand All @@ -134,6 +148,8 @@ def animate_in(self, scene):
scene.play(Indicate(self.non_degeneracy[1], color = PRIMARY_COLOR))
scene.wait(2)
scene.play(Indicate(self.non_degeneracy[3], color = PRIMARY_COLOR))
scene.wait(1.5)

self.new_subsection(scene, "computability", "data/sound/episode3/slide2-6.mp3")
scene.play(Write(self.computability_label))
scene.wait(3.5)

0 comments on commit 6d9dff8

Please sign in to comment.