mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
CircleThenFadeAround -> ShowCreationThenFadeAround
This commit is contained in:
parent
737fe3fde7
commit
e5e233262c
12 changed files with 17 additions and 17 deletions
|
@ -927,7 +927,7 @@ class PiComputingAlgorithmsAxes(Scene):
|
||||||
lag_ratio=0.4,
|
lag_ratio=0.4,
|
||||||
))
|
))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(CircleThenFadeAround(algorithms[-1][0]))
|
self.play(ShowCreationThenFadeAround(algorithms[-1][0]))
|
||||||
|
|
||||||
def get_machin_like_formula(self):
|
def get_machin_like_formula(self):
|
||||||
formula = TexMobject(
|
formula = TexMobject(
|
||||||
|
|
|
@ -385,7 +385,7 @@ class AskAboutFindingNewVelocities(Scene):
|
||||||
).set_color(YELLOW)
|
).set_color(YELLOW)
|
||||||
|
|
||||||
self.play(
|
self.play(
|
||||||
CircleThenFadeAround(energy_expression),
|
ShowCreationThenFadeAround(energy_expression),
|
||||||
momentum_text.set_fill, {"opacity": 0.25},
|
momentum_text.set_fill, {"opacity": 0.25},
|
||||||
FadeOut(self.all_velocity_labels),
|
FadeOut(self.all_velocity_labels),
|
||||||
)
|
)
|
||||||
|
@ -616,9 +616,8 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities):
|
||||||
|
|
||||||
self.add(equations)
|
self.add(equations)
|
||||||
self.play(LaggedStart(
|
self.play(LaggedStart(
|
||||||
AnimationGroup,
|
ShowCreationThenDestruction,
|
||||||
equations.copy().set_stroke(YELLOW, 3).set_fill(opacity=0),
|
equations.copy().set_stroke(YELLOW, 3).set_fill(opacity=0),
|
||||||
lambda m: (ShowCreation(m), FadeOut(m)),
|
|
||||||
lag_ratio=0.8,
|
lag_ratio=0.8,
|
||||||
remover=True,
|
remover=True,
|
||||||
))
|
))
|
||||||
|
|
|
@ -203,6 +203,7 @@ class VFadeIn(Animation):
|
||||||
to mobjects while they are being animated in some other way (e.g. shifting
|
to mobjects while they are being animated in some other way (e.g. shifting
|
||||||
then) in a way that does not work with FadeIn and FadeOut
|
then) in a way that does not work with FadeIn and FadeOut
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def update_submobject(self, submobject, starting_submobject, alpha):
|
def update_submobject(self, submobject, starting_submobject, alpha):
|
||||||
submobject.set_stroke(
|
submobject.set_stroke(
|
||||||
opacity=interpolate(0, starting_submobject.get_stroke_opacity(), alpha)
|
opacity=interpolate(0, starting_submobject.get_stroke_opacity(), alpha)
|
||||||
|
|
|
@ -174,7 +174,7 @@ class ShowCreationThenDestructionAround(AnimationOnSurroundingRectangle):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class CircleThenFadeAround(AnimationOnSurroundingRectangle):
|
class ShowCreationThenFadeAround(AnimationOnSurroundingRectangle):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"rect_to_animation": lambda rect: Succession(
|
"rect_to_animation": lambda rect: Succession(
|
||||||
ShowCreation, rect,
|
ShowCreation, rect,
|
||||||
|
|
|
@ -527,9 +527,9 @@ class FunctionGInSymbols(Scene):
|
||||||
VGroup(seeking_text, g_equals_zero).shift, 1.5 * DOWN
|
VGroup(seeking_text, g_equals_zero).shift, 1.5 * DOWN
|
||||||
)
|
)
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(CircleThenFadeAround(g_of_neg_p[2]))
|
self.play(ShowCreationThenFadeAround(g_of_neg_p[2]))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(CircleThenFadeAround(neg_g_of_p))
|
self.play(ShowCreationThenFadeAround(neg_g_of_p))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(neg_g_of_p.restore)
|
self.play(neg_g_of_p.restore)
|
||||||
rects = VGroup(*map(SurroundingRectangle, [f_of_p, f_of_neg_p]))
|
rects = VGroup(*map(SurroundingRectangle, [f_of_p, f_of_neg_p]))
|
||||||
|
|
|
@ -387,7 +387,7 @@ class ShowArrayOfEccentricities(Scene):
|
||||||
e_copy.set_color(RED)
|
e_copy.set_color(RED)
|
||||||
self.play(ShowCreation(e_copy))
|
self.play(ShowCreation(e_copy))
|
||||||
self.play(
|
self.play(
|
||||||
CircleThenFadeAround(
|
ShowCreationThenFadeAround(
|
||||||
eccentricity_labels[i],
|
eccentricity_labels[i],
|
||||||
),
|
),
|
||||||
FadeOut(e_copy)
|
FadeOut(e_copy)
|
||||||
|
|
|
@ -857,7 +857,7 @@ class CylinderModel(Scene):
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(
|
self.play(
|
||||||
movers.apply_complex_function, joukowsky_map,
|
movers.apply_complex_function, joukowsky_map,
|
||||||
CircleThenFadeAround(self.func_label),
|
ShowCreationThenFadeAround(self.func_label),
|
||||||
run_time=2
|
run_time=2
|
||||||
)
|
)
|
||||||
self.add(self.get_stream_lines_animation(stream_lines))
|
self.add(self.get_stream_lines_animation(stream_lines))
|
||||||
|
|
|
@ -310,9 +310,9 @@ class IntegralSymbols(Scene):
|
||||||
|
|
||||||
self.play(FadeInFrom(rhs, 4 * LEFT))
|
self.play(FadeInFrom(rhs, 4 * LEFT))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(CircleThenFadeAround(rhs[1]))
|
self.play(ShowCreationThenFadeAround(rhs[1]))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(CircleThenFadeAround(rhs[2:]))
|
self.play(ShowCreationThenFadeAround(rhs[2:]))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(
|
self.play(
|
||||||
GrowFromCenter(int_brace),
|
GrowFromCenter(int_brace),
|
||||||
|
|
|
@ -3360,7 +3360,7 @@ class ShowEqualAngleSlices(IntroduceShapeOfVelocities):
|
||||||
delta_t_numerator.scale, 1.5, {"about_edge": DOWN},
|
delta_t_numerator.scale, 1.5, {"about_edge": DOWN},
|
||||||
delta_t_numerator.set_color, YELLOW
|
delta_t_numerator.set_color, YELLOW
|
||||||
)
|
)
|
||||||
self.play(CircleThenFadeAround(prop_exp[:-2]))
|
self.play(ShowCreationThenFadeAround(prop_exp[:-2]))
|
||||||
self.play(
|
self.play(
|
||||||
delta_t_numerator.fade, 1,
|
delta_t_numerator.fade, 1,
|
||||||
MoveToTarget(moving_R_squared),
|
MoveToTarget(moving_R_squared),
|
||||||
|
@ -3447,7 +3447,7 @@ class ShowEqualAngleSlices(IntroduceShapeOfVelocities):
|
||||||
polygon.set_fill(BLUE_E, opacity=0.8)
|
polygon.set_fill(BLUE_E, opacity=0.8)
|
||||||
polygon.set_stroke(WHITE, 3)
|
polygon.set_stroke(WHITE, 3)
|
||||||
|
|
||||||
self.play(CircleThenFadeAround(v1))
|
self.play(ShowCreationThenFadeAround(v1))
|
||||||
self.play(
|
self.play(
|
||||||
MoveToTarget(v1),
|
MoveToTarget(v1),
|
||||||
GrowFromCenter(root_dot),
|
GrowFromCenter(root_dot),
|
||||||
|
|
|
@ -4182,7 +4182,7 @@ class IntroduceQuaternions(Scene):
|
||||||
FadeInFromDown(number),
|
FadeInFromDown(number),
|
||||||
Write(label),
|
Write(label),
|
||||||
)
|
)
|
||||||
self.play(CircleThenFadeAround(
|
self.play(ShowCreationThenFadeAround(
|
||||||
number[2:],
|
number[2:],
|
||||||
surrounding_rectangle_config={"color": BLUE}
|
surrounding_rectangle_config={"color": BLUE}
|
||||||
))
|
))
|
||||||
|
@ -4630,7 +4630,7 @@ class BreakUpQuaternionMultiplicationInParts(Scene):
|
||||||
)
|
)
|
||||||
self.play(
|
self.play(
|
||||||
randy.change, "confused", rotate_words,
|
randy.change, "confused", rotate_words,
|
||||||
CircleThenFadeAround(rotate_words),
|
ShowCreationThenFadeAround(rotate_words),
|
||||||
)
|
)
|
||||||
self.play(LaggedStart(
|
self.play(LaggedStart(
|
||||||
FadeInFrom, q_marks,
|
FadeInFrom, q_marks,
|
||||||
|
|
|
@ -1861,7 +1861,7 @@ class JustifyHeightSquish(MovingCameraScene):
|
||||||
))
|
))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(ReplacementTransform(q_mark, alpha_label1))
|
self.play(ReplacementTransform(q_mark, alpha_label1))
|
||||||
self.play(CircleThenFadeAround(
|
self.play(ShowCreationThenFadeAround(
|
||||||
equation,
|
equation,
|
||||||
surrounding_rectangle_config={
|
surrounding_rectangle_config={
|
||||||
"buff": 0.015,
|
"buff": 0.015,
|
||||||
|
|
|
@ -1018,7 +1018,7 @@ class ShowNavierStokesEquations(Scene):
|
||||||
FadeInFromDown(labels[0]),
|
FadeInFromDown(labels[0]),
|
||||||
newtons_second.next_to, variables, RIGHT, LARGE_BUFF
|
newtons_second.next_to, variables, RIGHT, LARGE_BUFF
|
||||||
)
|
)
|
||||||
self.play(CircleThenFadeAround(parts[0]))
|
self.play(ShowCreationThenFadeAround(parts[0]))
|
||||||
self.wait()
|
self.wait()
|
||||||
self.play(LaggedStart(FadeInFrom, labels[1:]))
|
self.play(LaggedStart(FadeInFrom, labels[1:]))
|
||||||
self.wait(3)
|
self.wait(3)
|
||||||
|
|
Loading…
Add table
Reference in a new issue