Added some writing
This commit is contained in:
40
main.py
40
main.py
@ -163,6 +163,42 @@ class LatticeProblems(Scene):
|
||||
self.play(ApplyMethod(text.to_corner, UP + LEFT))
|
||||
self.wait()
|
||||
|
||||
diagram_1 = VGroup()
|
||||
diagram_1.add(Dot(ORIGIN))
|
||||
diagram_1.add(Arrow(ORIGIN, [0.25, 1, 0], buff=0))
|
||||
diagram_1.add(Arrow(ORIGIN, [0.5, 1, 0], buff=0))
|
||||
arrow = Arrow(ORIGIN, [1, 0, 0], buff=0)
|
||||
arrow.set_color(BLUE)
|
||||
arrow.set_z_index(-1)
|
||||
diagram_1.add(arrow)
|
||||
|
||||
diagram_1.shift(3 * LEFT)
|
||||
label_1 = Tex("Closest Vector Problem", font_size=MEDIUM_FONT)
|
||||
label_1.next_to(diagram_1, DOWN)
|
||||
|
||||
diagram_2 = VGroup()
|
||||
diagram_2.add(Dot(ORIGIN))
|
||||
diagram_2.add(Arrow(ORIGIN, [1, 1, 0], buff=0))
|
||||
diagram_2.add(Arrow(ORIGIN, [-1, 0, 0], buff=0))
|
||||
arrow_1 = Arrow(ORIGIN, [1, 0, 0], buff=0)
|
||||
arrow_1.set_color(BLUE)
|
||||
arrow_1.set_z_index(-1)
|
||||
diagram_2.add(arrow_1)
|
||||
arrow_2 = Arrow(ORIGIN, [0, 1, 0], buff=0)
|
||||
arrow_2.set_color(BLUE)
|
||||
arrow_2.set_z_index(-1)
|
||||
diagram_2.add(arrow_2)
|
||||
|
||||
diagram_2.shift(3 * RIGHT)
|
||||
label_2 = Tex("Shortest Basis Problem", font_size=MEDIUM_FONT)
|
||||
label_2.next_to(diagram_2, DOWN)
|
||||
|
||||
self.play(Create(diagram_1), Create(diagram_2))
|
||||
self.wait()
|
||||
|
||||
self.play(Create(label_1), Create(label_2))
|
||||
self.wait()
|
||||
|
||||
|
||||
class OrthoDefect(Scene):
|
||||
def construct(self):
|
||||
@ -182,7 +218,7 @@ class OrthoDefect(Scene):
|
||||
diagram_1.add(Arrow(ORIGIN, [1, 0, 0], buff=0))
|
||||
diagram_1.add(Arrow(ORIGIN, [0, 1, 0], buff=0))
|
||||
|
||||
diagram_1.shift(2 * LEFT)
|
||||
diagram_1.shift(3 * LEFT)
|
||||
diagram_1.set_color(GREEN)
|
||||
label_1 = Tex("Defect 1", font_size=MEDIUM_FONT)
|
||||
label_1.next_to(diagram_1, DOWN)
|
||||
@ -192,7 +228,7 @@ class OrthoDefect(Scene):
|
||||
diagram_2.add(Arrow(ORIGIN, [0.25, 1, 0], buff=0))
|
||||
diagram_2.add(Arrow(ORIGIN, [0.5, 1, 0], buff=0))
|
||||
|
||||
diagram_2.shift(2 * RIGHT)
|
||||
diagram_2.shift(3 * RIGHT)
|
||||
diagram_2.set_color(RED)
|
||||
label_2 = Tex(r"Defect $\approx$ 4.6", font_size=MEDIUM_FONT)
|
||||
label_2.next_to(diagram_2, DOWN)
|
||||
|
Reference in New Issue
Block a user