Skip to content

Commit

Permalink
added participants to ceremony slide and fixes animation in trusted s…
Browse files Browse the repository at this point in the history
…etup; added title slide for ceremony
  • Loading branch information
martawleklinska committed Jul 17, 2024
1 parent 53b98c1 commit 12ab09d
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 12 deletions.
Binary file modified data/sound/episode3/slide4-0.mp3
Binary file not shown.
1 change: 1 addition & 0 deletions zkmarek/video/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
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(),
Expand Down
8 changes: 6 additions & 2 deletions zkmarek/video/slides/episode3/ceremony.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def __init__(self):
def construct(self):
self.title_label = Text("Ceremony", font=PRIMARY_FONT, color=PRIMARY_COLOR)
self.group = ImageMobject("zkmarek/video/slides/episode3/group.png")
self.person = ImageMobject("zkmarek/video/slides/episode3/person_blue.png").scale(0.5)
self.person2 = ImageMobject("zkmarek/video/slides/teaser3/person.png").scale(0.5)
self.person_tau0 = MathTex(r"\tau_0", color = SECONDARY_COLOR, font_size=70).next_to(self.group, DOWN, buff=0.01)
self.person_tau1 = MathTex(r"\tau_1", color = SECONDARY_COLOR, font_size=70).next_to(self.group, LEFT, buff=0.1)
self.person_tau2 = MathTex(r"\tau_2", color = SECONDARY_COLOR, font_size=70).next_to(self.group, RIGHT, buff=0.1)
Expand All @@ -59,8 +61,10 @@ def construct(self):
self.title_label.to_edge(UP)
self.vector_0.next_to(self.title_label, DOWN, buff=0.8)
self.tau_0.next_to(self.vector_0, LEFT)
self.person.next_to(self.tau_0, LEFT)
self.vector_1.next_to(self.vector_0, DOWN, buff=0.5)
self.tau_1.next_to(self.vector_1, LEFT)
self.person2.next_to(self.tau_1, LEFT)
self.three_dot.next_to(self.vector_1, DOWN, buff=0.5)
self.vector_k.next_to(self.three_dot, DOWN, buff=0.5)
self.tau_k.next_to(self.vector_k, LEFT)
Expand All @@ -76,11 +80,11 @@ def animate_in(self, scene):
scene.play(FadeIn(self.person_tau2))

self.new_subsection(scene, "first participant", "data/sound/episode3/slide5-1.mp3")
scene.play(Write(self.tau_0), FadeOut(self.group, self.person_tau0, self.person_tau1, self.person_tau2))
scene.play(FadeIn(self.person), Write(self.tau_0), FadeOut(self.person_tau0, self.person_tau1, self.person_tau2, self.group))
scene.play(Write(self.vector_0))

self.new_subsection(scene, "beginning of ceremony", "data/sound/episode3/slide5-2.mp3")
scene.play(Write(self.tau_1))
scene.play(Write(self.tau_1), FadeIn(self.person2))
scene.play(Write(self.vector_1))
scene.wait(3)
scene.play(Indicate(self.tau_0, color = PRIMARY_COLOR))
Expand Down
Binary file added zkmarek/video/slides/episode3/person_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 37 additions & 10 deletions zkmarek/video/slides/episode3/trusted_setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from manim import LEFT, RIGHT, DOWN, UP, MathTex, Tex, Text, Write, Line
from manim import LEFT, RIGHT, DOWN, UP, MathTex, Tex, Text, Write, Line, ImageMobject, FadeIn, FadeOut, Indicate

from zkmarek.video.constant import PRIMARY_COLOR, PRIMARY_FONT, SECONDARY_COLOR
from zkmarek.video.constant import PRIMARY_COLOR, PRIMARY_FONT, SECONDARY_COLOR, HIGHLIGHT_COLOR
from zkmarek.video.mobjects.tex_array import TexArray
from zkmarek.video.slides.common.slide_base import SlideBase

Expand Down Expand Up @@ -63,23 +63,50 @@ def construct(self):
start=self.tau.get_critical_point(LEFT),
end=self.tau.get_critical_point(RIGHT), color=SECONDARY_COLOR)

person = ImageMobject("zkmarek/video/slides/teaser3/person.png").scale(0.45).shift(DOWN)

self.person1 = person.copy().shift(2*LEFT)
self.person2 = person.copy().shift(2*RIGHT)
self.person3 = person.copy().shift(UP)
self.person4 = person.copy().shift(DOWN)

self.tau_number = MathTex(r"\tau", font_size=80, color = SECONDARY_COLOR).shift(DOWN)

question = Text("?", font_size=35, color = PRIMARY_COLOR, font = PRIMARY_FONT)

self.question1 = question.copy().next_to(self.person1, UP+RIGHT).shift(DOWN*0.7+LEFT*0.5)
self.question2 = question.copy().next_to(self.person2, UP+RIGHT).shift(DOWN*0.7+LEFT*0.5)
self.question3 = question.copy().next_to(self.person3, UP+RIGHT).shift(DOWN*0.7+LEFT*0.5)
self.question4 = question.copy().next_to(self.person4, UP+RIGHT).shift(DOWN*0.7+LEFT*0.5)

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.play(Write(self.tau))
scene.play(FadeIn(self.person1, self.person2, self.person3, self.person4))
scene.wait(2)
scene.play(FadeIn(self.tau_number))
scene.wait(3)
scene.play(FadeIn(self.question4, self.question1, self.question3, self.question2))

self.new_subsection(scene, "multiplying by G1", "data/sound/episode3/slide4-2.mp3")
scene.play(Write(self.vector_g1))
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)

self.new_subsection(scene, "multiplying by G2", "data/sound/episode3/slide4-3.mp3")
scene.wait(3)
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))
self.new_subsection(scene, "there are ec points", "data/sound/episode3/slide4-4.mp3")

scene.wait(3)
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.vector_g2.animate_transform_matching_shapes(scene, SETUP_G2_2)
scene.play(Write(self.strike))
scene.wait(1.5)
self.new_subsection(scene, "there are ec points", "data/sound/episode3/slide4-3.mp3")

scene.wait(4.5)


0 comments on commit 12ab09d

Please sign in to comment.