defect
This commit is contained in:
parent
9b5c6c82bc
commit
8e552dd0c4
87
main.py
87
main.py
@ -48,8 +48,8 @@ class Premise(TitledScene):
|
|||||||
self.play(Create(arrow_1), Create(arrow_2))
|
self.play(Create(arrow_1), Create(arrow_2))
|
||||||
self.wait()
|
self.wait()
|
||||||
|
|
||||||
for i in range(-7, 8):
|
for i in range(-50, 50):
|
||||||
for j in range(-6, 7):
|
for j in range(-25, 25):
|
||||||
lattice_1.add(Dot([i, j, 0]))
|
lattice_1.add(Dot([i, j, 0]))
|
||||||
|
|
||||||
self.play(Create(lattice_1))
|
self.play(Create(lattice_1))
|
||||||
@ -102,3 +102,86 @@ class Premise(TitledScene):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
self.wait()
|
self.wait()
|
||||||
|
|
||||||
|
self.play(
|
||||||
|
Transform(arrow_1, Arrow(ORIGIN, [2, 0, 0], buff=0)),
|
||||||
|
*[
|
||||||
|
Transform(
|
||||||
|
dot,
|
||||||
|
Dot(
|
||||||
|
dot.get_center()
|
||||||
|
* np.matrix([[1 / 2, 1 / 2, 0], [-1 / 2, 1 / 2, 0], [0, 0, 1]])
|
||||||
|
* np.matrix([[2, 0, 0], [1, 1, 0], [0, 0, 1]])
|
||||||
|
),
|
||||||
|
)
|
||||||
|
for dot in lattice_1
|
||||||
|
]
|
||||||
|
)
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
|
||||||
|
class MatrixRep(TitledScene):
|
||||||
|
def construct(self):
|
||||||
|
self.add_title("Lattices")
|
||||||
|
|
||||||
|
matrix_comp = MathTex(
|
||||||
|
r"\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix} \sim \begin{bmatrix}1 & 2\\ 1 & 0\end{bmatrix}"
|
||||||
|
)
|
||||||
|
lattice_comp = MathTex(
|
||||||
|
r"L\left(\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix}\right) = L\left(\begin{bmatrix}1 & 2\\ 1 & 0\end{bmatrix}\right)"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.play(Create(matrix_comp))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
self.play(Transform(matrix_comp, lattice_comp))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
self.play(ApplyMethod(matrix_comp.shift, 2 * UP))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
l_def = MathTex(
|
||||||
|
r"L(\begin{bmatrix}\mathbf{b_1} & \mathbf{b_2}\end{bmatrix}) = \{ k_1 \mathbf{b_1} + k_2 \mathbf{b_2} \mid k_i \in \mathbb{Z} \}"
|
||||||
|
)
|
||||||
|
|
||||||
|
l_def.shift(DOWN)
|
||||||
|
|
||||||
|
self.play(Create(l_def))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
|
||||||
|
class OrthoDefect(TitledScene):
|
||||||
|
def construct(self):
|
||||||
|
text = Tex("How do we decide which bases are ``good''?", font_size=LARGE_FONT)
|
||||||
|
|
||||||
|
self.play(Create(text))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
self.play(ApplyMethod(text.to_edge, UP))
|
||||||
|
self.wait()
|
||||||
|
|
||||||
|
diagram_1 = VGroup()
|
||||||
|
diagram_1.add(Dot(ORIGIN))
|
||||||
|
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.set_color(GREEN)
|
||||||
|
label_1 = Tex("Defect 1.0", font_size=MEDIUM_FONT)
|
||||||
|
label_1.next_to(diagram_1, DOWN)
|
||||||
|
|
||||||
|
diagram_2 = VGroup()
|
||||||
|
diagram_2.add(Dot(ORIGIN))
|
||||||
|
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.set_color(RED)
|
||||||
|
label_2 = Tex(r"Defect $\approx$ 4.6", 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()
|
||||||
|
Loading…
Reference in New Issue
Block a user