Skip to content

Commit

Permalink
Show both line and sidebar at the same time for addition to infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
marekkirejczyk committed Jun 20, 2023
1 parent 38fe46c commit 81271df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion zkmarek/video/mobjects/discreet_elliptic_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, ax: Axes, coords: ECAffine):
)
self.coords = coords


class DiscreteEllipticChart(VGroup):
curve: WeierstrassCurve
dots: list[Dot] = []
Expand Down
2 changes: 2 additions & 0 deletions zkmarek/video/mobjects/point_at_infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def __init__(self, ax: Axes, x: float, y: float):
self.y = y
self.dot = Dot(ax.c2p(x, y), color=GREEN, radius=0.05)
self.label = MathTex("\infty")
self.add(self.dot)
self.add(self.label)

def animate_in(self, scene):
self.dot.move_to(self.ax.c2p(self.x, self.y))
Expand Down
4 changes: 2 additions & 2 deletions zkmarek/video/slides/ec/addition_to_infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def animate_in(self, scene):
)
scene.play(GrowFromPoint(self.line, point=dots[1].get_center(), run_time=3))
self.point_at_infinity.animate_in(scene)
self.point_at_infinity.animate_out(scene)
scene.play(FadeOut(self.line))
self.chart.add(self.point_at_infinity)
self.chart.add(self.line)
self.chart.animate_align_left(scene)
self.sidebar.animate_show_label(scene)
self.sidebar.animate_show_math(scene)
Expand Down

0 comments on commit 81271df

Please sign in to comment.