Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Tweaks to IPTScene

Grant Sanderson7e4bd54da784
diff --git a/active_projects/basel2.py b/active_projects/basel2.py
index 1bfde0621..bb920165e 100644
--- a/active_projects/basel2.py
+++ b/active_projects/basel2.py
@@ -2483,21 +2483,25 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
self.wait()
# Show spotlight a key point
- def show_key_point(spotlight, new_point):
- screen = spotlight.screen
- update_spotlight_anim = UpdateFromFunc(spotlight, update_spotlight)
- self.play(
- Transform(screen, screen.alt_version),
- update_spotlight_anim,
- )
+ def show_beaming_light(spotlight):
triangle = get_spotlight_triangle(spotlight)
for x in range(3):
anims = []
if x > 0:
anims.append(FadeOut(triangle.copy()))
- anims.append(GrowFromPoint(triangle, H))
+ anims.append(GrowFromPoint(triangle, triangle.points[0]))
self.play(*anims)
self.play(FadeOut(triangle))
+ pass
+
+ def show_key_point(spotlight, new_point):
+ screen = spotlight.screen
+ update_spotlight_anim = UpdateFromFunc(spotlight, update_spotlight)
+ self.play(
+ Transform(screen, screen.alt_version),
+ update_spotlight_anim,
+ )
+ show_beaming_light(spotlight)
self.play(screen.restore, update_spotlight_anim)
self.wait()
self.play(
@@ -2506,6 +2510,7 @@ class IPTScene(TwoLightSourcesScene, ZoomedScene):
update_spotlight_anim,
run_time = 2
)
+ show_beaming_light(spotlight)
self.wait()
self.play(
lsC.move_source_to, H,