diff --git a/src/lamp/lamp.py b/src/lamp/lamp.py index e02ff30..c6c1d79 100644 --- a/src/lamp/lamp.py +++ b/src/lamp/lamp.py @@ -255,8 +255,10 @@ class L5(Timed, Scene): cone = json.load(open('cone.json')); hw_x, hw_y = cone['hw_x'], cone['hw_y'] img = ImageMobject('xi.png'); img.set(width=config.frame_width) PPU = config.frame_width/(2*hw_x) # manim units per unit of u + back = lambda m: m.add_background_rectangle(color=BG, opacity=0.7, buff=0.12) + cap = lambda s: back(globals()['cap'](s)) self.go(FadeIn(img), rt=1.6) - t = Text("ξ", font="Georgia", color=GOLD).scale(1.1).to_corner(UL, buff=0.5); self.add(t) + t = back(Text("ξ", font="Georgia", color=GOLD).scale(1.1).to_corner(UL, buff=0.5)); self.add(t) c1 = cap("ξ in the u-chart: colour is the phase, brightness the size"); self.go(FadeIn(c1), rt=0.5) self.go(Wait(), rt=1.5) mirror = Line(8*LEFT, 8*RIGHT, color="#ffffff", stroke_width=2.5) @@ -280,8 +282,8 @@ class L5(Timed, Scene): e = VMobject(color=PINK, stroke_width=3); e.set_points_smoothly([np.array([sx*p[0], p[1], 0]) for p in pts]); edges.add(e) self.go(Create(edges), rt=2.2) self.go(FadeOut(c3), rt=0.1); c4 = cap("|ξ| = 1 is a cone around the strut: shrinking inside, growing outside"); self.go(FadeIn(c4), rt=0.4) - lab_in = Text("cos", font="Georgia", slant=ITALIC, color=FG).scale(0.7).move_to(2.2*UP + 0.9*RIGHT) - lab_out = Text("cosh", font="Georgia", slant=ITALIC, color=FG).scale(0.7).move_to(0.9*UP + 4.2*RIGHT) + lab_in = back(Text("cos", font="Georgia", slant=ITALIC, color=FG).scale(0.7).move_to(2.2*UP + 0.9*RIGHT)) + lab_out = back(Text("cosh", font="Georgia", slant=ITALIC, color=FG).scale(0.7).move_to(0.9*UP + 4.2*RIGHT)) self.go(FadeIn(lab_in), FadeIn(lab_out), rt=0.8) self.go(Wait(), rt=3.0) self.go(FadeOut(c4), FadeOut(lab_in), FadeOut(lab_out), rt=0.2)