diff --git a/docs/source/animation.rst b/docs/source/animation.rst index e38db633..930dd3de 100644 --- a/docs/source/animation.rst +++ b/docs/source/animation.rst @@ -61,7 +61,7 @@ Fade .. code-block:: python - class AnimationFadeInFrom(Scene): + class AnimationFadeIn(Scene): def construct(self): square = Square() for label, edge in zip( @@ -71,7 +71,7 @@ Fade anno.shift(2 * DOWN) self.add(anno) - self.play(FadeInFrom(square, edge)) + self.play(FadeIn(square, edge)) self.remove(anno, square) @@ -84,7 +84,7 @@ Fade .. code-block:: python - class AnimationFadeOutAndShift(Scene): + class AnimationFadeOut(Scene): def construct(self): square = Square() for label, edge in zip( @@ -94,7 +94,7 @@ Fade anno.shift(2 * DOWN) self.add(anno) - self.play(FadeOutAndShift(square, edge)) + self.play(FadeOut(square, edge)) self.remove(anno, square) @@ -203,7 +203,7 @@ You can combine cardinal directions to form diagonal animations def construct(self): square = Square() for diag in [UP + LEFT, UP + RIGHT, DOWN + LEFT, DOWN + RIGHT]: - self.play(FadeInFrom(square, diag)) + self.play(FadeIn(square, diag)) .. note:: You can also use the abbreviated forms like ``UL, UR, DL, DR``. diff --git a/example_scenes.py b/example_scenes.py index bc15c557..bbe0c41e 100644 --- a/example_scenes.py +++ b/example_scenes.py @@ -25,7 +25,7 @@ class OpeningManimExample(Scene): VGroup(title, basel).arrange(DOWN) self.play( Write(title), - FadeInFrom(basel, UP), + FadeIn(basel, UP), ) self.wait() diff --git a/from_3b1b/active/bayes/beta1.py b/from_3b1b/active/bayes/beta1.py index 2837cd2f..4588e7bc 100644 --- a/from_3b1b/active/bayes/beta1.py +++ b/from_3b1b/active/bayes/beta1.py @@ -316,10 +316,10 @@ class ShowThreeCases(Scene): last_percent = hundo for ar, ap in zip(alt_reviews, alt_percents): self.play( - FadeInFrom(ar, 0.5 * DOWN, lag_ratio=0.2), + FadeIn(ar, 0.5 * DOWN, lag_ratio=0.2), FadeOut(last_review), - FadeInFrom(ap, 0.5 * DOWN), - FadeOutAndShift(last_percent, 0.5 * UP), + FadeIn(ap, 0.5 * DOWN), + FadeOut(last_percent, 0.5 * UP), run_time=1.5 ) last_review = ar @@ -538,8 +538,8 @@ class PreviewThreeVideos(Scene): ) self.play( - FadeOutAndShift(title, LEFT), - FadeOutAndShift(bullets, LEFT), + FadeOut(title, LEFT), + FadeOut(bullets, LEFT), LaggedStartMap(MoveToTarget, topics), LaggedStartMap(FadeIn, thumbnails), ) @@ -577,7 +577,7 @@ class PreviewThreeVideos(Scene): ApplyFunction(lambda m: set_opacity(m, 1), tn_groups[i + 1]), ) self.wait(2) - self.play(FadeInFrom(analysis_words, 0.25 * UP)) + self.play(FadeIn(analysis_words, 0.25 * UP)) tn_groups[2].add(analysis_words) self.wait(2) @@ -586,8 +586,8 @@ class PreviewThreeVideos(Scene): FadeOut(topics[0]), FadeOut(tn_groups[1]), FadeOut(tn_groups[2]), - FadeOutAndShift(vs_labels, UP), - FadeOutAndShift(equations, UP), + FadeOut(vs_labels, UP), + FadeOut(equations, UP), ApplyFunction(lambda m: set_opacity(m, 1), thumbnails[0]), ) thumbnails[0].generate_target() @@ -663,7 +663,7 @@ class LaplacesRuleOfSuccession(Scene): fd_label.shift_onto_screen() self.play( - FadeInFrom(fd_label, UP), + FadeIn(fd_label, UP), DrawBorderThenFill(fd_rect), ShowCreation(underlines[10:]) ) @@ -695,7 +695,7 @@ class LaplacesRuleOfSuccession(Scene): review_label[2], lambda m, a: m.set_value(int(interpolate(10, 12, a))) ), - FadeInFrom(pretend_label, LEFT), + FadeIn(pretend_label, LEFT), old_review_label.scale, 0.5, old_review_label.set_opacity, 0.5, old_review_label.to_edge, LEFT, @@ -730,7 +730,7 @@ class LaplacesRuleOfSuccession(Scene): MoveToTarget(old_review_label), FadeIn(arrow), eq.next_to, arrow, RIGHT, - FadeOutAndShift( + FadeOut( VGroup( fake_data, underlines, @@ -915,7 +915,7 @@ class LaplacesRuleOfSuccession(Scene): self.play( FadeInFromDown(name), - FadeOutAndShift(title, UP), + FadeOut(title, UP), underline.match_width, name, ) self.wait() @@ -983,8 +983,8 @@ class WhatsTheModel(Scene): questions.scale(1.5) # Intro questions - self.play(FadeInFrom(questions[0])) - self.play(FadeInFrom(questions[1], UP)) + self.play(FadeIn(questions[0])) + self.play(FadeIn(questions[1], UP)) self.wait() questions[1].save_state() @@ -1056,12 +1056,12 @@ class WhatsTheModel(Scene): self.play( GrowFromCenter(brace), - FadeInFrom(success_rate, 0.5 * DOWN) + FadeIn(success_rate, 0.5 * DOWN) ) self.wait() self.play( TransformFromCopy(success_rate[0], s_sym), - FadeOutAndShift(success_rate, 0.1 * RIGHT, lag_ratio=0.1), + FadeOut(success_rate, 0.1 * RIGHT, lag_ratio=0.1), ) for x in range(2): self.play(*self.experience_animations(seller, buyer, arc=30 * DEGREES)) @@ -1075,9 +1075,9 @@ class WhatsTheModel(Scene): lil_q_marks.next_to(buyer, UP) self.play( - FadeOutAndShift(rhs, 0.5 * DOWN), - FadeInFrom(grey_box, 0.5 * UP), - FadeInFrom(lil_q_marks, DOWN), + FadeOut(rhs, 0.5 * DOWN), + FadeIn(grey_box, 0.5 * UP), + FadeIn(lil_q_marks, DOWN), buyer.change, "confused", grey_box, ) rhs.set_opacity(0) @@ -1345,15 +1345,15 @@ class IsSellerOne100(Scene): CountInFrom(decimals[0], 0), ) self.wait() - self.play(FadeInFrom(lt_p95, LEFT)) + self.play(FadeIn(lt_p95, LEFT)) self.play( GrowArrow(arrows[0]), - FadeInFrom(marks[0], DOWN) + FadeIn(marks[0], DOWN) ) self.wait() self.play( - FadeOutAndShift(lt_p95, 0.5 * RIGHT), - FadeInFrom(gte_p95, 0.5 * LEFT), + FadeOut(lt_p95, 0.5 * RIGHT), + FadeIn(gte_p95, 0.5 * LEFT), ) self.play( random_label.match_x, decimals[1], @@ -1365,7 +1365,7 @@ class IsSellerOne100(Scene): ) self.play( GrowArrow(arrows[1]), - FadeInFrom(marks[1], DOWN), + FadeIn(marks[1], DOWN), ) self.wait() self.play( @@ -1532,7 +1532,7 @@ class IsSellerOne100(Scene): run_time=3, lag_ratio=0.25, ), - FadeOutAndShift(self.review_group, DOWN), + FadeOut(self.review_group, DOWN), prob_label_group.set_height, 0.75, prob_label_group.to_corner, UL, ) @@ -1787,12 +1787,12 @@ class AskAboutUnknownProbabilities(Scene): processes.suspend_updating() self.play( LaggedStart( - FadeOutAndShift(unknown_title, UP), - FadeOutAndShift(prob_title, UP), + FadeOut(unknown_title, UP), + FadeOut(prob_title, UP), lag_ratio=0.2, ), - FadeOutAndShift(h_line, UP, lag_ratio=0.1), - FadeOutAndShift(processes, LEFT, lag_ratio=0.1), + FadeOut(h_line, UP, lag_ratio=0.1), + FadeOut(processes, LEFT, lag_ratio=0.1), FadeOut(prob_labels[1]), FadeOut(prob_labels[2]), v_line.rotate, 90 * DEGREES, @@ -1811,11 +1811,11 @@ class AskAboutUnknownProbabilities(Scene): self.play( GrowArrow(arrow), - FadeInFrom(question, UP), + FadeIn(question, UP), ) self.wait(2) self.play( - FadeOutAndShift(question, RIGHT), + FadeOut(question, RIGHT), Rotate(arrow, 90 * DEGREES), VFadeOut(arrow), ) @@ -1834,8 +1834,8 @@ class AskAboutUnknownProbabilities(Scene): randy.look_at(prob_half) self.play( - FadeOutAndShift(half, UP), - FadeInFrom(q_marks, DOWN), + FadeOut(half, UP), + FadeIn(q_marks, DOWN), ) self.play(FadeIn(randy)) self.play(Blink(randy)) @@ -2327,7 +2327,7 @@ class AskInverseQuestion(WhatsTheModel): bs_group.add(self.probability_label) self.play( - FadeInFrom(short_label, UP), + FadeIn(short_label, UP), bs_group.scale, 0.5, {"about_edge": DOWN}, ) self.play(ShowCreation(rect)) @@ -2723,7 +2723,7 @@ class ShowBinomialFormula(SimulationsOf50Reviews): rhs.match_y(eq) rhs.to_edge(RIGHT, buff=MED_SMALL_BUFF) self.play( - FadeInFrom(value, LEFT), + FadeIn(value, LEFT), FadeIn(eq2), equation.next_to, eq2, LEFT, ) @@ -2763,7 +2763,7 @@ class ShowBinomialFormula(SimulationsOf50Reviews): self.play( long_equation.next_to, self.slots, DOWN, MED_LARGE_BUFF, long_equation.to_edge, RIGHT, - FadeInFrom(bin_name, DOWN), + FadeIn(bin_name, DOWN), ) self.wait() self.play(ShowCreationThenDestruction(underline)) @@ -2807,14 +2807,14 @@ class ShowBinomialFormula(SimulationsOf50Reviews): posterior_label.next_to(right_arrow, RIGHT) self.play( - FadeInFrom(likelihood_label, UP), + FadeIn(likelihood_label, UP), bin_name.set_height, 0.4, bin_name.set_y, histogram.axes.c2p(0, .25)[1] ) self.wait() self.play( GrowArrow(right_arrow), - FadeInFrom(ra_label, 0.5 * LEFT), + FadeIn(ra_label, 0.5 * LEFT), ) anims = [] for i, j in enumerate([0, 3, 2, 1, 4]): @@ -2838,8 +2838,8 @@ class ShowBinomialFormula(SimulationsOf50Reviews): FadeOut(posterior_label), FadeOut(right_arrow), FadeOut(ra_label), - FadeOutAndShift(row, UP), - FadeOutAndShift(self.slots, UP), + FadeOut(row, UP), + FadeOut(self.slots, UP), histogram.scale, 0.7, histogram.to_edge, UP, arrow.scale, 0.5, @@ -3339,7 +3339,7 @@ class IllustrateBinomialSetupWithCoins(Scene): self.play( ShowIncreasingSubsets(coin_row, int_func=np.ceil), GrowFromPoint(brace, brace.get_left()), - FadeInFrom(brace_label, 3 * LEFT) + FadeIn(brace_label, 3 * LEFT) ) self.wait() self.play(FadeIn(prob_label, lag_ratio=0.1)) @@ -3510,7 +3510,7 @@ class LikelihoodGraphFor10of10(ShowBinomialFormula): self.play( FadeIn(rects), GrowFromCenter(brace), - FadeInFrom(simpler_formula, UP) + FadeIn(simpler_formula, UP) ) self.wait() @@ -3602,7 +3602,7 @@ class StateNeedForBayesRule(TeacherStudentsScene): ApplyMethod(student1.change, "pondering", plot), ApplyMethod(student2.change, "raise_left_hand", plot), ), - FadeInFrom(plot, DOWN), + FadeIn(plot, DOWN), run_time=1.5 ) self.play(*map(ShowCreation, v_lines)) @@ -3626,8 +3626,8 @@ class StateNeedForBayesRule(TeacherStudentsScene): self.teacher_says( "But first...", added_anims=[ - FadeOutAndShift(plot, LEFT), - FadeOutAndShift(v_lines, LEFT), + FadeOut(plot, LEFT), + FadeOut(v_lines, LEFT), self.get_student_changes( "erm", "erm", "erm", look_at_arg=self.teacher.eyes, diff --git a/from_3b1b/active/bayes/beta2.py b/from_3b1b/active/bayes/beta2.py index d7cee960..8dbf8309 100644 --- a/from_3b1b/active/bayes/beta2.py +++ b/from_3b1b/active/bayes/beta2.py @@ -89,7 +89,7 @@ class WeightedCoin(Scene): self.wait() self.play( - FadeOutAndShift( + FadeOut( old_grid, 0.1 * DOWN, lag_ratio=0.01, @@ -118,7 +118,7 @@ class WeightedCoin(Scene): self.remove(rhs) self.play( FadeOut(old_grid, lag_ratio=0.1), - FadeOutAndShift(long_rhs, 0.1 * RIGHT, lag_ratio=0.1), + FadeOut(long_rhs, 0.1 * RIGHT, lag_ratio=0.1), Write(box), ) p_label.add(box) @@ -437,7 +437,7 @@ class LabelH(Scene): self.play(ShowCreationThenFadeAround(p_label)) self.play( GrowFromCenter(brace), - FadeInFrom(h, UP), + FadeIn(h, UP), ) self.wait() @@ -498,7 +498,7 @@ class TryAssigningProbabilitiesToSpecificValues(Scene): # Animations self.play(FadeInFromDown(labels[0])) - self.play(FadeInFrom(q_marks[0], LEFT)) + self.play(FadeIn(q_marks[0], LEFT)) self.wait() self.play(*[ TransformFromCopy(m1, m2) @@ -590,8 +590,8 @@ class TryAssigningProbabilitiesToSpecificValues(Scene): ) self.wait() self.play( - FadeInFrom(zero, DOWN), - FadeOutAndShift(infty, UP), + FadeIn(zero, DOWN), + FadeOut(infty, UP), morty.change, "sad", zero ) self.play(Blink(morty)) @@ -744,14 +744,14 @@ class ShowLimitToPdf(Scene): ineq_label.next_to(brace, UP) self.play( - FadeInFrom(eq_label, 0.2 * DOWN), + FadeIn(eq_label, 0.2 * DOWN), GrowArrow(arrows[0]), ) self.wait() vect = eq_label.get_center() - ineq_label.get_center() self.play( - FadeOutAndShift(eq_label, -vect), - FadeInFrom(ineq_label, vect), + FadeOut(eq_label, -vect), + FadeIn(ineq_label, vect), TransformFromCopy(*arrows), GrowFromPoint(brace, brace.get_left()), ) @@ -825,12 +825,12 @@ class ShowLimitToPdf(Scene): self.add(height_word) self.play( ShowCreation(height_cross), - FadeOutAndShift(axis_prob_label, LEFT) + FadeOut(axis_prob_label, LEFT) ) self.wait() self.play( - FadeOutAndShift(height_word, UP), - FadeOutAndShift(height_cross, UP), + FadeOut(height_word, UP), + FadeOut(height_cross, UP), FadeInFromDown(area_word), ) self.play( @@ -913,8 +913,8 @@ class ShowLimitToPdf(Scene): lag_ratio=step_size, ), MoveToTarget(arrow), - FadeOutAndShift(last_ineq_label, vect), - FadeInFrom(new_ineq_label, -vect), + FadeOut(last_ineq_label, vect), + FadeIn(new_ineq_label, -vect), run_time=2, ) last_ineq_label = new_ineq_label @@ -1025,9 +1025,9 @@ class ShowLimitToPdf(Scene): FadeOut(limit_words), FadeOut(graph), FadeIn(bars), - FadeOutAndShift(area_word, UP), - FadeInFrom(height_word, DOWN), - FadeInFrom(new_y_numbers, 0.5 * RIGHT), + FadeOut(area_word, UP), + FadeIn(height_word, DOWN), + FadeIn(new_y_numbers, 0.5 * RIGHT), ) # Height refine @@ -1061,13 +1061,13 @@ class ShowLimitToPdf(Scene): # Back to area self.play( FadeIn(graph), - FadeInFrom(area_word, 0.5 * DOWN), - FadeOutAndShift(height_word, 0.5 * UP), + FadeIn(area_word, 0.5 * DOWN), + FadeOut(height_word, 0.5 * UP), FadeOut(new_y_numbers, lag_ratio=0.2), ) self.play( arrow.scale, 0, {"about_edge": DOWN}, - FadeOutAndShift(to_zero_words, DOWN), + FadeOut(to_zero_words, DOWN), LaggedStartMap(FadeOutAndShiftDown, all_ineq_labels), LaggedStartMap(FadeOutAndShiftDown, rhss), ) @@ -1152,7 +1152,7 @@ class ShowLimitToPdf(Scene): total_label.set_height(0.5) total_label.next_to(bars, UP, LARGE_BUFF) - self.play(FadeInFrom(total_label, DOWN)) + self.play(FadeIn(total_label, DOWN)) bars.save_state() self.play( bars.arrange, RIGHT, {"aligned_edge": DOWN, "buff": SMALL_BUFF}, @@ -1256,7 +1256,7 @@ class ShowLimitToPdf(Scene): rhs.next_to(p_label, RIGHT) self.play( - FadeInFrom(p_label, 2 * DOWN), + FadeIn(p_label, 2 * DOWN), *map(ShowCreation, v_lines), ) self.wait() @@ -1740,7 +1740,7 @@ class SumToIntegral(Scene): self.add(i_sym) self.wait() self.play( - FadeOutAndShift(arrow, UP), + FadeOut(arrow, UP), syms.next_to, h_line, DOWN, {"buff": MED_LARGE_BUFF}, syms.match_x, syms, ) @@ -1801,9 +1801,9 @@ class SumToIntegral(Scene): # Focus on integral self.play( Uncreate(VGroup(v_line, h_line)), - FadeOutAndShift(titles, UP), - FadeOutAndShift(morty, RIGHT), - FadeOutAndShift(s_sym, LEFT), + FadeOut(titles, UP), + FadeOut(morty, RIGHT), + FadeOut(s_sym, LEFT), i_sym.center, i_sym.to_edge, LEFT ) @@ -1926,7 +1926,7 @@ class MeasureTheoryLeadsTo(Scene): arrow.set_stroke(width=7) arrow.rotate(45 * DEGREES, about_point=arrow.get_start()) self.play( - FadeInFrom(words, DOWN), + FadeIn(words, DOWN), GrowArrow(arrow), UpdateFromAlphaFunc(arrow, lambda m, a: m.set_opacity(a)), ) @@ -1985,9 +1985,9 @@ class PossibleYetProbabilityZero(Scene): self.play(Write(poss, run_time=0.5)) self.wait() - self.play(FadeInFrom(prob, UP)) + self.play(FadeIn(prob, UP)) self.wait() - self.play(FadeInFrom(total, UP)) + self.play(FadeIn(total, UP)) self.wait() @@ -2009,7 +2009,7 @@ class TiePossibleToDensity(Scene): self.add(poss) self.play( - FadeInFrom(prob, LEFT), + FadeIn(prob, LEFT), Write(implies, run_time=1) ) self.wait() diff --git a/from_3b1b/active/bayes/beta3.py b/from_3b1b/active/bayes/beta3.py index 86ccbe13..c094ff19 100644 --- a/from_3b1b/active/bayes/beta3.py +++ b/from_3b1b/active/bayes/beta3.py @@ -50,7 +50,7 @@ class RemindOfWeightedCoin(Scene): self.play( GrowFromCenter(brace), - FadeInFrom(h_label, UP), + FadeIn(h_label, UP), grid.scale, 0.8, {"about_edge": DOWN}, ) self.wait() @@ -361,7 +361,7 @@ class BayesianFrequentistDivide(Scene): label.save_state() label.set_y(0) self.play( - FadeInFrom(label, -normalize(label.get_center())), + FadeIn(label, -normalize(label.get_center())), ) self.wait() self.play( @@ -1127,8 +1127,8 @@ class VisualizeBayesRule(Scene): uniform_name.set_y(bars.get_top()[1] + MED_SMALL_BUFF, DOWN) self.play( prior_name[0].next_to, uniform_name, RIGHT, MED_SMALL_BUFF, DOWN, - FadeOutAndShift(prior_name[1], RIGHT), - FadeInFrom(uniform_name, LEFT) + FadeOut(prior_name[1], RIGHT), + FadeIn(uniform_name, LEFT) ) self.wait() @@ -1203,7 +1203,7 @@ class VisualizeBayesRule(Scene): post_bars, ), GrowFromCenter(brace), - FadeInFrom(post_word, 0.25 * UP) + FadeIn(post_word, 0.25 * UP) ) self.wait() self.play( @@ -1725,11 +1725,11 @@ class TalkThroughCoinExample(ShowBayesianUpdating): last_row = VMobject() for row in rows: self.play( - FadeOutAndShift(last_row, DOWN), + FadeOut(last_row, DOWN), FadeIn(row, lag_ratio=0.1) ) last_row = row - self.play(FadeOutAndShift(last_row, DOWN)) + self.play(FadeOut(last_row, DOWN)) # Uniform pdf region = get_beta_graph(axes, 0, 0) @@ -1758,7 +1758,7 @@ class TalkThroughCoinExample(ShowBayesianUpdating): data_label.shift(0.5 * RIGHT) self.play( - FadeInFrom(coin, DOWN), + FadeIn(coin, DOWN), GrowArrow(arrow), Write(data_label, run_time=1) ) @@ -1844,7 +1844,7 @@ class TalkThroughCoinExample(ShowBayesianUpdating): sub_region.set_color, BLUE, graph.stretch, 2, 1, {"about_edge": DOWN}, FadeInFromDown(two), - FadeOutAndShift(one, UP), + FadeOut(one, UP), ) region = sub_region func_label = VGroup(func_label[0], two, times_x) @@ -1858,8 +1858,8 @@ class TalkThroughCoinExample(ShowBayesianUpdating): const.move_to(two, DR) const.shift(0.07 * RIGHT) self.play( - FadeOutAndShift(two, UP), - FadeInFrom(const, DOWN) + FadeOut(two, UP), + FadeIn(const, DOWN) ) self.remove(func_label) func_label = VGroup(func_label[0], const, times_x) @@ -1902,7 +1902,7 @@ class TalkThroughCoinExample(ShowBayesianUpdating): self.play( ShowCreation(likelihood_rect), - FadeInFrom(l_1mx, 0.5 * DOWN), + FadeIn(l_1mx, 0.5 * DOWN), ) self.wait() self.play(ShowCreationThenFadeOut(Underline(p_label))) @@ -1910,7 +1910,7 @@ class TalkThroughCoinExample(ShowBayesianUpdating): self.wait() self.play( TransformFromCopy(l_1mx, eq_1mx), - FadeInFrom(dot, RIGHT), + FadeIn(dot, RIGHT), func_label.next_to, dot, LEFT, 0.2, ) @@ -1955,8 +1955,8 @@ class TalkThroughCoinExample(ShowBayesianUpdating): VGroup(exp1, exp2).shift(shift_vect) self.play( - FadeInFrom(exp1, DOWN), - FadeInFrom(exp2, DOWN), + FadeIn(exp1, DOWN), + FadeIn(exp2, DOWN), VGroup(func_label, dot, eq_1mx).shift, shift_vect, bayes.scale, 0.5, bayes.next_to, p_label, DOWN, LARGE_BUFF, {"aligned_edge": RIGHT}, @@ -1967,7 +1967,7 @@ class TalkThroughCoinExample(ShowBayesianUpdating): self.play( arrow.next_to, coin, DOWN, SMALL_BUFF, MaintainPositionRelativeTo(data_label, arrow), - FadeInFrom(coin, DOWN), + FadeIn(coin, DOWN), ) if is_heads: nh += 1 @@ -1989,8 +1989,8 @@ class TalkThroughCoinExample(ShowBayesianUpdating): FadeOut(region), FadeIn(new_graph), FadeIn(new_region), - FadeOutAndShift(old_exp, MED_SMALL_BUFF * UP), - FadeInFrom(new_exp, MED_SMALL_BUFF * DOWN), + FadeOut(old_exp, MED_SMALL_BUFF * UP), + FadeIn(new_exp, MED_SMALL_BUFF * DOWN), ) graph = new_graph region = new_region @@ -2015,7 +2015,7 @@ class PDefectEqualsQmark(Scene): "\\text{Defect}": RED, } ) - self.play(FadeInFrom(label, DOWN)) + self.play(FadeIn(label, DOWN)) self.wait() @@ -2083,7 +2083,7 @@ class UpdateOnceWithBinomial(TalkThroughCoinExample): self.wait() self.play( GrowFromCenter(brace), - FadeInFrom(all_data_label, 0.2 * UP), + FadeIn(all_data_label, 0.2 * UP), ) self.wait() @@ -2145,6 +2145,6 @@ class UpdateOnceWithBinomial(TalkThroughCoinExample): ) self.play( Write(eq), - FadeInFrom(rhs, UP) + FadeIn(rhs, UP) ) self.wait() diff --git a/from_3b1b/active/bayes/footnote.py b/from_3b1b/active/bayes/footnote.py index 82449f2a..60223d81 100644 --- a/from_3b1b/active/bayes/footnote.py +++ b/from_3b1b/active/bayes/footnote.py @@ -116,8 +116,8 @@ class ThisIsAFootnote(TeacherStudentsScene): self.play( MoveToTarget(full_equation), - FadeOutAndShift(image_group, 2 * LEFT), - FadeOutAndShift(asterisk, 2 * LEFT), + FadeOut(image_group, 2 * LEFT), + FadeOut(asterisk, 2 * LEFT), self.teacher.look_at, 4 * UP, self.get_student_changes( "thinking", "erm", "confused", @@ -933,7 +933,7 @@ class TemptingFormula(ShowTwoPerspectives, RandomnessVsProportions): ) self.play( FadeIn(real_rect), - FadeInFrom(check, RIGHT), + FadeIn(check, RIGHT), ) self.wait() @@ -1070,7 +1070,7 @@ class DiseaseBayes(Scene): ) self.play( GrowArrow(positive_arrow), - FadeInFrom(positive_words, UP), + FadeIn(positive_words, UP), ) self.wait(2) self.play( diff --git a/from_3b1b/active/bayes/part1.py b/from_3b1b/active/bayes/part1.py index 57579dc3..4a62b58b 100644 --- a/from_3b1b/active/bayes/part1.py +++ b/from_3b1b/active/bayes/part1.py @@ -471,9 +471,9 @@ class IntroduceFormula(Scene): # self.add(get_submobject_index_labels(formula)) # return self.play( - FadeInFrom(hyp_label, DOWN), + FadeIn(hyp_label, DOWN), GrowArrow(hyp_arrow), - FadeInFrom(evid_label, UP), + FadeIn(evid_label, UP), GrowArrow(evid_arrow), ) self.wait() @@ -560,7 +560,7 @@ class StateGoal(PiCreatureScene, Scene): self.add(line, now_label) self.add(you) self.play( - FadeInFrom(you_label, LEFT), + FadeIn(you_label, LEFT), GrowArrow(you_arrow), you.change, "pondering", ) @@ -622,7 +622,7 @@ class StateGoal(PiCreatureScene, Scene): )), ) self.play( - FadeInFrom(gold, LEFT), + FadeIn(gold, LEFT), you.change, "erm", gold, ) self.play(Blink(you)) @@ -643,11 +643,11 @@ class StateGoal(PiCreatureScene, Scene): words.next_to(ship, RIGHT) self.play( - FadeInFrom(words[0], LEFT), + FadeIn(words[0], LEFT), you.change, "tease", words, FadeOut(icons[:2]), ) - self.play(FadeInFrom(words[1], UP)) + self.play(FadeIn(words[1], UP)) self.wait() self.add(ship, gold) @@ -1053,18 +1053,18 @@ class IntroduceKahnemanAndTversky(DescriptionOfSteve, MovingCameraScene): books.to_edge(RIGHT, buff=MED_LARGE_BUFF) self.play( - FadeInFrom(danny, DOWN), - FadeInFrom(danny.name, LEFT), + FadeIn(danny, DOWN), + FadeIn(danny.name, LEFT), ) self.play( - FadeInFrom(amos, UP), - FadeInFrom(amos.name, LEFT), + FadeIn(amos, UP), + FadeIn(amos.name, LEFT), ) self.wait() self.play(FadeInFromLarge(prize)) self.wait() for book in books: - self.play(FadeInFrom(book, LEFT)) + self.play(FadeIn(book, LEFT)) self.wait() # Show them thinking @@ -1124,7 +1124,7 @@ class IntroduceKahnemanAndTversky(DescriptionOfSteve, MovingCameraScene): ) self.play( DrawBorderThenFill(bubble), - FadeInFrom( + FadeIn( randy, UR, rate_func=squish_rate_func(smooth, 0.5, 1), run_time=2, @@ -1263,8 +1263,8 @@ class IntroduceKahnemanAndTversky(DescriptionOfSteve, MovingCameraScene): description, lambda m: (m, LEFT) ), - FadeOutAndShift(randy, LEFT), - FadeOutAndShift(bar, LEFT), + FadeOut(randy, LEFT), + FadeOut(bar, LEFT), ) @@ -1303,7 +1303,7 @@ class CorrectViewOfFarmersAndLibrarians(Scene): word.next_to(arrow, vect) self.play( GrowArrow(arrow), - FadeInFrom(word, UP), + FadeIn(word, UP), ) self.wait() @@ -1472,7 +1472,7 @@ class SpoilerAlert(Scene): self.add(sa_words) self.wait() - self.play(FadeInFrom(formula_group, UP)) + self.play(FadeIn(formula_group, UP)) self.wait() @@ -1813,7 +1813,7 @@ class ReasonByRepresentativeSample(CorrectViewOfFarmersAndLibrarians): VGroup(equation_rect, equation).shift, prior_rect.get_height() * DOWN, FadeIn(prior_rect), FadeIn(prior_equation), - FadeInFrom(prior_label, RIGHT), + FadeIn(prior_label, RIGHT), GrowArrow(prior_arrow), ) self.wait() @@ -1845,7 +1845,7 @@ class NewEvidenceUpdatesPriorBeliefs(DescriptionOfSteve): self.add(evid) self.play( GrowArrow(arrow), - FadeInFrom(librarian, LEFT) + FadeIn(librarian, LEFT) ) self.play(ShowCreation(cross)) self.wait() @@ -2030,7 +2030,7 @@ class HeartOfBayesTheorem(Scene): arrow.set_stroke(width=5) self.play( - FadeInFrom(words, DOWN), + FadeIn(words, DOWN), GrowArrow(arrow), FadeOut(prob), title.to_edge, LEFT @@ -2140,9 +2140,9 @@ class WhenDoesBayesApply(DescriptionOfSteve): self.play(FadeInFromDown(all_words[0])) self.play( LaggedStart( - FadeInFrom(hypothesis_icon[0], DOWN), + FadeIn(hypothesis_icon[0], DOWN), Write(hypothesis_icon[1]), - FadeInFrom(hypothesis_icon[2], UP), + FadeIn(hypothesis_icon[2], UP), run_time=1, ) ) @@ -2286,7 +2286,7 @@ class CreateFormulaFromDiagram(Scene): ) self.wait() self.play( - FadeInFrom(prior_word, RIGHT), + FadeIn(prior_word, RIGHT), GrowArrow(prior_arrow) ) self.wait() @@ -2339,8 +2339,8 @@ class CreateFormulaFromDiagram(Scene): diagram.hne_rect.set_opacity, 1, MoveToTarget(hne_people), GrowFromCenter(diagram.he_brace), - FadeInFrom(like_label, RIGHT), - FadeInFrom(like_example, RIGHT), + FadeIn(like_label, RIGHT), + FadeIn(like_example, RIGHT), ) self.wait() self.play( @@ -2361,7 +2361,7 @@ class CreateFormulaFromDiagram(Scene): self.play( diagram.people[10:].set_opacity, 0.2, diagram.nh_rect.set_opacity, 0.2, - FadeInFrom(limit_word, DOWN), + FadeIn(limit_word, DOWN), GrowArrow(limit_arrow), rate_func=there_and_back_with_pause, run_time=6, @@ -2401,8 +2401,8 @@ class CreateFormulaFromDiagram(Scene): Restore(diagram.nhe_rect), GrowFromCenter(diagram.nhe_brace), MoveToTarget(nhne_people), - FadeInFrom(anti_label, LEFT), - FadeInFrom(anti_example, LEFT), + FadeIn(anti_label, LEFT), + FadeIn(anti_example, LEFT), ) diagram.nhne_rect.set_opacity(1) self.wait() @@ -2739,7 +2739,7 @@ class CreateFormulaFromDiagram(Scene): # Name posterior self.play( GrowArrow(post_arrow), - FadeInFrom(post_word, RIGHT), + FadeIn(post_word, RIGHT), FadeOut(formula_rect), FadeOut(bayes_words), ) @@ -3224,7 +3224,7 @@ class UsesOfBayesTheorem(Scene): # Add people for person in [scientist, programmer]: - self.play(FadeInFrom(person, DOWN)) + self.play(FadeIn(person, DOWN)) rhs_copy = rhs.copy() rhs_copy.add_to_back( SurroundingRectangle( @@ -3286,7 +3286,7 @@ class AskAboutWhenProbabilityIsIntuitive(TeacherStudentsScene): self.play( self.teacher.change, "raise_right_hand", - FadeInFrom(words, DOWN), + FadeIn(words, DOWN), self.get_student_changes("erm", "pondering", "confused") ) self.wait(2) @@ -3328,8 +3328,8 @@ class IntroduceLinda(DescriptionOfSteve): steve_words.next_to(steve, UP, LARGE_BUFF) self.play(LaggedStart( - FadeInFrom(steve, LEFT), - FadeInFrom(steve_words, LEFT), + FadeIn(steve, LEFT), + FadeIn(steve_words, LEFT), )) self.wait() @@ -3342,9 +3342,9 @@ class IntroduceLinda(DescriptionOfSteve): self.play( LaggedStart( - FadeOutAndShift(steve_words, 2 * RIGHT), - FadeOutAndShift(steve, 2 * RIGHT), - FadeInFrom(linda, 2 * LEFT), + FadeOut(steve_words, 2 * RIGHT), + FadeOut(steve, 2 * RIGHT), + FadeIn(linda, 2 * LEFT), lag_ratio=0.15, ) ) @@ -3404,7 +3404,7 @@ class IntroduceLinda(DescriptionOfSteve): MoveToTarget(options), MoveToTarget(rect), VFadeIn(rect), - FadeInFrom(result, LEFT), + FadeIn(result, LEFT), GrowArrow(arrow) ) self.wait() @@ -3642,7 +3642,7 @@ class AlternatePhrasings(PiCreatureScene): stereotypes.move_to(people) self.play( - FadeInFrom(phrases[0], UP), + FadeIn(phrases[0], UP), randy.change, "pondering", ) self.play( @@ -3652,7 +3652,7 @@ class AlternatePhrasings(PiCreatureScene): ) self.wait() self.play( - FadeInFrom(phrases[1], UP), + FadeIn(phrases[1], UP), randy.change, "confused", phrases[1], FadeOut(people), ApplyFunction(push_down, phrases[0]), @@ -3661,7 +3661,7 @@ class AlternatePhrasings(PiCreatureScene): self.play(bar.p_tracker.set_value, 0.4) bar.clear_updaters() self.play( - FadeInFrom(phrases[2], UP), + FadeIn(phrases[2], UP), ApplyFunction(push_down, phrases[:2]), FadeOut(bar.percentages), randy.change, "guilty", @@ -3669,7 +3669,7 @@ class AlternatePhrasings(PiCreatureScene): self.wait() bar.remove(bar.percentages) self.play( - FadeInFrom(phrases[3], UP), + FadeIn(phrases[3], UP), ApplyFunction(push_down, phrases[:3]), FadeOut(bar), FadeIn(stereotypes), @@ -3861,13 +3861,13 @@ class RandomnessVsProportions(Scene): self.play(FadeInFromDown(prob_word)) self.play( - FadeInFrom(unc_word, LEFT), + FadeIn(unc_word, LEFT), Write(arrows[1]), ) self.add(random_dice) self.wait(9) self.play( - FadeInFrom(prop_word, RIGHT), + FadeIn(prop_word, RIGHT), Write(arrows[0]) ) self.play(FadeIn(diagram)) @@ -4089,7 +4089,7 @@ class BayesTheoremOnProportions(Scene): ), FadeIn(denom_rect), ShowCreation(E_arrow), - FadeInFrom(E_words, UP), + FadeIn(E_words, UP), low_diagram_rects.set_stroke, TEAL, 3, ) self.wait() @@ -4099,8 +4099,8 @@ class BayesTheoremOnProportions(Scene): FadeOut(denom_rect), FadeIn(numer_rect), ShowCreation(H_arrow), - FadeInFrom(H_words, DOWN), - FadeOutAndShift(title, UP), + FadeIn(H_words, DOWN), + FadeOut(title, UP), low_diagram_rects.set_stroke, WHITE, 1, top_diagram_rects.set_stroke, YELLOW, 3, ) @@ -4253,7 +4253,7 @@ class QuestionSteveConclusion(HeartOfBayesTheorem, DescriptionOfSteve): self.play(randy.change, "sassy") self.wait() self.play( - FadeInFrom(people, RIGHT, lag_ratio=0.01), + FadeIn(people, RIGHT, lag_ratio=0.01), randy.change, "raise_left_hand", people, ) self.wait() @@ -4287,7 +4287,7 @@ class QuestionSteveConclusion(HeartOfBayesTheorem, DescriptionOfSteve): MoveToTarget(steve), randy.shift, 2 * LEFT, randy.change, 'erm', kt.target, - FadeOutAndShift(people, 2 * LEFT), + FadeOut(people, 2 * LEFT), ) self.remove(people, cross) self.play(Blink(randy)) @@ -4453,13 +4453,13 @@ class ReprogrammingThought(Scene): brain_outline.set_fill(opacity=0) brain_outline.set_stroke(TEAL, 4) - self.play(FadeInFrom(brain, RIGHT)) + self.play(FadeIn(brain, RIGHT)) self.play( GrowFromCenter(arrow), LaggedStartMap(FadeInFromDown, q_marks[0]), run_time=1 ) - self.play(FadeInFrom(formula, LEFT)) + self.play(FadeIn(formula, LEFT)) self.wait() kw = {"run_time": 1, "lag_ratio": 0.3} @@ -4586,7 +4586,7 @@ class ShowProgrammer(Scene): programmer.set_height(3) programmer.to_corner(DL) - self.play(FadeInFrom(programmer, DOWN)) + self.play(FadeIn(programmer, DOWN)) self.wait() diff --git a/from_3b1b/active/diffyq/part1/pendulum.py b/from_3b1b/active/diffyq/part1/pendulum.py index 7f76d8bc..8efee88e 100644 --- a/from_3b1b/active/diffyq/part1/pendulum.py +++ b/from_3b1b/active/diffyq/part1/pendulum.py @@ -508,7 +508,7 @@ class IntroducePendulum(PiCreatureScene, MovingCameraScene): ) formula.set_stroke(width=0, background=True) - self.play(FadeInFrom(hm_word, DOWN)) + self.play(FadeIn(hm_word, DOWN)) self.wait() self.play( Write(formula), @@ -970,12 +970,12 @@ class WherePendulumLeads(PiCreatureScene): self.wait(5) self.play( Animation(VectorizedPoint(pendulum.get_top())), - FadeOutAndShift(q_marks, UP, lag_ratio=0.3), + FadeOut(q_marks, UP, lag_ratio=0.3), ) self.add(spring_system) self.play( FadeOut(spring_rect), - FadeInFrom(linear_formula, UP), + FadeIn(linear_formula, UP), FadeInFromDown(l_title), ) self.play(FadeInFromDown(c_title)) @@ -1084,7 +1084,7 @@ class AnalyzePendulumForce(MovingCameraScene): path_arc=angle ), ) - self.play(FadeInFrom(x_sym, UP)) + self.play(FadeIn(x_sym, UP)) self.wait() # Show equation @@ -1135,7 +1135,7 @@ class AnalyzePendulumForce(MovingCameraScene): self.play( GrowArrow(g_vect), - FadeInFrom(g_word, UP, lag_ratio=0.1), + FadeIn(g_word, UP, lag_ratio=0.1), ) self.wait() @@ -1300,7 +1300,7 @@ class AnalyzePendulumForce(MovingCameraScene): )) self.play( - FadeInFrom(theta_decimal, UP), + FadeIn(theta_decimal, UP), FadeOut(self.x_eq), FadeOut(self.line_L), ) @@ -1831,7 +1831,7 @@ class BuildUpEquation(Scene): word.next_to(arrow, DOWN) self.play( - FadeInFrom(word, UP), + FadeIn(word, UP), GrowArrow(arrow) ) self.play( diff --git a/from_3b1b/active/diffyq/part1/phase_space.py b/from_3b1b/active/diffyq/part1/phase_space.py index ff848604..2e14f7e7 100644 --- a/from_3b1b/active/diffyq/part1/phase_space.py +++ b/from_3b1b/active/diffyq/part1/phase_space.py @@ -561,8 +561,8 @@ class IntroduceVectorField(VisualizeStates): ode_word.next_to(ode, DOWN) self.play( - FadeInFrom(ode, 0.5 * DOWN), - FadeInFrom(ode_word, 0.5 * UP), + FadeIn(ode, 0.5 * DOWN), + FadeIn(ode_word, 0.5 * UP), ) self.ode = ode @@ -663,7 +663,7 @@ class IntroduceVectorField(VisualizeStates): self.play(Write(ddt)) self.play( plane.y_axis.numbers.fade, 1, - FadeInFrom(equals, LEFT), + FadeIn(equals, LEFT), TransformFromCopy(vect_sym, d_vect_sym) ) self.wait() @@ -775,7 +775,7 @@ class IntroduceVectorField(VisualizeStates): ) self.wait() self.play( - FadeInFrom(expanded_derivative, LEFT), + FadeIn(expanded_derivative, LEFT), FadeIn(equals2), equation.next_to, equals2, LEFT, SMALL_BUFF, MaintainPositionRelativeTo(rect, equation), @@ -1899,7 +1899,7 @@ class SetupToTakingManyTinySteps(TakeManyTinySteps): self.add(vector, dot) self.play( ShowCreation(vector), - FadeInFrom(v_label, RIGHT), + FadeIn(v_label, RIGHT), ) self.play(FadeInFromDown(dt_label)) self.wait() diff --git a/from_3b1b/active/diffyq/part1/pi_scenes.py b/from_3b1b/active/diffyq/part1/pi_scenes.py index 8b1fde44..3bd07780 100644 --- a/from_3b1b/active/diffyq/part1/pi_scenes.py +++ b/from_3b1b/active/diffyq/part1/pi_scenes.py @@ -83,7 +83,7 @@ class FormulasAreLies(PiCreatureScene): ) theta_eq.add(*theta_eq.sqrt_part) self.play( - FadeInFrom(theta0_words, LEFT), + FadeIn(theta0_words, LEFT), GrowArrow(arrow), ) self.wait() @@ -446,7 +446,7 @@ class HungerForExactness(TeacherStudentsScene): modes = ["erm", "sad", "sad", "horrified"] for part, mode in zip(solution, modes): self.play( - FadeInFrom(part, UP), + FadeIn(part, UP), self.get_student_changes( *3 * [mode], look_at_arg=part, @@ -459,7 +459,7 @@ class HungerForExactness(TeacherStudentsScene): self.look_at(solution) self.wait(5) self.play( - FadeOutAndShift(solution, 2 * LEFT), + FadeOut(solution, 2 * LEFT), Restore(ode), self.get_student_changes( "sick", "angry", "tired", diff --git a/from_3b1b/active/diffyq/part1/staging.py b/from_3b1b/active/diffyq/part1/staging.py index 7d5e2173..cca425ca 100644 --- a/from_3b1b/active/diffyq/part1/staging.py +++ b/from_3b1b/active/diffyq/part1/staging.py @@ -79,7 +79,7 @@ class AirResistanceBrace(Scene): brace = Brace(Line(ORIGIN, RIGHT), DOWN) word = TextMobject("Air resistance") word.next_to(brace, DOWN) - self.play(GrowFromCenter(brace), FadeInFrom(word, UP)) + self.play(GrowFromCenter(brace), FadeIn(word, UP)) self.wait() @@ -197,7 +197,7 @@ class TourOfDifferentialEquations(MovingCameraScene): for word1, word2 in zip(words, words[1:]): self.play( FadeInFromDown(word2), - FadeOutAndShift(word1, UP), + FadeOut(word1, UP), ) self.wait() self.play( @@ -360,12 +360,12 @@ class ShowGravityAcceleration(Scene): self.add(num) self.wait(0.75) self.play( - FadeInFrom(ms, 0.25 * DOWN, run_time=0.5) + FadeIn(ms, 0.25 * DOWN, run_time=0.5) ) self.wait(0.25) self.play(LaggedStart( GrowFromPoint(per, per.get_left()), - FadeInFrom(s, 0.5 * UP), + FadeIn(s, 0.5 * UP), lag_ratio=0.7, run_time=0.75 )) @@ -534,7 +534,7 @@ class ShowGravityAcceleration(Scene): self.play( FadeOut(self.title), GrowFromCenter(brace), - FadeInFrom(g, UP), + FadeIn(g, UP), ) self.wait() @@ -909,8 +909,8 @@ class SimpleProjectileEquation(ShowGravityAcceleration): y_dot_equation.to_corner(UR) self.play( - FadeInFrom(tex_question, DOWN), - FadeInFrom(question, UP) + FadeIn(tex_question, DOWN), + FadeIn(question, UP) ) self.wait() self.add(v_graph, question) @@ -1001,7 +1001,7 @@ class SimpleProjectileEquation(ShowGravityAcceleration): ) self.play( - FadeInFrom(tex_question, DOWN), + FadeIn(tex_question, DOWN), ) self.wait() self.add(graph, tex_question) @@ -1117,19 +1117,19 @@ class UniversalGravityLawSymbols(Scene): self.play( ShowCreationThenFadeOut(rects[0]), GrowFromCenter(braces[0]), - FadeInFrom(words[0], UP) + FadeIn(words[0], UP) ) self.wait() self.play( ShowCreationThenFadeOut(rects[1]), GrowFromCenter(braces[1]), - FadeInFrom(words[1], UP) + FadeIn(words[1], UP) ) self.wait() self.play( ShowCreationThenFadeOut(rects[2]), TransformFromCopy(*braces[1:3]), - FadeInFrom(words[2], UP), + FadeIn(words[2], UP), ) self.wait() @@ -1223,18 +1223,18 @@ class ExampleTypicalODE(TeacherStudentsScene): examples.to_edge(UP) self.play( - FadeInFrom(examples[0], UP), + FadeIn(examples[0], UP), self.teacher.change, "raise_right_hand", ) self.play( - FadeInFrom(examples[1], UP), + FadeIn(examples[1], UP), self.get_student_changes( *3 * ["pondering"], look_at_arg=examples, ), ) self.play( - FadeInFrom(examples[2], UP) + FadeIn(examples[2], UP) ) self.wait(5) @@ -1481,14 +1481,14 @@ class DefineODE(Scene): self.play( ShowCreation(v_line), FadeInFromPoint(dot, v_line.get_start()), - FadeInFrom(theta, DOWN), - FadeInFrom(theta.word, DOWN), + FadeIn(theta, DOWN), + FadeIn(theta.word, DOWN), ) self.add(slope_line, dot) self.play( ShowCreation(slope_line), - FadeInFrom(d_theta, LEFT), - FadeInFrom(d_theta.word, LEFT), + FadeIn(d_theta, LEFT), + FadeIn(d_theta.word, LEFT), ) a_tracker = ValueTracker(0) @@ -1504,8 +1504,8 @@ class DefineODE(Scene): self.add(curve, dot) self.play( ShowCreation(curve), - FadeInFrom(dd_theta, LEFT), - FadeInFrom(dd_theta.word, LEFT), + FadeIn(dd_theta, LEFT), + FadeIn(dd_theta.word, LEFT), ) self.add(changing_slope) self.play( @@ -1554,7 +1554,7 @@ class DefineODE(Scene): ) self.play( MoveToTarget(de_word), - FadeInFrom(ordinary, RIGHT), + FadeIn(ordinary, RIGHT), GrowFromCenter(ordinary_underline) ) self.play(FadeOut(ordinary_underline)) @@ -1746,7 +1746,7 @@ class SecondOrderEquationExample(DefineODE): self.add(de_word, equation) self.play( MoveToTarget(de_word), - FadeInFrom(so_word, RIGHT), + FadeIn(so_word, RIGHT), GrowFromCenter(so_line), ) self.play(ReplacementTransform(so_line, dd_x_rect)) @@ -1851,14 +1851,14 @@ class SecondOrderEquationExample(DefineODE): self.play( ShowCreation(v_line), FadeInFromPoint(dot, v_line.get_start()), - FadeInFrom(x, DOWN), - FadeInFrom(x.word, DOWN), + FadeIn(x, DOWN), + FadeIn(x.word, DOWN), ) self.add(slope_line, dot) self.play( ShowCreation(slope_line), - FadeInFrom(d_x, LEFT), - FadeInFrom(d_x.word, LEFT), + FadeIn(d_x, LEFT), + FadeIn(d_x.word, LEFT), ) a_tracker = ValueTracker(0) @@ -1874,8 +1874,8 @@ class SecondOrderEquationExample(DefineODE): self.add(curve, dot) self.play( ShowCreation(curve), - FadeInFrom(dd_x, LEFT), - FadeInFrom(dd_x.word, LEFT), + FadeIn(dd_x, LEFT), + FadeIn(dd_x.word, LEFT), ) self.add(changing_slope) self.play( @@ -2110,7 +2110,7 @@ class BreakingSecondOrderIntoTwoFirstOrder(IntroduceVectorField): )) self.add(ode) - self.play(FadeInFrom(so_word, 0.5 * DOWN)) + self.play(FadeIn(so_word, 0.5 * DOWN)) self.wait() self.play( @@ -2872,8 +2872,8 @@ class ComparePhysicsToLove(Scene): arrow = DoubleArrow(love.get_top(), ode.get_bottom()) - self.play(FadeInFrom(ode, DOWN)) - self.play(FadeInFrom(love, UP)) + self.play(FadeIn(ode, DOWN)) + self.play(FadeIn(love, UP)) self.wait() self.play(LaggedStartMap( ShowCreationThenFadeAround, @@ -3019,7 +3019,7 @@ class InaccurateComputation(Scene): run_time=2, ) self.wait() - self.play(FadeInFrom(errors, 3 * LEFT)) + self.play(FadeIn(errors, 3 * LEFT)) self.wait() diff --git a/from_3b1b/active/diffyq/part1/wordy_scenes.py b/from_3b1b/active/diffyq/part1/wordy_scenes.py index ac2e9163..b53968c0 100644 --- a/from_3b1b/active/diffyq/part1/wordy_scenes.py +++ b/from_3b1b/active/diffyq/part1/wordy_scenes.py @@ -30,7 +30,7 @@ class SmallAngleApproximationTex(Scene): self.add(approx, approx_brace, approx_words) self.play( Write(implies), - FadeInFrom(period, LEFT) + FadeIn(period, LEFT) ) self.wait() @@ -47,7 +47,7 @@ class StrogatzQuote(Scene): disc.move_to(mover) mover.become(disc) self.play( - FadeInFrom(quote.author_part, LEFT), + FadeIn(quote.author_part, LEFT), LaggedStartMap( # FadeInFromLarge, # quote[:-1].family_members_with_points(), @@ -151,7 +151,7 @@ class InputLabel(Scene): arrow = Vector(UP) arrow.next_to(label, UP) self.play( - FadeInFrom(label, UP), + FadeIn(label, UP), GrowArrow(arrow) ) self.wait() @@ -272,19 +272,19 @@ class ReasonForSolution(Scene): self.add(eq_word) self.add(equation) self.play( - FadeInFrom(s_word, LEFT), + FadeIn(s_word, LEFT), GrowArrow(arrows[0]), TransformFromCopy(equation, solution) ) self.wait() self.play( - FadeInFrom(c_word, UL), + FadeIn(c_word, UL), GrowArrow(arrows[2]), - FadeInFrom(computation, UP) + FadeIn(computation, UP) ) self.wait() self.play( - FadeInFrom(u_word, DL), + FadeIn(u_word, DL), GrowArrow(arrows[1]), FadeInFromDown(graph) ) @@ -357,8 +357,8 @@ class GleickQuote(Scene): quote.to_edge(UP) self.play( - FadeInFrom(book, RIGHT), - FadeInFrom(gleick, LEFT), + FadeIn(book, RIGHT), + FadeIn(gleick, LEFT), ) self.wait() self.play(Write(quote)) @@ -448,7 +448,7 @@ class SetAsideSeekingSolution(Scene): q1.scale, 0.3, q1.to_corner, UR, MED_SMALL_BUFF, ) - self.play(FadeInFrom(q2, DOWN)) + self.play(FadeIn(q2, DOWN)) self.play( eyes.blink, rate_func=lambda t: smooth(1 - t), @@ -698,8 +698,8 @@ class RevisitQuote(StrogatzQuote, PiCreatureScene): randy = self.pi_creature self.play( - FadeInFrom(quote[:-1], DOWN), - FadeInFrom(quote[-1:], LEFT), + FadeIn(quote[:-1], DOWN), + FadeIn(quote[-1:], LEFT), randy.change, "raise_right_hand", ) self.play(Blink(randy)) diff --git a/from_3b1b/active/diffyq/part2/heat_equation.py b/from_3b1b/active/diffyq/part2/heat_equation.py index 88eb1853..7aabcf70 100644 --- a/from_3b1b/active/diffyq/part2/heat_equation.py +++ b/from_3b1b/active/diffyq/part2/heat_equation.py @@ -253,11 +253,11 @@ class BringTwoRodsTogether(Scene): rod.label = label self.play( - FadeInFrom(rod1, UP), + FadeIn(rod1, UP), Write(rod1.label), ) self.play( - FadeInFrom(rod2, DOWN), + FadeIn(rod2, DOWN), Write(rod2.label) ) self.wait() @@ -612,7 +612,7 @@ class TalkThrough1DHeatGraph(ShowEvolvingTempGraphWithArrows, SpecialThreeDScene self.play(LaggedStart(*[ Succession( FadeInFromLarge(q_mark), - FadeOutAndShift(q_mark, DOWN), + FadeOut(q_mark, DOWN), ) for q_mark in q_marks ])) @@ -651,7 +651,7 @@ class TalkThrough1DHeatGraph(ShowEvolvingTempGraphWithArrows, SpecialThreeDScene self.play( rod.set_opacity, 0.5, - FadeInFrom(x_axis_label, UL), + FadeIn(x_axis_label, UL), LaggedStartMap( FadeInFrom, x_numbers, lambda m: (m, UP), @@ -705,7 +705,7 @@ class TalkThrough1DHeatGraph(ShowEvolvingTempGraphWithArrows, SpecialThreeDScene ) self.play( - FadeInFrom(triangle, UP), + FadeIn(triangle, UP), FadeIn(x_label), FadeIn(rod_piece), FadeOut(self.rod_word), @@ -1135,12 +1135,12 @@ class ContrastXChangesToTChanges(TalkThrough1DHeatGraph): self.play( ShowCreation(dx_line), - FadeInFrom(dx, LEFT) + FadeIn(dx, LEFT) ) self.wait() self.play( ShowCreation(dT_line), - FadeInFrom(dT, IN) + FadeIn(dT, IN) ) self.wait() self.play(*map(FadeOut, [ @@ -1186,7 +1186,7 @@ class ContrastXChangesToTChanges(TalkThrough1DHeatGraph): graph.copy(), remover=True ), - FadeInFrom(plane, 6 * DOWN, run_time=2), + FadeIn(plane, 6 * DOWN, run_time=2), VFadeIn(line), ApplyMethod( alpha_tracker.set_value, 1, @@ -1358,7 +1358,7 @@ class ShowDelTermsAsTinyNudges(TransitionToTempVsTime): ) for sym in reversed(syms): self.play( - FadeInFrom(sym, -sym.direction), + FadeIn(sym, -sym.direction), ShowCreation( sym.line.copy(), remover=True @@ -1433,7 +1433,7 @@ class ShowDelTermsAsTinyNudges(TransitionToTempVsTime): ) for sym in reversed(syms): self.play( - FadeInFrom(sym, -sym.direction), + FadeIn(sym, -sym.direction), ShowCreation( sym.line.copy(), remover=True @@ -1725,10 +1725,10 @@ class DiscreteSetup(ShowEvolvingTempGraphWithArrows): self.play( dot.scale, 0, dot.set_opacity, 0, - FadeInFrom(point_label, DOWN) + FadeIn(point_label, DOWN) ) self.play( - FadeInFrom(neighbors_label, DOWN), + FadeIn(neighbors_label, DOWN), *map(GrowArrow, arrows) ) self.wait() @@ -2161,8 +2161,8 @@ class DiscreteSetup(ShowEvolvingTempGraphWithArrows): second_difference_word.next_to(delta_delta, DOWN) self.play( - FadeOutAndShift(dd_word, UP), - FadeInFrom(delta_delta, UP), + FadeOut(dd_word, UP), + FadeIn(delta_delta, UP), ) self.wait() self.play( @@ -2381,7 +2381,7 @@ class TransitionToContinuousCase(DiscreteSetup): self.play( ShowCreation(VGroup(dx_line, dT_line)), - FadeInFrom(delta_T, LEFT) + FadeIn(delta_T, LEFT) ) self.play( GrowFromCenter(brace), @@ -2828,7 +2828,7 @@ class ShowNewtonsLawGraph(Scene): room_words.next_to(room_line, DOWN, SMALL_BUFF) self.play( - FadeInFrom(water_dot, RIGHT), + FadeIn(water_dot, RIGHT), GrowArrow(water_arrow), Write(water_words), run_time=1, diff --git a/from_3b1b/active/diffyq/part2/staging.py b/from_3b1b/active/diffyq/part2/staging.py index 234ecd32..09d74635 100644 --- a/from_3b1b/active/diffyq/part2/staging.py +++ b/from_3b1b/active/diffyq/part2/staging.py @@ -526,7 +526,7 @@ class TwoBodyEquations(Scene): variable.move_to(lhs, LEFT) self.play(LaggedStart(*[ - FadeInFrom(v, RIGHT) + FadeIn(v, RIGHT) for v in variables ])) self.wait() @@ -686,7 +686,7 @@ class StrogatzMention(PiCreatureScene): self.play(FadeInFromDown(steve)) self.wait() self.play( - FadeInFrom(book, DOWN), + FadeIn(book, DOWN), steve.shift, 4 * RIGHT, RemovePiCreatureBubble( morty, target_mode="thinking" diff --git a/from_3b1b/active/diffyq/part2/wordy_scenes.py b/from_3b1b/active/diffyq/part2/wordy_scenes.py index 861474ae..a78e78fa 100644 --- a/from_3b1b/active/diffyq/part2/wordy_scenes.py +++ b/from_3b1b/active/diffyq/part2/wordy_scenes.py @@ -101,8 +101,8 @@ class HeatEquationIntroTitle(WriteHeatEquationTemplate): equation.set_color_by_tex("{T}", RED) self.play( - FadeInFrom(title, DOWN), - FadeInFrom(equation, UP), + FadeIn(title, DOWN), + FadeIn(equation, UP), ) self.wait() @@ -207,9 +207,9 @@ class FourierSeriesIntro(WriteHeatEquationTemplate): self.wait() self.add(rot_square) self.play( - FadeInFrom(physics, RIGHT), + FadeIn(physics, RIGHT), GrowArrow(arrow2), - FadeInFrom(heat, RIGHT), + FadeIn(heat, RIGHT), GrowArrow(arrow1), MoveToTarget(title), ) @@ -273,7 +273,7 @@ class ShowPartialDerivativeSymbols(Scene): ])) dTdx.to_edge(UP) - self.play(FadeInFrom(dTdx, DOWN)) + self.play(FadeIn(dTdx, DOWN)) self.wait() self.play(ShowCreationThenFadeAround(dTdx[3:5])) self.play(ShowCreationThenFadeAround(dTdx[:2])) @@ -384,8 +384,8 @@ class WriteHeatEquation(WriteHeatEquationTemplate): del_outlines.set_fill(opacity=0) self.play( - FadeInFrom(title, 0.5 * DOWN), - FadeInFrom(equation, 0.5 * UP), + FadeIn(title, 0.5 * DOWN), + FadeIn(equation, 0.5 * UP), ) self.wait() self.play(ShowCreation(dt_rect)) @@ -402,8 +402,8 @@ class WriteHeatEquation(WriteHeatEquationTemplate): ) ) self.play( - FadeOutAndShift(title, UP), - FadeInFrom(pde, DOWN), + FadeOut(title, UP), + FadeIn(pde, DOWN), FadeOut(dt_rect), FadeOut(dx_rect), ) @@ -462,13 +462,13 @@ class Show1DAnd3DEquations(WriteHeatEquationTemplate): self.play( Write(d1_words), - FadeInFrom(d1_equation, UP), + FadeIn(d1_equation, UP), run_time=1, ) self.wait(2) self.play( Restore(d1_group), - FadeInFrom(d3_group, LEFT) + FadeIn(d3_group, LEFT) ) self.wait() self.play( @@ -576,7 +576,7 @@ class ShowLaplacian(WriteHeatEquation): for part in parts[1:]: self.play( rp.become, part.rp, - FadeInFrom(part, LEFT), + FadeIn(part, LEFT), Write(part.plus), ShowCreation(part.rect), ) @@ -640,10 +640,10 @@ class AskAboutActuallySolving(WriteHeatEquationTemplate): FadeInFromDown(q2), q1.shift, 1.5 * UP, ) - self.play(FadeInFrom(formula, UP)) + self.play(FadeIn(formula, UP)) self.play( GrowArrow(arrow), - FadeInFrom(q3, LEFT) + FadeIn(q3, LEFT) ) self.wait() diff --git a/from_3b1b/active/diffyq/part3/discrete_case.py b/from_3b1b/active/diffyq/part3/discrete_case.py index e79e13ae..3d5c6f43 100644 --- a/from_3b1b/active/diffyq/part3/discrete_case.py +++ b/from_3b1b/active/diffyq/part3/discrete_case.py @@ -92,7 +92,7 @@ class ShowNewRuleAtDiscreteBoundary(DiscreteSetup): self.play( LaggedStartMap(ShowCreation, arrows), LaggedStart(*[ - FadeInFrom(q_mark, -arrow.get_vector()) + FadeIn(q_mark, -arrow.get_vector()) for q_mark, arrow in zip(q_marks, arrows) ]), run_time=1.5 @@ -126,7 +126,7 @@ class ShowNewRuleAtDiscreteBoundary(DiscreteSetup): ReplacementTransform(*blocking_rects) ) self.wait() - self.play(FadeInFrom(braces, UP)) + self.play(FadeIn(braces, UP)) self.wait() self.play( FadeOut(new_arrows), diff --git a/from_3b1b/active/diffyq/part3/pi_creature_scenes.py b/from_3b1b/active/diffyq/part3/pi_creature_scenes.py index 7183fba9..e9cf8895 100644 --- a/from_3b1b/active/diffyq/part3/pi_creature_scenes.py +++ b/from_3b1b/active/diffyq/part3/pi_creature_scenes.py @@ -76,7 +76,7 @@ class InFouriersShoes(PiCreatureScene, WriteHeatEquationTemplate): triangle.move_to(time_line.n2p(2019), DOWN) triangle.set_color(WHITE) - self.play(FadeInFrom(fourier, 2 * LEFT)) + self.play(FadeIn(fourier, 2 * LEFT)) self.play(randy.change, "pondering") self.wait() self.play( diff --git a/from_3b1b/active/diffyq/part3/staging.py b/from_3b1b/active/diffyq/part3/staging.py index fc917a49..efb53da4 100644 --- a/from_3b1b/active/diffyq/part3/staging.py +++ b/from_3b1b/active/diffyq/part3/staging.py @@ -41,11 +41,11 @@ class FourierNameIntro(Scene): v_line.set_stroke(WHITE, 2) self.play( - FadeInFrom(lt, RIGHT), + FadeIn(lt, RIGHT), ShowCreation(v_line) ) self.play( - FadeInFrom(rt, LEFT), + FadeIn(rt, LEFT), ) # Edit in images of circle animations # and clips from FT video @@ -55,12 +55,12 @@ class FourierNameIntro(Scene): # Maybe do it for left variant, maybe not... self.play( MoveToTarget(title), - FadeInFrom(variants[0][0], LEFT) + FadeIn(variants[0][0], LEFT) ) for v1, v2 in zip(variants, variants[1:]): self.play( - FadeOutAndShift(v1[0], UP), - FadeInFrom(v2[0], DOWN), + FadeOut(v1[0], UP), + FadeIn(v2[0], DOWN), run_time=0.5, ) self.wait(0.5) @@ -177,7 +177,7 @@ class FourierNameIntro(Scene): color=heat_rect.get_color(), ) - self.play(FadeInFrom(paper, LEFT)) + self.play(FadeIn(paper, LEFT)) self.play( ShowCreation(date_rect), ) @@ -775,7 +775,7 @@ class InvestmentGrowth(Scene): self.play(FadeInFromDown(ode)) self.wait(6) - self.play(FadeInFrom(exp, UP)) + self.play(FadeIn(exp, UP)) self.wait(2) self.play( Restore(exp_part), @@ -936,7 +936,7 @@ class BoundaryConditionInterlude(Scene): for im1, im2, arrow in zip(storyline, storyline[1:], storyline.arrows): self.add(im2, im1) self.play( - FadeInFrom(im2, -im_to_im), + FadeIn(im2, -im_to_im), ShowCreation(arrow), ) self.wait() @@ -1011,7 +1011,7 @@ class BoundaryConditionInterlude(Scene): ) self.play( GrowFromCenter(brace), - FadeInFrom(nv_text, RIGHT) + FadeIn(nv_text, RIGHT) ) self.wait() diff --git a/from_3b1b/active/diffyq/part3/temperature_graphs.py b/from_3b1b/active/diffyq/part3/temperature_graphs.py index 3801cde8..3cfbadfc 100644 --- a/from_3b1b/active/diffyq/part3/temperature_graphs.py +++ b/from_3b1b/active/diffyq/part3/temperature_graphs.py @@ -344,8 +344,8 @@ class AddMultipleSolutions(SimpleCosExpGraph): Write(axes2.surface), ), LaggedStart( - FadeInFrom(axes1.checkmark, DOWN), - FadeInFrom(axes2.checkmark, DOWN), + FadeIn(axes1.checkmark, DOWN), + FadeIn(axes2.checkmark, DOWN), ), lag_ratio=0.2, run_time=1, @@ -361,10 +361,10 @@ class AddMultipleSolutions(SimpleCosExpGraph): axes2.copy().set_fill(opacity=0), axes3 ), - FadeInFrom(equals, LEFT) + FadeIn(equals, LEFT) ) self.play( - FadeInFrom(axes3.checkmark, DOWN), + FadeIn(axes3.checkmark, DOWN), ) self.wait() @@ -528,13 +528,13 @@ class BreakDownAFunction(SimpleCosExpGraph): self.add(top_axes) self.play(ShowCreation(top_graph)) self.play( - FadeInFrom(top_words, RIGHT), + FadeIn(top_words, RIGHT), ShowCreation(top_arrow) ) self.wait() self.play( LaggedStartMap(FadeIn, low_axes_group), - FadeInFrom(low_words, UP), + FadeIn(low_words, UP), LaggedStartMap(FadeInFromDown, [*plusses, dots]), *[ TransformFromCopy(top_graph, low_graph) @@ -978,7 +978,7 @@ class AnalyzeSineCurve(TemperatureGraphScene): self.play( Write(axes), self.quick_sine_curve.become, graph, - FadeOutAndShift(self.question_group, UP), + FadeOut(self.question_group, UP), ) self.play( FadeInFromDown(graph_label), @@ -1043,12 +1043,12 @@ class AnalyzeSineCurve(TemperatureGraphScene): self.play( Animation(Group(*self.get_mobjects())), - FadeInFrom(deriv1, LEFT), + FadeIn(deriv1, LEFT), self.camera.frame_center.shift, 2 * RIGHT, ) self.wait() self.play( - FadeInFrom(deriv2, UP) + FadeIn(deriv2, UP) ) self.wait() @@ -1152,8 +1152,8 @@ class AnalyzeSineCurve(TemperatureGraphScene): graph_label[i + 1:i + 3], new_label[i + 1:i + 3], ), - FadeOutAndShift(graph_label[i], UP), - FadeInFrom(new_label[i], DOWN), + FadeOut(graph_label[i], UP), + FadeIn(new_label[i], DOWN), ) self.play( ReplacementTransform( @@ -1187,14 +1187,14 @@ class AnalyzeSineCurve(TemperatureGraphScene): aligned_edge=DOWN, ) exp.move_to(c.get_corner(UR), DL) - anims1 = [FadeInFrom(coef, 0.25 * DOWN)] - anims2 = [FadeInFrom(exp, 0.25 * DOWN)] + anims1 = [FadeIn(coef, 0.25 * DOWN)] + anims2 = [FadeIn(exp, 0.25 * DOWN)] if last_coef: anims1.append( - FadeOutAndShift(last_coef, 0.25 * UP) + FadeOut(last_coef, 0.25 * UP) ) anims2.append( - FadeOutAndShift(last_exp, 0.25 * UP) + FadeOut(last_exp, 0.25 * UP) ) last_coef = coef last_exp = exp @@ -1393,7 +1393,7 @@ class SineWaveScaledByExp(TemperatureGraphScene): self.play( ShowCreation(graph), - FadeInFrom(graph_label, IN) + FadeIn(graph_label, IN) ) self.wait() graph.resume_updating() @@ -1478,7 +1478,7 @@ class SineWaveScaledByExp(TemperatureGraphScene): self.play( ShowCreation(exp_graph), FadeOut(plane), - FadeInFrom(exp_label, IN), + FadeIn(exp_label, IN), time_slices.set_stroke, {"width": 1}, ) @@ -2171,8 +2171,8 @@ class ManipulateSinExpSurface(TemperatureGraphScene): ApplyMethod( self.phi_tracker.set_value, 0, ), - FadeOutAndShift(sin_label, LEFT), - FadeInFrom(cos_label, RIGHT), + FadeOut(sin_label, LEFT), + FadeIn(cos_label, RIGHT), run_time=2, ) left_tangent.move_to(graph.get_start(), LEFT) @@ -2677,8 +2677,8 @@ class ShowHarmonics(SimulateRealSineCurve): new_n_sym.move_to(n_sym, DR) new_n_sym.match_style(n_sym) self.play( - FadeOutAndShift(n_sym, UP), - FadeInFrom(new_n_sym, DOWN), + FadeOut(n_sym, UP), + FadeIn(new_n_sym, DOWN), omega_tracker.set_value, n * PI / L, ) self.wait() diff --git a/from_3b1b/active/diffyq/part3/wordy_scenes.py b/from_3b1b/active/diffyq/part3/wordy_scenes.py index 285cdc98..33e60842 100644 --- a/from_3b1b/active/diffyq/part3/wordy_scenes.py +++ b/from_3b1b/active/diffyq/part3/wordy_scenes.py @@ -62,7 +62,7 @@ class ThreeMainObservations(Scene): ) self.wait() for obs in observations: - self.play(FadeInFrom(obs[1], LEFT)) + self.play(FadeIn(obs[1], LEFT)) self.wait() @@ -138,7 +138,7 @@ class ThreeConstraints(WriteHeatEquationTemplate): self.play( FadeInFromDown(title), - FadeOutAndShift(to_remove, UP), + FadeOut(to_remove, UP), equation.scale, 0.6, equation.next_to, items[0], DOWN, equation.shift_onto_screen, @@ -151,7 +151,7 @@ class ThreeConstraints(WriteHeatEquationTemplate): self.wait() self.play(Write(items[1][1])) bc_paren.match_y(equation) - self.play(FadeInFrom(bc_paren, UP)) + self.play(FadeIn(bc_paren, UP)) self.wait(2) self.play(Write(items[2][1])) self.wait(2) @@ -229,7 +229,7 @@ class SeekIdealized(Scene): words[0].to_edge, DOWN, words[0].set_opacity, 0.5, Transform(phrase, phrases[1]), - FadeInFrom(words[1], UP) + FadeIn(words[1], UP) ) self.wait() # self.play( @@ -244,7 +244,7 @@ class SeekIdealized(Scene): MaintainPositionRelativeTo( phrase, words[1] ), - FadeInFrom(solutions, LEFT), + FadeIn(solutions, LEFT), FadeIn(words[3]), ) self.wait() @@ -259,7 +259,7 @@ class SeekIdealized(Scene): self.play( MoveToTarget(words[0]), ShowCreation(low_arrow), - FadeInFrom(models, LEFT) + FadeIn(models, LEFT) ) self.wait() @@ -308,8 +308,8 @@ class EquationAboveSineAnalysis(WriteHeatEquationTemplate): self.play(ShowCreationThenFadeAround(rhs)) self.wait() self.play( - FadeOutAndShift(t_terms, UP), - FadeInFrom(zeros, DOWN), + FadeOut(t_terms, UP), + FadeIn(zeros, DOWN), ) t_terms.fade(1) self.wait() @@ -353,8 +353,8 @@ class ExpVideoWrapper(Scene): screen.center() self.play( - # FadeInFrom(title, LEFT), - FadeInFrom(screen, DOWN), + # FadeIn(title, LEFT), + FadeIn(screen, DOWN), ) self.wait() @@ -413,7 +413,7 @@ class ShowSinExpDerivatives(WriteHeatEquationTemplate): self.wait() self.play( MoveToTarget(pde), - FadeInFrom(new_rhs, LEFT) + FadeIn(new_rhs, LEFT) ) self.wait() self.play( @@ -610,7 +610,7 @@ class ShowSinExpDerivatives(WriteHeatEquationTemplate): checkmark.move_to(q_mark, DOWN) self.play( FadeInFromDown(checkmark), - FadeOutAndShift(q_mark, UP) + FadeOut(q_mark, UP) ) self.wait() @@ -737,8 +737,8 @@ class WriteOutBoundaryCondition(FlatAtBoundaryWords, ThreeConstraints, MovingCam VGroup(self.items[0], self.pde) )) self.play( - FadeOutAndShift(bc_paren, UP), - FadeInFrom(bc_words, DOWN), + FadeOut(bc_paren, UP), + FadeIn(bc_words, DOWN), ) self.wait() @@ -758,7 +758,7 @@ class WriteOutBoundaryCondition(FlatAtBoundaryWords, ThreeConstraints, MovingCam self.play( self.camera_frame.shift, 0.8 * DOWN, ) - self.play(FadeInFrom(equation, UP)) + self.play(FadeIn(equation, UP)) self.wait() @@ -891,7 +891,7 @@ class WorryAboutGenerality(TeacherStudentsScene, WriteHeatEquationTemplate): self.get_student_changes(*3 * ["pondering"]), ) self.play( - FadeInFrom(themes, UP), + FadeIn(themes, UP), self.get_student_changes(*3 * ["thinking"]), self.teacher.change, "happy" ) diff --git a/from_3b1b/active/diffyq/part4/complex_functions.py b/from_3b1b/active/diffyq/part4/complex_functions.py index a72491ed..53f8bd1f 100644 --- a/from_3b1b/active/diffyq/part4/complex_functions.py +++ b/from_3b1b/active/diffyq/part4/complex_functions.py @@ -91,7 +91,7 @@ class GeneralizeToComplexFunctions(Scene): self.wait(2) self.play( - FadeInFrom(real_words, RIGHT), + FadeIn(real_words, RIGHT), FadeIn(real_arrow), ) self.wait(5) @@ -357,7 +357,7 @@ class ClarifyInputAndOutput(GeneralizeToComplexFunctions): def describe_input(self): input_tracker = self.input_tracker - self.play(FadeInFrom(self.input_words, UP)) + self.play(FadeIn(self.input_words, UP)) self.play( FadeInFromLarge(self.input_dot), FadeIn(self.input_decimal), @@ -387,14 +387,14 @@ class ClarifyInputAndOutput(GeneralizeToComplexFunctions): self.play( ShowCreation(real_line), - FadeInFrom(real_words, DOWN) + FadeIn(real_words, DOWN) ) self.play( FadeOut(real_line), FadeOut(real_words), ) self.play( - FadeInFrom(plane.sublabel, UP) + FadeIn(plane.sublabel, UP) ) self.play( FadeIn(output_decimal), diff --git a/from_3b1b/active/diffyq/part4/fourier_series_scenes.py b/from_3b1b/active/diffyq/part4/fourier_series_scenes.py index e346cf16..ed16727c 100644 --- a/from_3b1b/active/diffyq/part4/fourier_series_scenes.py +++ b/from_3b1b/active/diffyq/part4/fourier_series_scenes.py @@ -533,7 +533,7 @@ class LabelRotatingVectors(PiFourierSeries): for circle in circles ]) - self.play(FadeInFrom(formulas, DOWN)) + self.play(FadeIn(formulas, DOWN)) self.play(LaggedStartMap( FadeInFrom, q_marks, lambda m: (m, UP), @@ -575,8 +575,8 @@ class LabelRotatingVectors(PiFourierSeries): vector_clock.add_updater(vc_updater) self.wait() self.play( - FadeOutAndShift(q_marks[0], UP), - FadeInFrom(one_label, DOWN), + FadeOut(q_marks[0], UP), + FadeIn(one_label, DOWN), ) self.wait(4) @@ -633,11 +633,11 @@ class LabelRotatingVectors(PiFourierSeries): self.play( ReplacementTransform(vg1_copy, vg1), ) - self.play(FadeInFrom(cps_1, DOWN)) + self.play(FadeIn(cps_1, DOWN)) self.wait(2) self.play( - FadeOutAndShift(q_marks[1], UP), - FadeInFrom(f1_exp, DOWN), + FadeOut(q_marks[1], UP), + FadeIn(f1_exp, DOWN), ) self.wait(2) self.play(ShowCreationThenFadeAround( @@ -679,7 +679,7 @@ class LabelRotatingVectors(PiFourierSeries): ) self.wait(2) self.play( - FadeOutAndShift(q_marks[2], UP), + FadeOut(q_marks[2], UP), FadeInFromDown(fm1_exp), v1_rect.stretch, 1.4, 0, ) @@ -710,7 +710,7 @@ class LabelRotatingVectors(PiFourierSeries): ) self.wait() self.play( - FadeOutAndShift(q_marks[3], UP), + FadeOut(q_marks[3], UP), FadeInFromDown(f2_exp), ) self.wait(3) @@ -757,7 +757,7 @@ class LabelRotatingVectors(PiFourierSeries): FadeIn(v_lines, lag_ratio=0.2) ) self.play( - FadeInFrom(f_exp_general, UP) + FadeIn(f_exp_general, UP) ) self.play(ShowCreationThenFadeAround(f_exp_general)) self.wait(3) diff --git a/from_3b1b/active/diffyq/part4/pi_creature_scenes.py b/from_3b1b/active/diffyq/part4/pi_creature_scenes.py index 45959e9d..f49b949f 100644 --- a/from_3b1b/active/diffyq/part4/pi_creature_scenes.py +++ b/from_3b1b/active/diffyq/part4/pi_creature_scenes.py @@ -202,7 +202,7 @@ class LooseWithLanguage(TeacherStudentsScene): run_time=2, ) self.play( - FadeInFrom(terms[1], DOWN), + FadeIn(terms[1], DOWN), self.get_student_changes( "thinking", "pondering", "erm", look_at_arg=terms, diff --git a/from_3b1b/active/diffyq/part4/staging.py b/from_3b1b/active/diffyq/part4/staging.py index ea1a05b6..eaf62830 100644 --- a/from_3b1b/active/diffyq/part4/staging.py +++ b/from_3b1b/active/diffyq/part4/staging.py @@ -86,7 +86,7 @@ class RelationToOtherVideos(Scene): self.play( MoveToTarget(group), - FadeInFrom(fourier, LEFT) + FadeIn(fourier, LEFT) ) self.play(Write(bubble, run_time=1)) self.wait() @@ -106,7 +106,7 @@ class RelationToOtherVideos(Scene): Transform(brace, new_brace), text.scale, 0.7, text.next_to, new_brace, UP, - FadeOutAndShift(bubble, LEFT), + FadeOut(bubble, LEFT), ) self.play( videos[2].scale, 1.7, @@ -470,7 +470,7 @@ class ShowInfiniteSum(FourierSeriesIllustraiton): words.next_to(arrow, DOWN) self.play( - FadeInFrom(words, LEFT), + FadeIn(words, LEFT), GrowArrow(arrow) ) self.wait() @@ -604,8 +604,8 @@ class ShowInfiniteSum(FourierSeriesIllustraiton): num_inf_sum.move_to(UP) self.play( - FadeOutAndShift(graph_group, DOWN), - FadeInFrom(number_line, UP), + FadeOut(graph_group, DOWN), + FadeIn(number_line, UP), FadeOut(self.inf_words), *[ TransformFromCopy(t1[-1:], t2) @@ -908,7 +908,7 @@ class ShowInfiniteSum(FourierSeriesIllustraiton): )) self.play( - FadeInFrom(input_label, LEFT), + FadeIn(input_label, LEFT), dot.scale, 1.5, ) self.wait() @@ -1116,7 +1116,7 @@ class TechnicalNuances(Scene): question.next_to(line, DOWN, MED_LARGE_BUFF) self.play( FadeInFromDown(question), - FadeOutAndShift(last_question, UP) + FadeOut(last_question, UP) ) self.wait(2) last_question = question @@ -1192,7 +1192,7 @@ class AskAboutComplexNotVector(Scene): ) for q, ex in zip(questions, group): self.play( - FadeInFrom(q, LEFT), + FadeIn(q, LEFT), FadeIn(ex) ) self.wait() @@ -1321,7 +1321,7 @@ class SwapIntegralAndSum(Scene): self.add(int_ft) self.play( - FadeInFrom(breakdown_label, LEFT), + FadeIn(breakdown_label, LEFT), GrowArrow(arrow), ) self.wait() @@ -1496,8 +1496,8 @@ class SwapIntegralAndSum(Scene): ]) self.wait() self.play( - FadeOutAndShift(something, UP), - FadeInFrom(new_exp, DOWN), + FadeOut(something, UP), + FadeIn(new_exp, DOWN), ) self.play(FadeOut(self.to_fade)) @@ -1547,13 +1547,13 @@ class SwapIntegralAndSum(Scene): moving_exp[1], replacement1[1], ), - FadeOutAndShift(exp1[1], DOWN), + FadeOut(exp1[1], DOWN), Transform(exp1[0], replacement1[0]), Transform(exp1[2:], replacement1[2:]), ) self.play( TransformFromCopy(replacement1, replacement2), - FadeOutAndShift(exp2, DOWN), + FadeOut(exp2, DOWN), FadeOut(diagram), ) self.play(Restore(moving_exp)) @@ -1846,7 +1846,7 @@ class DescribeSVG(Scene): rate_func=lambda t: 0.3 * there_and_back(t) )) self.wait() - self.play(FadeInFrom(answer, UP)) + self.play(FadeIn(answer, UP)) self.play( FadeOut(path), FadeOut(dot), @@ -2065,7 +2065,7 @@ class StepFunctionIntegral(Scene): self.add(cn_expression) self.wait() - self.play(FadeInFrom(expansion, LEFT)) + self.play(FadeIn(expansion, LEFT)) for words in all_words: self.play(FadeIn(words)) self.wait() @@ -2305,7 +2305,7 @@ class ExponentialsMoreBroadly(Scene): self.play( FadeInFromDown(m_exp), - FadeOutAndShift(formula, UP), + FadeOut(formula, UP), FadeOut(c_exp) ) self.add(vector_field, circle, dot, m_exp) diff --git a/from_3b1b/active/diffyq/part4/three_d_graphs.py b/from_3b1b/active/diffyq/part4/three_d_graphs.py index 420b5f74..b4ba47ca 100644 --- a/from_3b1b/active/diffyq/part4/three_d_graphs.py +++ b/from_3b1b/active/diffyq/part4/three_d_graphs.py @@ -95,7 +95,7 @@ class ShowLinearity(WriteHeatEquationTemplate, TemperatureGraphScene): ShowCreation(arrow), group.next_to, arrow, LEFT ) - self.play(FadeInFrom(linear_word, LEFT)) + self.play(FadeIn(linear_word, LEFT)) self.wait() def add_function_labels(self): @@ -144,12 +144,12 @@ class ShowLinearity(WriteHeatEquationTemplate, TemperatureGraphScene): )) self.play( - FadeInFrom(T1[1], DOWN), - FadeInFrom(solution_labels[0], UP), + FadeIn(T1[1], DOWN), + FadeIn(solution_labels[0], UP), ) self.play( - FadeInFrom(T2[1], DOWN), - FadeInFrom(solution_labels[1], UP), + FadeIn(T2[1], DOWN), + FadeIn(solution_labels[1], UP), ) self.wait() self.play( @@ -166,7 +166,7 @@ class ShowLinearity(WriteHeatEquationTemplate, TemperatureGraphScene): ] ) self.wait() - self.play(FadeInFrom(solution_labels[2], UP)) + self.play(FadeIn(solution_labels[2], UP)) self.wait() # Show constants diff --git a/from_3b1b/active/diffyq/part5/staging.py b/from_3b1b/active/diffyq/part5/staging.py index baf34ba1..66266719 100644 --- a/from_3b1b/active/diffyq/part5/staging.py +++ b/from_3b1b/active/diffyq/part5/staging.py @@ -97,7 +97,7 @@ class IntroductionOfExp(Scene): self.wait() self.play( Restore(derivative), - FadeInFrom(ic, LEFT) + FadeIn(ic, LEFT) ) self.wait() self.play( @@ -388,7 +388,7 @@ class IntroducePhysicalModel(IntroductionOfExp): self.play( ShowCreation(rhs_rect), - FadeInFrom(rhs_word, UP), + FadeIn(rhs_word, UP), ShowCreation(self.position_vect) ) self.add( @@ -410,7 +410,7 @@ class IntroducePhysicalModel(IntroductionOfExp): self.wait() self.play( ShowCreation(lhs_rect), - FadeInFrom(lhs_word, UP), + FadeIn(lhs_word, UP), ) self.wait() self.play( @@ -938,7 +938,7 @@ class ImaginaryConstant(ConstantEquals2): self.play(randy.change, "confused") self.play( ShowCreation(p_rect), - FadeInFrom(p_label, UP) + FadeIn(p_label, UP) ) self.add(self.number_line, self.position_vect) self.play( @@ -1466,24 +1466,24 @@ class ReferenceWhatItMeans(PiCreatureScene): self.add(epii) self.play( - FadeInFrom(arrow, LEFT), - FadeInFrom(repeated_mult, 2 * LEFT), + FadeIn(arrow, LEFT), + FadeIn(repeated_mult, 2 * LEFT), randy.change, "maybe", ) self.wait() self.play(randy.change, "confused") self.play( - FadeOutAndShift(arrow, DOWN), - FadeInFrom(does_not_mean, UP), + FadeOut(arrow, DOWN), + FadeIn(does_not_mean, UP), ) self.play(Write(nonsense)) self.play(randy.change, "angry") # self.play(ShowCreation(cross)) self.wait() self.play( - FadeOutAndShift(randy, DOWN), - FadeInFrom(down_arrow, UP), - FadeInFrom(actually_means, LEFT), + FadeOut(randy, DOWN), + FadeIn(down_arrow, UP), + FadeIn(actually_means, LEFT), FadeIn(series, lag_ratio=0.1, run_time=2) ) self.wait() diff --git a/from_3b1b/old/alt_calc.py b/from_3b1b/old/alt_calc.py index 58fb9b97..d74720e1 100644 --- a/from_3b1b/old/alt_calc.py +++ b/from_3b1b/old/alt_calc.py @@ -2860,7 +2860,7 @@ class RepeatedApplicationGraphically(GraphOnePlusOneOverX, PiCreatureScene): dot = Dot(color=RED, fill_opacity=0.7) dot.move_to(self.coords_to_point(x_val, curr_output)) - self.play(FadeInFrom(dot, 2 * UR)) + self.play(FadeIn(dot, 2 * UR)) self.wait() for n in range(self.n_jumps): diff --git a/from_3b1b/old/borsuk_addition.py b/from_3b1b/old/borsuk_addition.py index f790d07e..25bef109 100644 --- a/from_3b1b/old/borsuk_addition.py +++ b/from_3b1b/old/borsuk_addition.py @@ -134,7 +134,7 @@ class UnexpectedConnection(Scene): self.wait() self.play( Restore(arrow), - FadeInFrom(formula, LEFT) + FadeIn(formula, LEFT) ) self.wait() @@ -452,7 +452,7 @@ class FunctionGInSymbols(Scene): self.play(WiggleOutThenIn(f)) self.wait() self.play( - FadeOutAndShift(dec_rhs, DOWN), + FadeOut(dec_rhs, DOWN), FadeInFromDown(f_of_neg_p) ) self.wait() @@ -468,7 +468,7 @@ class FunctionGInSymbols(Scene): MoveToTarget(f_of_p, path_arc=PI), MoveToTarget(f_of_neg_p, path_arc=-PI), FadeInFromLarge(minus), - FadeInFrom(zero_zero, LEFT) + FadeIn(zero_zero, LEFT) ) self.wait() @@ -493,7 +493,7 @@ class FunctionGInSymbols(Scene): self.play( FadeInFromLarge(g_of_p), - FadeInFrom(def_eq, LEFT) + FadeIn(def_eq, LEFT) ) self.play( FadeInFromDown(seeking_text), @@ -596,7 +596,7 @@ class FunctionGInputSpace(SpecialThreeDScene): self.play( point_mob.move_to, start_point, GrowArrow(arrow), - FadeInFrom(p_label, IN) + FadeIn(p_label, IN) ) self.wait() self.play( @@ -835,7 +835,7 @@ class FunctionGOutputSpace(FunctionGInputSpace): self.wait(3) dc = dot.copy() self.play( - FadeInFrom(dc, 2 * UP, remover=True), + FadeIn(dc, 2 * UP, remover=True), UpdateFromFunc(fp_label, lambda fp: fp.next_to(dc, UL, SMALL_BUFF)) ) self.add(dot) diff --git a/from_3b1b/old/clacks/question.py b/from_3b1b/old/clacks/question.py index 5b927d57..b5f6745f 100644 --- a/from_3b1b/old/clacks/question.py +++ b/from_3b1b/old/clacks/question.py @@ -1062,7 +1062,7 @@ class StepsOfTheAlgorithmJustTitles(StepsOfTheAlgorithm): for title in titles: self.play( FadeInFromDown(title), - FadeOutAndShift(last_title, UP), + FadeOut(last_title, UP), ) self.wait() last_title = title @@ -1138,7 +1138,7 @@ class CompareToGalacticMass(Scene): group.next_to(brace, DOWN) self.play( MoveToTarget(counter), - FadeInFrom(digits_word, LEFT), + FadeIn(digits_word, LEFT), ) self.wait() @@ -1366,8 +1366,8 @@ class CompareAlgorithmToPhysics(PiCreatureScene): digits.set_width(FRAME_WIDTH - 1) digits.to_edge(UP) self.play( - FadeOutAndShift(right_pic, 5 * RIGHT), - # FadeOutAndShift(left_rect, 5 * LEFT), + FadeOut(right_pic, 5 * RIGHT), + # FadeOut(left_rect, 5 * LEFT), FadeOut(left_rect), PiCreatureBubbleIntroduction( morty, "This doesn't seem \\\\ like me...", diff --git a/from_3b1b/old/clacks/solution1.py b/from_3b1b/old/clacks/solution1.py index 8751802c..913dbb5b 100644 --- a/from_3b1b/old/clacks/solution1.py +++ b/from_3b1b/old/clacks/solution1.py @@ -307,13 +307,13 @@ class AskAboutFindingNewVelocities(Scene): self.play(Blink(randy)) self.wait() self.play( - FadeInFrom(energy_words, RIGHT), + FadeIn(energy_words, RIGHT), FadeInFromDown(energy_expression), FadeOut(randy), ) self.wait() self.play( - FadeInFrom(momentum_words, RIGHT), + FadeIn(momentum_words, RIGHT), FadeInFromDown(momentum_expression) ) self.wait() @@ -520,7 +520,7 @@ class AskAboutFindingNewVelocities(Scene): self.play(*anims, run_time=0.5) def get_next_velocity_labels_animation(self): - return FadeInFrom( + return FadeIn( self.get_next_velocity_labels(), LEFT, run_time=0.5 @@ -851,7 +851,7 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities): ) self.play( - FadeInFrom(xy_equation, UP), + FadeIn(xy_equation, UP), FadeOut(equations[1]) ) self.wait() @@ -928,7 +928,7 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities): ) self.play(ShowCreationThenFadeAround(momentum_expression)) self.wait() - self.play(FadeInFrom(momentum_xy_equation, UP)) + self.play(FadeIn(momentum_xy_equation, UP)) self.wait() def show_momentum_line(self): @@ -962,7 +962,7 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities): self.add(line, *foreground_mobs) self.play(ShowCreation(line)) self.play( - FadeInFrom(slope_label, RIGHT), + FadeIn(slope_label, RIGHT), GrowArrow(slope_arrow), ) self.wait() @@ -1354,7 +1354,7 @@ class AnnouncePhaseDiagram(CircleDiagramFromSlidingBlocks): ) self.wait() self.play( - FadeInFrom(simple_words, RIGHT), + FadeIn(simple_words, RIGHT), GrowArrow(simple_arrow), self.teacher.change, "hooray", ) @@ -1608,7 +1608,7 @@ class AnalyzeCircleGeometry(CircleDiagramFromSlidingBlocks, MovingCameraScene): self.wait() self.play( ShowCreation(theta_arc), - FadeInFrom(theta_label, UP) + FadeIn(theta_label, UP) ) self.wait() self.play( @@ -1703,8 +1703,8 @@ class AnalyzeCircleGeometry(CircleDiagramFromSlidingBlocks, MovingCameraScene): for line, arc, label, wedge in zip(lines, arcs, two_theta_labels, wedges): self.play( ShowCreation(line), - FadeInFrom(arc, normalize(arc.get_center())), - FadeInFrom(label, normalize(arc.get_center())), + FadeIn(arc, normalize(arc.get_center())), + FadeIn(label, normalize(arc.get_center())), FadeIn(wedge), ) @@ -1976,9 +1976,9 @@ class AddTwoThetaManyTimes(Scene): self.add(expression[:2 * n + 1]) self.wait(0.25) self.play( - FadeInFrom(expression[-2:], LEFT), + FadeIn(expression[-2:], LEFT), GrowFromCenter(brace), - FadeInFrom(question, UP) + FadeIn(question, UP) ) self.wait(3) self.play( @@ -2130,7 +2130,7 @@ class ComputeThetaFor1e4(AnalyzeCircleGeometry): self.play( lines_to_fade.set_stroke, WHITE, 1, 0.3, ShowCreation(arc), - FadeInFrom(theta_label, UP) + FadeIn(theta_label, UP) ) self.two_lines = two_lines @@ -2165,7 +2165,7 @@ class ComputeThetaFor1e4(AnalyzeCircleGeometry): self.remove(new_line) line.match_style(new_line) self.play( - FadeInFrom(slope_label[3:5], LEFT) + FadeIn(slope_label[3:5], LEFT) ) self.wait() self.play( @@ -2756,13 +2756,13 @@ class UnitCircleIntuition(Scene): self.play( ShowCreation(height_line.copy().clear_updaters(), remover=True), - FadeInFrom(h_label.copy().clear_updaters(), RIGHT, remover=True), + FadeIn(h_label.copy().clear_updaters(), RIGHT, remover=True), Write(rhs[:2]) ) self.add(height_line, h_label) self.play( ShowCreation(width_line.copy().clear_updaters(), remover=True), - FadeInFrom(w_label.copy().clear_updaters(), UP, remover=True), + FadeIn(w_label.copy().clear_updaters(), UP, remover=True), self.r_label.fade, 1, Write(rhs[2]) ) @@ -3026,18 +3026,18 @@ class FinalCommentsOnPhaseSpace(Scene): geometry.move_to(point, LEFT) self.play( - FadeOutAndShift(self.to_fade, UP), - FadeInFrom(state, UP) + FadeOut(self.to_fade, UP), + FadeIn(state, UP) ) self.play( GrowArrow(arrow), - FadeInFrom(point, LEFT) + FadeIn(point, LEFT) ) self.wait(2) for w1, w2 in [(state, dynamics), (point, geometry)]: self.play( - FadeOutAndShift(w1, UP), - FadeInFrom(w2, DOWN), + FadeOut(w1, UP), + FadeIn(w2, DOWN), ) self.wait() self.wait() diff --git a/from_3b1b/old/clacks/solution2/position_phase_space.py b/from_3b1b/old/clacks/solution2/position_phase_space.py index 46f82921..582d259e 100644 --- a/from_3b1b/old/clacks/solution2/position_phase_space.py +++ b/from_3b1b/old/clacks/solution2/position_phase_space.py @@ -1128,7 +1128,7 @@ class FailedAngleRelation(PositionPhaseSpaceScene): for arc in arcs: self.play( - FadeInFrom(arc.word, LEFT), + FadeIn(arc.word, LEFT), GrowArrow(arc.arrow, path_arc=arc.arrow.path_arc), ) self.play( @@ -1556,13 +1556,13 @@ class IntroduceVelocityVector(PositionPhaseSpaceScene, MovingCameraScene): TransformFromCopy(ps_vect, x_vect), ShowCreation(x_line), ) - self.play(FadeInFrom(dx_label, 0.25 * DOWN)) + self.play(FadeIn(dx_label, 0.25 * DOWN)) self.wait() self.play( TransformFromCopy(ps_vect, y_vect), ShowCreation(y_line), ) - self.play(FadeInFrom(dy_label, 0.25 * LEFT)) + self.play(FadeIn(dy_label, 0.25 * LEFT)) self.wait() # Ask about dx_dt @@ -1742,11 +1742,11 @@ class IntroduceVelocityVector(PositionPhaseSpaceScene, MovingCameraScene): self.wait() self.play(Write(rhs[1:])) self.wait() - self.play(FadeInFrom(new_rhs, UP)) + self.play(FadeIn(new_rhs, UP)) for equation in self.derivative_equations: self.play(ShowCreationThenFadeAround(equation)) self.wait() - self.play(FadeInFrom(final_rhs, UP)) + self.play(FadeIn(final_rhs, UP)) self.wait() def let_process_play_out(self): @@ -1995,7 +1995,7 @@ class ShowMomentumConservation(IntroduceVelocityVector): question.set_background_stroke(color=BLACK, width=3) question.next_to(self.ps_point, UP) - self.play(FadeInFrom(question, DOWN)) + self.play(FadeIn(question, DOWN)) ps_vect.suspend_updating() angles = [0.75 * PI, -0.5 * PI, -0.25 * PI] for last_angle, angle in zip(np.cumsum([0] + angles), angles): diff --git a/from_3b1b/old/clacks/solution2/simple_scenes.py b/from_3b1b/old/clacks/solution2/simple_scenes.py index 988ac98d..ac197ad1 100644 --- a/from_3b1b/old/clacks/solution2/simple_scenes.py +++ b/from_3b1b/old/clacks/solution2/simple_scenes.py @@ -21,8 +21,8 @@ class WrapperScene(Scene): self.add(big_rect, screen_rect) self.play( FadeIn(big_rect), - FadeInFrom(title, DOWN), - FadeInFrom(screen_rect, UP), + FadeIn(title, DOWN), + FadeIn(screen_rect, UP), ) self.wait() @@ -513,7 +513,7 @@ class FinalFormula(Scene): group.to_edge(UP) self.play(Write(text)) - self.play(FadeInFrom(formula)) + self.play(FadeIn(formula)) self.play(ShowCreationThenFadeAround(formula)) self.wait() diff --git a/from_3b1b/old/clacks/solution2/wordy_scenes.py b/from_3b1b/old/clacks/solution2/wordy_scenes.py index 39f880d0..5afaa014 100644 --- a/from_3b1b/old/clacks/solution2/wordy_scenes.py +++ b/from_3b1b/old/clacks/solution2/wordy_scenes.py @@ -45,13 +45,13 @@ class ConnectionToOptics(Scene): self.play(FadeInFromDown(e_group)) self.play( Write(arrows[0]), - FadeInFrom(c_group, LEFT) + FadeIn(c_group, LEFT) ) self.wait() self.play(FadeInFromDown(m_group)) self.play( Write(arrows[1]), - FadeInFrom(a_group, LEFT) + FadeIn(a_group, LEFT) ) self.wait(4) for k in range(2): @@ -281,15 +281,15 @@ class RearrangeMomentumEquation(ShowMomentumConservation): new_eq_group.target.next_to(new_dot_product, DOWN, LARGE_BUFF) self.play( - FadeInFrom(new_equation, UP), + FadeIn(new_equation, UP), simple_dot_product.to_edge, DOWN, LARGE_BUFF, ) self.wait() self.play( GrowFromCenter(x_brace), GrowFromCenter(y_brace), - FadeInFrom(dx_dt, UP), - FadeInFrom(dy_dt, UP), + FadeIn(dx_dt, UP), + FadeIn(dy_dt, UP), ) self.wait() self.play( diff --git a/from_3b1b/old/covid.py b/from_3b1b/old/covid.py index d0a8c0a0..8e3a68a4 100644 --- a/from_3b1b/old/covid.py +++ b/from_3b1b/old/covid.py @@ -408,7 +408,7 @@ class IntroQuestion(Scene): questions.arrange(DOWN, buff=MED_LARGE_BUFF, aligned_edge=LEFT) for question in questions: - self.play(FadeInFrom(question, RIGHT)) + self.play(FadeIn(question, RIGHT)) self.wait() self.play(LaggedStartMap( FadeOutAndShift, questions, @@ -556,7 +556,7 @@ class GrowthEquation(Scene): self.play(FadeIn(delta_N), FadeIn(eq)) self.play( GrowFromCenter(delta_N_brace), - FadeInFrom(delta_N_text, 0.5 * UP), + FadeIn(delta_N_text, 0.5 * UP), ) self.wait() self.play(LaggedStart( @@ -591,7 +591,7 @@ class GrowthEquation(Scene): self.play( FadeOut(delta_N_brace), FadeOut(delta_N_text), - FadeInFrom(lhs, UP), + FadeIn(lhs, UP), ) self.play(FadeIn(rhs[:2])) self.play(TransformFromCopy(nep, rhs[2])) @@ -632,7 +632,7 @@ class GrowthEquation(Scene): text.next_to(brace, DOWN) self.play( GrowFromCenter(brace), - FadeInFrom(text, 0.5 * UP) + FadeIn(text, 0.5 * UP) ) self.wait() @@ -673,7 +673,7 @@ class GrowthEquation(Scene): self.play( GrowArrow(arrow), - FadeInFrom(exp_eq, 2 * LEFT) + FadeIn(exp_eq, 2 * LEFT) ) self.wait() @@ -736,7 +736,7 @@ class GrowthEquation(Scene): self.play( ShowCreation(ep_rect), - FadeInFrom(ep_question, LEFT) + FadeIn(ep_question, LEFT) ) self.wait() for line in E_line, p_line: @@ -970,7 +970,7 @@ class RescaleToLogarithmic(IntroducePlot): rect.stretch(0, 0, about_edge=LEFT) self.play( Restore(rect), - FadeInFrom(label, LEFT) + FadeIn(label, LEFT) ) self.wait() @@ -979,7 +979,7 @@ class RescaleToLogarithmic(IntroducePlot): rect.stretch, 0, 0, {"about_edge": RIGHT}, remover=True, ), - FadeOutAndShift(label, RIGHT), + FadeOut(label, RIGHT), ] self.wait() @@ -1148,7 +1148,7 @@ class RescaleToLogarithmic(IntroducePlot): else: rect.save_state() rect.stretch(0, 0, about_edge=LEFT) - self.play(Restore(rect), FadeInFrom(label, LEFT)) + self.play(Restore(rect), FadeIn(label, LEFT)) self.wait() self.play( @@ -1161,7 +1161,7 @@ class RescaleToLogarithmic(IntroducePlot): self.wait() self.play( - FadeOutAndShift(last_label, RIGHT), + FadeOut(last_label, RIGHT), ApplyMethod( last_rect.stretch, 0, 0, {"about_edge": RIGHT}, remover=True @@ -1273,11 +1273,11 @@ class CompareCountries(Scene): alt_arrow_label.next_to(arrow, DOWN) self.play(ShowCreation(arrow)) - self.play(FadeInFrom(arrow_label, 0.5 * UP)) + self.play(FadeIn(arrow_label, 0.5 * UP)) self.wait(2) self.play( - FadeInFrom(alt_arrow_label, 0.5 * UP), - FadeOutAndShift(arrow_label, 0.5 * DOWN), + FadeIn(alt_arrow_label, 0.5 * UP), + FadeOut(arrow_label, 0.5 * DOWN), ) self.wait(2) @@ -1316,11 +1316,11 @@ class SARSvs1918(Scene): for image, title, label in zip(images, titles, n_cases_labels): self.play( - FadeInFrom(image, DOWN), + FadeIn(image, DOWN), Write(title), run_time=1, ) - self.play(FadeInFrom(label, UP)) + self.play(FadeIn(label, UP)) self.wait() @@ -1638,8 +1638,8 @@ class ShowLogisticCurve(Scene): label.add_to_back(arrow) self.play( - FadeInFrom(gf_label[0], RIGHT), - FadeInFrom(gf_label[1:], LEFT), + FadeIn(gf_label[0], RIGHT), + FadeIn(gf_label[1:], LEFT), FadeOut(ode) ) self.wait() diff --git a/from_3b1b/old/ctracing.py b/from_3b1b/old/ctracing.py index 1893ee4b..9974b7d8 100644 --- a/from_3b1b/old/ctracing.py +++ b/from_3b1b/old/ctracing.py @@ -59,7 +59,7 @@ class ExplainTracing(Scene): self.play( words[1].to_edge, UP, - FadeOutAndShift(words[0], 6 * UP) + FadeOut(words[0], 6 * UP) ) ct_word = words[1][0] @@ -99,7 +99,7 @@ class ExplainTracing(Scene): self.play( sicky.change, "sick", sicky.set_color, "#9BBD37", - FadeInFrom(covid_words, RIGHT), + FadeIn(covid_words, RIGHT), GrowArrow(arrow), ) self.play(ShowCreation(sicky.box)) @@ -149,7 +149,7 @@ class ExplainTracing(Scene): self.play( Write(implies), - FadeInFrom(loc_tracking, UP) + FadeIn(loc_tracking, UP) ) self.play(FadeIn(q_marks, lag_ratio=0.1)) self.wait() @@ -171,7 +171,7 @@ class ExplainTracing(Scene): self.play( ShowCreation(cross), - FadeOutAndShift(q_marks, RIGHT), + FadeOut(q_marks, RIGHT), FadeOut(lines), ) self.wait() @@ -221,7 +221,7 @@ class ContactTracingMisnomer(Scene): expl.set_color(color) self.play( - FadeInFrom(expl, -vect), + FadeIn(expl, -vect), GrowArrow(arrow), ShowCreation(rect), ) diff --git a/from_3b1b/old/dandelin.py b/from_3b1b/old/dandelin.py index d89482c1..e2c5abd8 100644 --- a/from_3b1b/old/dandelin.py +++ b/from_3b1b/old/dandelin.py @@ -67,7 +67,7 @@ class ThinkingAboutAProof(PiCreatureScene): self.add(bubble) self.play( - FadeInFrom(you, LEFT), + FadeIn(you, LEFT), GrowArrow(you_arrow), ) self.play( @@ -293,7 +293,7 @@ class StretchACircle(Scene): self.play( GrowArrow(xy_arrow), Write(xy), - FadeInFrom(start_point, UP), + FadeIn(start_point, UP), ) self.wait() self.add(circle_ghost) @@ -508,7 +508,7 @@ class ShowOrbits(ShowArrayOfEccentricities): eccentricity_label, lambda a: self.get_eccentricity(comet_orbit) ), - FadeOutAndShift(earth_orbit_words, UP), + FadeOut(earth_orbit_words, UP), FadeInFromDown(comet_orbit_words) ) self.add(orbiting_comet) @@ -753,8 +753,8 @@ class AskWhyAreTheyTheSame(TeacherStudentsScene): baby_morty.to_corner(DL) self.play( - FadeOutAndShift(bubble), - FadeOutAndShift(bubble.content), + FadeOut(bubble), + FadeOut(bubble.content), LaggedStartMap( FadeOutAndShift, self.students, lambda m: (m, 3 * DOWN), @@ -832,7 +832,7 @@ class TriangleOfEquivalences(Scene): run_time=3, )) self.wait() - self.play(FadeOutAndShift(arrows[1:])) + self.play(FadeOut(arrows[1:])) self.wait() @@ -869,7 +869,7 @@ class ShowMeasurementBook(TeacherStudentsScene): self.wait() self.play( GrowArrow(arrow), - FadeInFrom(words, RIGHT), + FadeIn(words, RIGHT), self.get_student_changes( "thinking", "happy", "pondering", look_at_arg=arrow @@ -1274,7 +1274,7 @@ class NameDandelin(Scene): self.play(FadeInFromDown(portrait)) self.play(Write(title[1])) self.wait() - self.play(FadeInFrom(google_result, LEFT)) + self.play(FadeIn(google_result, LEFT)) self.play(Write(cmon_google, run_time=1)) self.wait() @@ -1332,7 +1332,7 @@ class AskWhyYouWouldChooseThisProof(PiCreatureScene): for pi, mode in (randy, "hooray"), (other, "tired"): self.play( GrowArrow(pi.arrow), - FadeInFrom(pi.label, RIGHT), + FadeIn(pi.label, RIGHT), pi.change, mode, ) self.play( @@ -1390,7 +1390,7 @@ class CreativeConstruction(PiCreatureScene): {"buff": LARGE_BUFF, "aligned_edge": UP}, randy.change, "pondering", VFadeIn(randy), - FadeOutAndShift(dandelin, DOWN), + FadeOut(dandelin, DOWN), ) self.play( diff --git a/from_3b1b/old/div_curl.py b/from_3b1b/old/div_curl.py index 90731ce2..a65819fd 100644 --- a/from_3b1b/old/div_curl.py +++ b/from_3b1b/old/div_curl.py @@ -2216,7 +2216,7 @@ class ShearCurl(IntroduceCurl): twig, rate=-90 * DEGREES, ) - self.play(FadeInFrom(twig, UP)) + self.play(FadeIn(twig, UP)) self.add(twig_rotation) self.wait(16) @@ -3621,7 +3621,7 @@ class DivergenceTinyNudgesView(MovingCameraScene): ) self.add_foreground_mobjects(input_dot) self.play( - FadeInFrom(input_dot, SMALL_BUFF * DL), + FadeIn(input_dot, SMALL_BUFF * DL), Write(input_words), ) self.play( @@ -3924,13 +3924,13 @@ class DivergenceTinyNudgesView(MovingCameraScene): dot_product.fade, 1, remover=True ) - self.play(FadeInFrom(cross_product, sf * DOWN)) + self.play(FadeIn(cross_product, sf * DOWN)) self.play( div_text.shift, sf * DOWN, div_text.fade, 1, remover=True ) - self.play(FadeInFrom(curl_text, sf * DOWN)) + self.play(FadeIn(curl_text, sf * DOWN)) self.wait() def rotate_difference_vectors(self): @@ -4358,7 +4358,7 @@ class ThoughtsOnAds(Scene): self.play( FadeIn(left_text), - FadeInFrom(knob, 2 * RIGHT) + FadeIn(knob, 2 * RIGHT) ) self.wait() self.play( diff --git a/from_3b1b/old/for_flammy.py b/from_3b1b/old/for_flammy.py index fbd7045f..e8c10ad4 100644 --- a/from_3b1b/old/for_flammy.py +++ b/from_3b1b/old/for_flammy.py @@ -179,7 +179,7 @@ class SphereRings(SecondProof): ring.set_fill, {"opacity": 0.5}, ring.set_stroke, {"opacity": 0.1}, ShowCreation(R_line), - FadeInFrom(R_label, IN), + FadeIn(R_label, IN), ] ) self.wait() @@ -191,7 +191,7 @@ class SphereRings(SecondProof): self.wait() self.play( ShowCreation(r_line), - FadeInFrom(r_label, IN), + FadeIn(r_label, IN), ) self.wait() self.move_camera( @@ -267,7 +267,7 @@ class IntegralSymbols(Scene): self.add(int_sign) self.play( GrowFromCenter(area_brace), - FadeInFrom(area_text, UP), + FadeIn(area_text, UP), ) self.wait() self.play(FadeInFromDown(circumference)) @@ -283,7 +283,7 @@ class IntegralSymbols(Scene): circumference.shift, SMALL_BUFF * UR, GrowFromCenter(circum_brace), ) - self.play(FadeInFrom(circum_formula, UP)) + self.play(FadeIn(circum_formula, UP)) self.wait() self.play( thickness.next_to, circumference, RIGHT, MED_SMALL_BUFF, @@ -291,7 +291,7 @@ class IntegralSymbols(Scene): area_brace.stretch, 0.84, 0, {"about_edge": LEFT}, MaintainPositionRelativeTo(area_text, area_brace), ) - self.play(FadeInFrom(R_dtheta, UP)) + self.play(FadeIn(R_dtheta, UP)) self.wait() self.play(ReplacementTransform(all_rings, bounds)) self.wait() @@ -308,7 +308,7 @@ class IntegralSymbols(Scene): one = TexMobject("1") one.move_to(q_marks) - self.play(FadeInFrom(rhs, 4 * LEFT)) + self.play(FadeIn(rhs, 4 * LEFT)) self.wait() self.play(ShowCreationThenFadeAround(rhs[1])) self.wait() diff --git a/from_3b1b/old/hyperdarts.py b/from_3b1b/old/hyperdarts.py index 23e76e7f..660c4963 100644 --- a/from_3b1b/old/hyperdarts.py +++ b/from_3b1b/old/hyperdarts.py @@ -594,7 +594,7 @@ class ShowExampleHit(HyperdartScene): self.play( circle.set_color, DARK_GREY, TransformFromCopy(chord, chord_copy), - FadeInFrom(new_diam_word, UP) + FadeIn(new_diam_word, UP) ) self.play( Rotate(chord_copy, PI), @@ -2056,7 +2056,7 @@ class ExpectedValueFromBars(HistogramScene): self.add(mean_label) self.play( mean_label[1:].shift, LEFT, - FadeInFrom(equation, LEFT) + FadeIn(equation, LEFT) ) p_parts = VGroup() @@ -2140,7 +2140,7 @@ class ProbabilitySGtOne(HistogramScene): bars[0].set_opacity, 0.2, bars[1:].set_opacity, 0.8, ShowCreationThenFadeOut(outlines), - FadeInFrom(label, LEFT), + FadeIn(label, LEFT), ) self.wait() @@ -2174,7 +2174,7 @@ class ProbabilitySGtOne(HistogramScene): self.play( label.shift, shift_val, - FadeInFrom(rhs, LEFT) + FadeIn(rhs, LEFT) ) self.wait() @@ -2223,7 +2223,7 @@ class ProbabilitySGtOne(HistogramScene): self.play( MoveToTarget(new_label), - FadeInFrom(new_rhs, LEFT) + FadeIn(new_rhs, LEFT) ) self.wait() @@ -2372,7 +2372,7 @@ class VolumsOfNBalls(Scene): self.wait() self.play( FadeOut(braces[:3]), - FadeInFrom(gen_form, UP), + FadeIn(gen_form, UP), ) self.wait() @@ -2522,7 +2522,7 @@ class IntroduceGame(HyperdartScene): self.add(radius, self.circle_center_dot) self.play( ShowCreation(radius), - FadeInFrom(radius_label, RIGHT), + FadeIn(radius_label, RIGHT), FadeIn(self.circle_center_dot), ) self.play( @@ -2588,7 +2588,7 @@ class IntroduceGame(HyperdartScene): point = 0.2 * circle.point_from_proportion(3 / 8) self.play( FadeInFromDown(new_label), - FadeOutAndShift(label, UP), + FadeOut(label, UP), ) self.show_full_hit_process(point) self.wait() @@ -2666,8 +2666,8 @@ class ShowScoring(HyperdartScene): new_score = score.copy() new_score.increment_value(1) self.play( - FadeOutAndShift(score, UP), - FadeInFrom(new_score, DOWN), + FadeOut(score, UP), + FadeIn(new_score, DOWN), run_time=1, ) self.remove(new_score) @@ -2718,8 +2718,8 @@ class ShowSeveralRounds(ShowScoring): new_score.set_value(0) self.play( self.circle.match_width, self.square, - FadeOutAndShift(score, UP), - FadeInFrom(new_score, DOWN), + FadeOut(score, UP), + FadeIn(new_score, DOWN), ) score.set_value(0) self.add(score) @@ -2804,7 +2804,7 @@ class ShowUniformDistribution(HyperdartScene): def exchange_titles(self): self.play( FadeInFromDown(self.new_title), - FadeOutAndShift(self.title, UP), + FadeOut(self.title, UP), ) @@ -2821,6 +2821,6 @@ class ExpectedScoreEqualsQMark(Scene): self.play(Write(equation)) self.wait(2) - self.play(FadeInFrom(aka, UP)) + self.play(FadeIn(aka, UP)) self.wait() diff --git a/from_3b1b/old/lost_lecture.py b/from_3b1b/old/lost_lecture.py index d1f59f9c..88fc2894 100644 --- a/from_3b1b/old/lost_lecture.py +++ b/from_3b1b/old/lost_lecture.py @@ -198,7 +198,7 @@ class ShowEmergingEllipse(Scene): self.play(ShowCreation(circle)) self.play( - FadeInFrom(e_dot, LEFT), + FadeIn(e_dot, LEFT), Write(eccentric_words, run_time=1) ) self.wait() @@ -2772,7 +2772,7 @@ class FeynmanRecountingNewton(Scene): ) self.wait() self.play(*[ - FadeInFrom( + FadeIn( mob, direction=3 * LEFT ) for mob in (principia, principia.rect) diff --git a/from_3b1b/old/quat3d.py b/from_3b1b/old/quat3d.py index 28f62a72..ebe6b7ce 100644 --- a/from_3b1b/old/quat3d.py +++ b/from_3b1b/old/quat3d.py @@ -214,7 +214,7 @@ class Introduction(QuaternionHistory): self.wait() for image, name, quote in zip(images, names, quotes): self.play( - FadeInFrom(image, 3 * DOWN), + FadeIn(image, 3 * DOWN), FadeInFromLarge(name), LaggedStartMap( FadeIn, VGroup(*it.chain(*quote)), @@ -295,9 +295,9 @@ class WhoCares(TeacherStudentsScene): # self.play( # hn_quote.scale, 2, {"about_edge": DL}, - # FadeOutAndShift(quotes[0], 5 * UP), - # FadeOutAndShift(quotes[2], UR), - # FadeOutAndShift(quotes[3], RIGHT), + # FadeOut(quotes[0], 5 * UP), + # FadeOut(quotes[2], UR), + # FadeOut(quotes[3], RIGHT), # FadeInFromDown(hn_context), # ) # hn_rect = Rectangle( @@ -333,9 +333,9 @@ class WhoCares(TeacherStudentsScene): # t_quote.next_to(FRAME_WIDTH * LEFT / 2 + FRAME_WIDTH * UP / 2, UR) # t_quote.set_opacity(0) # self.play( - # FadeOutAndShift(hn_quote, 4 * LEFT), - # FadeOutAndShift(hn_rect, 4 * LEFT), - # FadeOutAndShift(hn_context, UP), + # FadeOut(hn_quote, 4 * LEFT), + # FadeOut(hn_rect, 4 * LEFT), + # FadeOut(hn_context, UP), # FadeOut(vr_headsets), # t_quote.set_opacity, 1, # t_quote.scale, 2, @@ -1068,9 +1068,9 @@ class ComplexNumberRotation(Scene): Write(parens) ) self.wait() - self.play(FadeInFrom(mid_line, UP)) + self.play(FadeIn(mid_line, UP)) self.wait() - self.play(FadeInFrom(low_line, UP)) + self.play(FadeIn(low_line, UP)) self.wait(2) self.play(FadeOut(self.unit_z_group)) self.rotation_mobs.save_state() diff --git a/from_3b1b/old/quaternions.py b/from_3b1b/old/quaternions.py index 6d2a12db..23cf1823 100644 --- a/from_3b1b/old/quaternions.py +++ b/from_3b1b/old/quaternions.py @@ -464,7 +464,7 @@ class ManyNumberSystems(Scene): R_label.move_to, 0.25 * FRAME_WIDTH * LEFT + 2 * UP, C_label.move_to, 0.25 * FRAME_WIDTH * RIGHT + 2 * UP, H_label.move_to, 0.75 * FRAME_WIDTH * RIGHT + 2 * UP, - FadeOutAndShift(systems[3:], 2 * DOWN), + FadeOut(systems[3:], 2 * DOWN), Write(number_line), Write(plane), GrowFromCenter(R_example_dot), @@ -711,16 +711,16 @@ class QuaternionHistory(Scene): aligned_edge=LEFT, ) - self.play(FadeInFrom(dot_product, 2 * RIGHT)) - self.play(FadeInFrom(cross_product, 2 * LEFT)) + self.play(FadeIn(dot_product, 2 * RIGHT)) + self.play(FadeIn(cross_product, 2 * LEFT)) self.wait() self.play(FadeInFromDown(date)) self.play(ApplyMethod(dot_product.fade, 0.7)) self.play(ApplyMethod(cross_product.fade, 0.7)) self.wait() self.play( - FadeOutAndShift(dot_product, 2 * LEFT), - FadeOutAndShift(cross_product, 2 * RIGHT), + FadeOut(dot_product, 2 * LEFT), + FadeOut(cross_product, 2 * RIGHT), ) self.date = date @@ -811,12 +811,12 @@ class QuaternionHistory(Scene): ) blink_wait(3) self.play( - FadeOutAndShift(hamilton, RIGHT), + FadeOut(hamilton, RIGHT), LaggedStartMap( FadeOutAndShift, images_with_labels, lambda m: (m, UP) ), - FadeOutAndShift(students, DOWN), + FadeOut(students, DOWN), FadeOut(society_title), run_time=1 ) @@ -924,7 +924,7 @@ class QuaternionHistory(Scene): for x in range(4): self.play(get_change_places()) self.play( - FadeOutAndShift(VGroup(title, author_brace, aka)), + FadeOut(VGroup(title, author_brace, aka)), FadeInFromDown(quote), ) self.play(get_change_places()) @@ -1148,7 +1148,7 @@ class HereWeTackle4d(TeacherStudentsScene): self.wait(3) self.play( self.teacher.change, "hooray", - FadeInFrom(titles[1]), + FadeIn(titles[1]), ApplyMethod( titles[0].shift, 2 * UP, rate_func=squish_rate_func(smooth, 0.2, 1) @@ -1882,7 +1882,7 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples): self.add(product[:-1]) self.play( ReplacementTransform(w_label[1][0].copy(), w_sym), - FadeInFrom(product[2], LEFT), + FadeIn(product[2], LEFT), FadeIn(product[0]), ) self.wait() @@ -2005,11 +2005,11 @@ class WalkThroughComplexMultiplication(ShowComplexMultiplicationExamples): rate_func=lambda t: there_and_back_with_pause(t, 2 / 9) ) self.wait() - self.play(FadeInFrom(pin, UL)) + self.play(FadeIn(pin, UL)) self.play(Write(zero_eq)) self.play( FadeInFromLarge(one_dot), - FadeInFrom(hand, UR) + FadeIn(hand, UR) ) self.play(Write(one_eq)) self.wait() @@ -2446,13 +2446,13 @@ class IntroduceStereographicProjection(MovingCameraScene): self.wait() dot.move_to(i_point) self.play(ShowCreation(dot)) - self.play(FadeInFrom(i_pin, UL)) + self.play(FadeIn(i_pin, UL)) self.wait() self.play( dot.move_to, neg_i_point, path_arc=-60 * DEGREES ) - self.play(FadeInFrom(neg_i_pin, UL)) + self.play(FadeIn(neg_i_pin, UL)) self.wait() self.play( dot.move_to, one_point, @@ -2888,7 +2888,7 @@ class ShowRotationUnderStereographicProjection(IntroduceStereographicProjection) lambda h: h.move_to(one_dot.get_center(), LEFT) ) self.play( - FadeInFrom(hand, RIGHT), + FadeIn(hand, RIGHT), FadeInFromLarge(one_dot, 3), ) for angle in 90 * DEGREES, -90 * DEGREES: @@ -3170,7 +3170,7 @@ class IntroduceThreeDNumbers(SpecialThreeDScene): ) self.begin_ambient_camera_rotation(rate=0.02) self.wait() - self.play(FadeInFrom(j_labels, IN)) + self.play(FadeIn(j_labels, IN)) z_axis.add(j_labels) self.play( ShowCreationThenDestruction(z_unit_line), @@ -3238,7 +3238,7 @@ class IntroduceThreeDNumbers(SpecialThreeDScene): self.add_fixed_in_frame_mobjects(number_label) self.play( ShowCreation(point_line), - FadeInFrom(dot, -coords), + FadeIn(dot, -coords), FadeInFromDown(number_label) ) self.wait() @@ -4219,7 +4219,7 @@ class IntroduceQuaternions(Scene): group = VGroup(numbers, labels) self.play( group.to_edge, UP, - FadeOutAndShift(self.three_axes, DOWN) + FadeOut(self.three_axes, DOWN) ) self.wait() @@ -4249,15 +4249,15 @@ class IntroduceQuaternions(Scene): ) self.wait() self.play( - FadeOutAndShift(real_word, DOWN), - FadeInFrom(scalar_word, DOWN), + FadeOut(real_word, DOWN), + FadeIn(scalar_word, DOWN), ) self.wait(2) self.play(ChangeDecimalToValue(real_part, 0)) self.wait() self.play( - FadeOutAndShift(imag_word, DOWN), - FadeInFrom(vector_word, DOWN) + FadeOut(imag_word, DOWN), + FadeIn(vector_word, DOWN) ) self.wait(2) @@ -4600,7 +4600,7 @@ class BreakUpQuaternionMultiplicationInParts(Scene): self.wait() self.play( GrowFromCenter(rotate_brace), - FadeInFrom(rotate_words, UP), + FadeIn(rotate_words, UP), ) self.play( Rotate( @@ -4944,7 +4944,7 @@ class HypersphereStereographicProjection(SpecialThreeDScene): # Show xy plane self.play( - FadeOutAndShift(circle_words, DOWN), + FadeOut(circle_words, DOWN), FadeInFromDown(sphere_1ij_words), FadeOut(circle), sphere_ijk.set_stroke, {"width": 0.0} @@ -4955,7 +4955,7 @@ class HypersphereStereographicProjection(SpecialThreeDScene): # Show yz plane self.play( - FadeOutAndShift(sphere_1ij_words, DOWN), + FadeOut(sphere_1ij_words, DOWN), FadeInFromDown(sphere_1jk_words), sphere_1ij.set_fill, BLUE_E, 0.25, sphere_1ij.set_stroke, {"width": 0.0}, @@ -4965,7 +4965,7 @@ class HypersphereStereographicProjection(SpecialThreeDScene): # Show xz plane self.play( - FadeOutAndShift(sphere_1jk_words, DOWN), + FadeOut(sphere_1jk_words, DOWN), FadeInFromDown(sphere_1ik_words), sphere_1jk.set_fill, GREEN_E, 0.25, sphere_1jk.set_stroke, {"width": 0.0}, @@ -5148,11 +5148,11 @@ class RuleOfQuaternionMultiplicationOverlay(Scene): self.add(q_times_p) self.play( - FadeInFrom(q_words, UP), + FadeIn(q_words, UP), GrowArrow(q_arrow), ) self.play( - FadeInFrom(p_words, DOWN), + FadeIn(p_words, DOWN), GrowArrow(p_arrow), ) self.wait() @@ -5162,7 +5162,7 @@ class RuleOfQuaternionMultiplicationOverlay(Scene): ])) self.play( FadeInFromDown(i_mob), - FadeOutAndShift(q_mob, UP) + FadeOut(q_mob, UP) ) product = VGroup(i_mob, times_mob, p_mob) self.play(product.to_edge, UP) @@ -5841,14 +5841,14 @@ class ShowArbitraryMultiplication(ShowMultiplicationBy135Example): self.stop_ambient_camera_rotation() self.begin_ambient_camera_rotation(rate=0.02) self.set_quat(special_q) - self.play(FadeInFrom(label, IN)) + self.play(FadeIn(label, IN)) self.wait(3) for circle in [circle1, circle2]: self.play(ShowCreation(circle, run_time=3)) circle.updaters = circle.tucked_away_updaters self.wait(2) self.play( - FadeInFrom(hand, 2 * IN + 2 * RIGHT), + FadeIn(hand, 2 * IN + 2 * RIGHT), run_time=2 ) hand.add_updater( @@ -5896,7 +5896,7 @@ class MentionCommutativity(TeacherStudentsScene): self.teacher.change, "raise_right_hand", self.get_student_changes("erm", "confused", "sassy") ) - self.play(FadeInFrom(words, RIGHT)) + self.play(FadeIn(words, RIGHT)) self.wait(2) self.play( ReplacementTransform(words, joke), @@ -5907,7 +5907,7 @@ class MentionCommutativity(TeacherStudentsScene): self.look_at(self.screen) self.wait(3) self.play( - FadeInFrom(ji_eq), + FadeIn(ji_eq), LaggedStartMap( ApplyMethod, VGroup(ij_eq, general_eq), lambda m: (m.shift, UP), @@ -5977,11 +5977,11 @@ class RotationsOfCube(SpecialThreeDScene): self.add(axes, cube) self.play( Rotate(cube, 90 * DEGREES, OUT, run_time=2), - FadeInFrom(label1[0], IN), + FadeIn(label1[0], IN), ) self.play( Rotate(cube, 90 * DEGREES, RIGHT, run_time=2), - FadeInFrom(label1[1], IN), + FadeIn(label1[1], IN), ) self.wait() self.play( @@ -5991,11 +5991,11 @@ class RotationsOfCube(SpecialThreeDScene): ) self.play( Rotate(cube2, 90 * DEGREES, RIGHT, run_time=2), - FadeInFrom(label2[0], IN), + FadeIn(label2[0], IN), ) self.play( Rotate(cube2, 90 * DEGREES, OUT, run_time=2), - FadeInFrom(label2[1], IN), + FadeIn(label2[1], IN), ) self.wait(5) @@ -6196,7 +6196,7 @@ class ShareWithFriends(PiCreatureScene): self.play( Animation(VectorizedPoint().next_to(pi1, UL, LARGE_BUFF)), pi2.change, "sad", - FadeOutAndShift(bubble.content, DOWN), + FadeOut(bubble.content, DOWN), FadeInFromDown(time_words, DOWN), ) self.wait(7) diff --git a/from_3b1b/old/sir.py b/from_3b1b/old/sir.py index 66515786..8ab210ce 100644 --- a/from_3b1b/old/sir.py +++ b/from_3b1b/old/sir.py @@ -1866,8 +1866,8 @@ class DescribeModel(Scene): removed.move_to(words[2], DL) self.play( - FadeOutAndShift(words[2], UP), - FadeInFrom(removed, DOWN), + FadeOut(words[2], UP), + FadeIn(removed, DOWN), ) self.play( i_pi.body.change, 'pleading', removed, @@ -2114,7 +2114,7 @@ class KeyTakeaways(Scene): Restore(title), FadeIn(other_titles), Uncreate(temp_h_line), - FadeOutAndShift(takeaway, DOWN, lag_ratio=0.25 / len(takeaway.family_members_with_points())) + FadeOut(takeaway, DOWN, lag_ratio=0.25 / len(takeaway.family_members_with_points())) ) self.wait() @@ -2285,7 +2285,7 @@ class FastForwardBy2(Scene): FadeInFrom, triangles, lambda m: (m, 0.4 * LEFT), ), - FadeInFrom(label, 0.2 * LEFT), + FadeIn(label, 0.2 * LEFT), run_time=1, ) self.play( @@ -2420,14 +2420,14 @@ class SARS2002(TeacherStudentsScene): self.play( self.teacher.change, "raise_right_hand", - FadeInFrom(image, DOWN, run_time=2), + FadeIn(image, DOWN, run_time=2), self.get_student_changes( "pondering", "thinking", "pondering", look_at_arg=image, ) ) self.play( - FadeInFrom(name, RIGHT), + FadeIn(name, RIGHT), ) self.play( GrowArrow(arrow), @@ -2593,7 +2593,7 @@ class IntroduceR0(Scene): name.to_edge(LEFT) self.play( GrowFromCenter(brace), - FadeInFrom(name, 0.5 * UP), + FadeIn(name, 0.5 * UP), ) self.wait(5) @@ -2609,10 +2609,10 @@ class IntroduceR0(Scene): pi.set_status("S") self.play( - FadeOutAndShift(R_label[1], UP), - FadeOutAndShift(name, UP), - FadeInFrom(R0, DOWN), - FadeInFrom(brr, DOWN), + FadeOut(R_label[1], UP), + FadeOut(name, UP), + FadeIn(R0, DOWN), + FadeIn(brr, DOWN), FadeOut(zeros), FadeOut(count_copy), brace.match_width, R0, {"stretch": True}, @@ -2682,14 +2682,14 @@ class HowR0IsCalculatedHere(Scene): self.play(Restore(words)) self.wait() self.play( - FadeOutAndShift(words[0][0], UP), - FadeInFrom(estimate, DOWN), + FadeOut(words[0][0], UP), + FadeIn(estimate, DOWN), ) self.wait() self.play( Write(parens), - FadeInFrom(average, 0.5 * RIGHT), + FadeIn(average, 0.5 * RIGHT), self.camera.frame.shift, LEFT, ) self.wait() @@ -2745,7 +2745,7 @@ class DoubleInfectionRadius(Scene): circ.dot = dots anims = [ShowIncreasingSubsets(dots)] if hasattr(circ, "label"): - anims.append(FadeInFrom(circ.label, 0.5 * UP)) + anims.append(FadeIn(circ.label, 0.5 * UP)) self.play(*anims) self.wait() @@ -2837,7 +2837,7 @@ class R0Categories(Scene): for line in line_row: anims.append(ShowCreation(line)) self.play(*anims) - self.play(FadeInFrom(names[0], UP)) + self.play(FadeIn(names[0], UP)) self.wait() exp_tree = VGroup(rows, lines) @@ -2865,7 +2865,7 @@ class R0Categories(Scene): TransformFromCopy(dot, dot.child), ShowCreation(line) ) - self.play(FadeInFrom(names[1], UP)) + self.play(FadeIn(names[1], UP)) self.wait() # Inverted tree @@ -2874,7 +2874,7 @@ class R0Categories(Scene): exp_tree_copy.match_x(titles[2]) self.play(TransformFromCopy(exp_tree, exp_tree_copy)) - self.play(FadeInFrom(names[2], UP)) + self.play(FadeIn(names[2], UP)) self.wait() @@ -2901,8 +2901,8 @@ class RealR0Estimates(Scene): for label, image in zip(labels, images): self.play( - FadeInFrom(image, DOWN), - FadeInFrom(label, UP), + FadeIn(image, DOWN), + FadeIn(label, UP), ) self.wait() diff --git a/from_3b1b/old/sphere_area.py b/from_3b1b/old/sphere_area.py index 632c710b..c718209d 100644 --- a/from_3b1b/old/sphere_area.py +++ b/from_3b1b/old/sphere_area.py @@ -138,7 +138,7 @@ class AskAboutShadowRelation(SpecialThreeDScene): Write(sphere, stroke_width=1), FadeInFromDown(sa_equation), # ShowCreation(radial_line), - # FadeInFrom(R_label, IN), + # FadeIn(R_label, IN), ) # self.play( # Transform( @@ -459,12 +459,12 @@ class MapSphereOntoCylinder(SphereCylinderScene): self.play( ShowCreation(top_line), - FadeInFrom(two_pi_R, IN) + FadeIn(two_pi_R, IN) ) self.wait() self.play( ShowCreation(side_line), - FadeInFrom(two_R, RIGHT) + FadeIn(two_R, RIGHT) ) self.wait() @@ -1167,7 +1167,7 @@ class JustifyLengthStretch(ShowProjection): self.add_fixed_orientation_mobjects(R_label) self.play( ShowCreation(R_line), - FadeInFrom(R_label, IN), + FadeIn(R_label, IN), ) self.wait() @@ -1189,7 +1189,7 @@ class JustifyLengthStretch(ShowProjection): self.add_fixed_orientation_mobjects(d_label) self.play( ShowCreation(d_line), - FadeInFrom(d_label, IN), + FadeIn(d_label, IN), ) self.wait() for x in range(self.d_ambiguity_iterations): @@ -1263,7 +1263,7 @@ class JustifyLengthStretch(ShowProjection): ) self.add_fixed_in_frame_mobjects(equation, eq_d, eq_R) self.play( - FadeInFrom(equation[0], 7 * RIGHT + 2.5 * DOWN), + FadeIn(equation[0], 7 * RIGHT + 2.5 * DOWN), FadeIn(equation[1:]), FadeInFromDown(eq_d), FadeInFromDown(eq_R), @@ -1751,9 +1751,9 @@ class JustifyHeightSquish(MovingCameraScene): ShowCreation(beta_arc), ) self.wait() - self.play(FadeInFrom(alpha_label, UP)) + self.play(FadeIn(alpha_label, UP)) self.wait() - self.play(FadeInFrom(beta_label, LEFT)) + self.play(FadeIn(beta_label, LEFT)) self.wait() self.play(ShowCreation(elbow)) self.wait() @@ -1763,7 +1763,7 @@ class JustifyHeightSquish(MovingCameraScene): LaggedStartMap(FadeInFromDown, equation[1:4:2]) ) self.wait() - self.play(FadeInFrom(equation[-2:], LEFT)) + self.play(FadeIn(equation[-2:], LEFT)) self.remove(equation, movers) self.add(equation) self.wait() @@ -1847,13 +1847,13 @@ class JustifyHeightSquish(MovingCameraScene): beta_label1.shift(0.01 * LEFT) self.play(FadeOut(words)) - self.play(FadeInFrom(deg90, 0.1 * UP)) + self.play(FadeIn(deg90, 0.1 * UP)) self.wait(0.25) self.play(WiggleOutThenIn(beta_label)) self.wait(0.25) self.play( ShowCreation(alpha_arc1), - FadeInFrom(q_mark, 0.1 * RIGHT) + FadeIn(q_mark, 0.1 * RIGHT) ) self.wait() self.play(ShowPassingFlash( @@ -2291,8 +2291,8 @@ class SequenceOfSpheres(SphereCylinderScene): for i in range(n_shapes): anims = [ - FadeInFrom(spheres[i], LEFT), - FadeInFrom(cylinders[i], LEFT), + FadeIn(spheres[i], LEFT), + FadeIn(cylinders[i], LEFT), ] if i > 0: anims += [ @@ -2302,7 +2302,7 @@ class SequenceOfSpheres(SphereCylinderScene): self.play(*anims, run_time=1) self.play(GrowFromCenter(all_equals[i])) self.play( - FadeInFrom(q_marks, LEFT), + FadeIn(q_marks, LEFT), Write(final_arrows) ) self.wait() @@ -2699,7 +2699,7 @@ class ExercisesGiveLearning(MovingCameraScene): self.play(ShowCreation(cross)) self.play( VGroup(lectures, cross).shift, DOWN, - FadeInFrom(exercises, UP) + FadeIn(exercises, UP) ) self.wait() @@ -3010,7 +3010,7 @@ class SecondProof(SpecialThreeDScene): ) self.wait() self.play( - FadeInFrom(brace_label, IN), + FadeIn(brace_label, IN), ) self.play( ShowCreation(radial_line), @@ -3335,7 +3335,7 @@ class Question1(Scene): word.circum = word.get_part_by_tex("circumference") word.remove(word.circum) self.play( - FadeOutAndShift(question, UP), + FadeOut(question, UP), FadeInFromDown(prompt), question.circum.replace, prompt.circum, run_time=1.5 @@ -3394,7 +3394,7 @@ class Question3(Scene): which_one.next_to(brace, DOWN, SMALL_BUFF) self.add(question) - self.play(FadeInFrom(equation)) + self.play(FadeIn(equation)) self.wait() self.play( GrowFromCenter(brace), diff --git a/from_3b1b/old/spirals.py b/from_3b1b/old/spirals.py index f7efa9d6..32635c24 100644 --- a/from_3b1b/old/spirals.py +++ b/from_3b1b/old/spirals.py @@ -247,7 +247,7 @@ class MathExchangeNames(Scene): ) names.arrange(DOWN, buff=1) for name in names: - self.play(FadeInFrom(name, RIGHT)) + self.play(FadeIn(name, RIGHT)) self.wait() @@ -511,7 +511,7 @@ class RefresherOnPolarCoordinates(MovingCameraScene): self.play(ShowCreation(degree_cross)) self.play( - FadeOutAndShift( + FadeOut( VGroup(degree_label, degree_cross), DOWN ), @@ -1074,10 +1074,10 @@ class AskAboutRelationToPrimes(TeacherStudentsScene): ), self.teacher.change, "maybe", numbers, ShowCreation(arrow), - FadeInFrom(numbers, RIGHT) + FadeIn(numbers, RIGHT) ) self.play( - FadeInFrom(primes, LEFT), + FadeIn(primes, LEFT), ) self.play( LaggedStartMap(FadeInFromDown, q_marks[0]), @@ -1210,7 +1210,7 @@ class JustPrimesLabel(Scene): text.to_corner(UL) self.play(Write(text)) self.wait(3) - self.play(FadeOutAndShift(text, DOWN)) + self.play(FadeOut(text, DOWN)) class DirichletComingUp(Scene): @@ -1228,8 +1228,8 @@ class DirichletComingUp(Scene): Group(words, image).center() self.play( - FadeInFrom(image, RIGHT), - FadeInFrom(words, LEFT), + FadeIn(image, RIGHT), + FadeIn(words, LEFT), ) self.wait() @@ -1781,7 +1781,7 @@ class IntroduceResidueClassTerminology(Scene): underline.set_color(BLUE) self.play( ReplacementTransform(pre_title[0], title[1]), - FadeInFrom(title[0], RIGHT), + FadeIn(title[0], RIGHT), GrowFromCenter(underline) ) self.play( @@ -1961,7 +1961,7 @@ class IntroduceResidueClassTerminology(Scene): self.play( FadeOut(new_phrase), FadeIn(terminology), - FadeOutAndShift(randy, DOWN) + FadeOut(randy, DOWN) ) self.wait() self.wait(6) @@ -2146,7 +2146,7 @@ class Explain44Spirals(ExplainSixSpirals): self.play(MoveToTarget(ff)) top_line.add(ff) - self.play(FadeInFrom(radians, LEFT)) + self.play(FadeIn(radians, LEFT)) self.wait() self.add(rect, top_line, unit_conversion) self.play( @@ -2560,7 +2560,7 @@ class IntroduceTotientJargon(TeacherStudentsScene): MoveToTarget(words), FadeOut(self.teacher.bubble), LaggedStart(*[ - FadeOutAndShift(pi, 4 * DOWN) + FadeOut(pi, 4 * DOWN) for pi in self.pi_creatures ]), ShowCreation(underline) @@ -2607,7 +2607,7 @@ class IntroduceTotientJargon(TeacherStudentsScene): # Show coprimes self.play( ShowIncreasingSubsets(numbers, run_time=3), - FadeInFrom(words, LEFT) + FadeIn(words, LEFT) ) self.wait() for group in evens, div11: @@ -2728,7 +2728,7 @@ class IntroduceTotientJargon(TeacherStudentsScene): self.play( GrowFromCenter(brace), - FadeInFrom(etf, UP) + FadeIn(etf, UP) ) self.wait() self.play( @@ -2870,7 +2870,7 @@ class TwoUnrelatedFacts(Scene): self.play(ShowCreation(v_line)) self.wait() - self.play(FadeInFrom(approx, DOWN)) + self.play(FadeIn(approx, DOWN)) self.wait() self.play(FadeIn(residue_classes)) self.wait() @@ -2967,7 +2967,7 @@ class ExplainRays(Explain44Spirals): FadeIn(fade_rect), FadeOut(labels), FadeInFromLarge(box_710), - FadeInFrom(label_710, DOWN), + FadeIn(label_710, DOWN), ShowCreation(arrow), ) self.wait() @@ -3018,7 +3018,7 @@ class ExplainRays(Explain44Spirals): FadeIn(equation[1:3]), ) self.play( - FadeInFrom(equation[3:], LEFT) + FadeIn(equation[3:], LEFT) ) self.play(GrowFromCenter(brace)) self.play( @@ -3204,8 +3204,8 @@ class CompareTauToApprox(Scene): eq.set_stroke(BLACK, 8, background=True) self.play(LaggedStart( - FadeInFrom(eqs[0], DOWN), - FadeInFrom(eqs[1], UP), + FadeIn(eqs[0], DOWN), + FadeIn(eqs[1], UP), )) self.play(MoveToTarget(eqs)) self.wait() @@ -3376,12 +3376,12 @@ class LookAtRemainderMod710(Scene): self.add(equation) self.play( - FadeInFrom(n_label, UP), + FadeIn(n_label, UP), ShowCreation(n_arrow), ) self.wait() self.play( - FadeInFrom(r_label, DOWN), + FadeIn(r_label, DOWN), ShowCreation(r_arrow), ) self.wait() @@ -3564,14 +3564,14 @@ class DiscussPrimesMod10(Scene): # Introduce everything self.play(LaggedStart(*[ - FadeInFrom(label, UP) + FadeIn(label, UP) for label in labels ])) self.wait() self.play( LaggedStart(*[ LaggedStart(*[ - FadeInFrom(item, LEFT) + FadeIn(item, LEFT) for item in sequence ]) for sequence in sequences @@ -3895,8 +3895,8 @@ class PhraseDirichletsTheoremFor10(TeacherStudentsScene): Write(rp), Write(eq), ) - self.play(FadeInFrom(fourth, LEFT)) - self.play(FadeInFrom(lim, RIGHT)) + self.play(FadeIn(fourth, LEFT)) + self.play(FadeIn(lim, RIGHT)) self.play( ChangeDecimalToValue( x_example[1], int(1e7), @@ -3920,7 +3920,7 @@ class InsertNewResidueClasses(Scene): for num, color in zip(nums, colors): num.set_color(color) num.add_background_rectangle(buff=SMALL_BUFF, opacity=1) - self.play(FadeInFrom(num, UP)) + self.play(FadeIn(num, UP)) self.wait() @@ -3997,7 +3997,7 @@ class DirichletIn1837(MovingCameraScene): image = ImageMobject("Dirichlet") image.set_height(3) image.next_to(d_label, LEFT) - self.play(FadeInFrom(image, RIGHT)) + self.play(FadeIn(image, RIGHT)) self.wait() # Flash @@ -4117,12 +4117,12 @@ class PhraseDirichletsTheorem(DirichletIn1837): self.play(ShowCreationThenFadeAround(mob)) self.wait() self.play( - FadeInFrom(r, DOWN), - FadeOutAndShift(one, UP), + FadeIn(r, DOWN), + FadeOut(one, UP), ) self.play( - FadeInFrom(N, DOWN), - FadeOutAndShift(ten, UP), + FadeIn(N, DOWN), + FadeOut(ten, UP), ) self.wait() self.play( @@ -4143,13 +4143,13 @@ class PhraseDirichletsTheorem(DirichletIn1837): ShowCreationThenFadeAround(fourth), ) self.play( - FadeInFrom(one_over_phi_N[2:], LEFT), - FadeOutAndShift(four, RIGHT), + FadeIn(one_over_phi_N[2:], LEFT), + FadeOut(four, RIGHT), ReplacementTransform(fourth[0], one_over_phi_N[0][0]), ReplacementTransform(fourth[1], one_over_phi_N[1][0]), ) self.play( - FadeInFrom(phi_N_label, DOWN) + FadeIn(phi_N_label, DOWN) ) self.wait() @@ -4570,7 +4570,7 @@ class RandomWalkOfTopics(Scene): Restore(title[0]), GrowFromCenter(title[1]), FadeIn(arrow_words), - FadeInFrom(title[2], LEFT), + FadeIn(title[2], LEFT), LaggedStartMap( ShowCreation, sd.edges, run_time=3, diff --git a/from_3b1b/old/turbulence.py b/from_3b1b/old/turbulence.py index 6c8f6f2e..b0657a99 100644 --- a/from_3b1b/old/turbulence.py +++ b/from_3b1b/old/turbulence.py @@ -969,8 +969,8 @@ class FeynmanOnTurbulence(Scene): Group(feynman, name, quote).center() self.play( - FadeInFrom(feynman, UP), - FadeInFrom(name, DOWN), + FadeIn(feynman, UP), + FadeIn(name, DOWN), Write(quote, run_time=4) ) self.wait() @@ -1292,7 +1292,7 @@ class KineticEnergyBreakdown(Scene): ) self.wait() for item in left_items: - self.play(FadeInFrom(item)) + self.play(FadeIn(item)) self.wait() @@ -1378,7 +1378,7 @@ class Poem(Scene): poem.next_to(picture, RIGHT, LARGE_BUFF) self.add(picture) - self.play(FadeInFrom(title, DOWN)) + self.play(FadeIn(title, DOWN)) self.wait() for word in poem: if "whirl" in word.get_tex_string(): @@ -1415,7 +1415,7 @@ class SwirlDiameterD(Scene): self.play(*map(ShowCreation, swirl)) self.play( GrowFromCenter(h_line), - FadeInFrom(D_label, UP), + FadeIn(D_label, UP), ) self.wait() @@ -1540,7 +1540,7 @@ class TurbulenceGifLabel(Scene): attribution.to_edge(DOWN) self.play(Write(title)) - self.play(FadeInFrom(attribution, UP)) + self.play(FadeIn(attribution, UP)) self.wait() diff --git a/from_3b1b/old/wallis.py b/from_3b1b/old/wallis.py index 890e0c30..cbd08f19 100644 --- a/from_3b1b/old/wallis.py +++ b/from_3b1b/old/wallis.py @@ -2061,7 +2061,7 @@ class PlugObserverIntoPolynomial(DistanceProductScene): ] self.play( - FadeInFrom(observer, direction=-vect), + FadeIn(observer, direction=-vect), GrowArrow(arrow) ) self.play(Write(full_name)) @@ -4181,7 +4181,7 @@ class HowThisArgumentRequiresCommunitingLimits(PiCreatureScene): ) self.play( GrowArrow(result_limit_arrow), - FadeInFrom(result_limit, direction=UP), + FadeIn(result_limit, direction=UP), morty.change, "confused", ) self.wait(2) @@ -4447,7 +4447,7 @@ class DelicacyInIntermixingSeries(Scene): for product in products: self.play( GrowArrow(product.arrow), - FadeInFrom(product.limit, direction=LEFT) + FadeIn(product.limit, direction=LEFT) ) self.wait() self.play( @@ -4518,7 +4518,7 @@ class DelicacyInIntermixingSeries(Scene): ) self.play( GrowArrow(new_arrow), - FadeInFrom(new_limit, LEFT), + FadeIn(new_limit, LEFT), bottom_product.parts[3:].fade, 1, ) self.play(FadeIn(randy)) diff --git a/from_3b1b/old/windmill.py b/from_3b1b/old/windmill.py index 06cff945..65eebd9b 100644 --- a/from_3b1b/old/windmill.py +++ b/from_3b1b/old/windmill.py @@ -155,7 +155,7 @@ class IntroduceIMO(Scene): self.play( LaggedStart( *[ - FadeOutAndShift(flag, DOWN) + FadeOut(flag, DOWN) for flag in random_flags ], lag_ratio=0.05, @@ -299,7 +299,7 @@ class ShowTinyTao(IntroduceIMO): class FootnoteToIMOIntro(Scene): def construct(self): words = TextMobject("$^*$Based on data from 2019 test") - self.play(FadeInFrom(words, UP)) + self.play(FadeIn(words, UP)) self.wait() @@ -361,20 +361,20 @@ class ShowTest(Scene): # Introduce test self.play( LaggedStart( - FadeInFrom(test[0], 2 * RIGHT), - FadeInFrom(test[1], 2 * LEFT), + FadeIn(test[0], 2 * RIGHT), + FadeIn(test[1], 2 * LEFT), lag_ratio=0.3, ) ) self.wait() self.play( MoveToTarget(test, lag_ratio=0.2), - FadeInFrom(day_labels, UP, lag_ratio=0.2), + FadeIn(day_labels, UP, lag_ratio=0.2), ) self.wait() self.play( *map(Restore, day_labels), - FadeInFrom(hour_labels, LEFT), + FadeIn(hour_labels, LEFT), ) self.wait() @@ -387,7 +387,7 @@ class ShowTest(Scene): ) self.play( LaggedStart(*[ - FadeInFrom(word, LEFT) + FadeIn(word, LEFT) for word in proof_words ]), LaggedStart(*[ @@ -746,7 +746,7 @@ class Describe2011IMO(IntroduceIMO): group.shift(LEFT) self.add(group) - self.play(FadeInFrom(year, RIGHT)) + self.play(FadeIn(year, RIGHT)) self.title = group @@ -865,7 +865,7 @@ class Describe2011IMO(IntroduceIMO): self.play( randy.change, "thinking", LaggedStart(*[ - FadeInFrom(word, UP) + FadeIn(word, UP) for word in words ], run_time=3, lag_ratio=0.5) ) @@ -922,7 +922,7 @@ class Describe2011IMO(IntroduceIMO): self.wait() self.play( LaggedStart(*[ - FadeInFrom(row, UP) + FadeIn(row, UP) for row in grid.rows[2:4] ]), LaggedStart(*[ @@ -940,8 +940,8 @@ class Describe2011IMO(IntroduceIMO): self.wait() student_counter.clear_updaters() self.play( - FadeOutAndShift(self.title, UP), - FadeOutAndShift(student_counter, UP), + FadeOut(self.title, UP), + FadeOut(student_counter, UP), grid.rows[:4].shift, 3 * UP, grid.h_lines[:3].shift, 3 * UP, ) @@ -1072,7 +1072,7 @@ class AskWhatsOnTest(ShowTest, MovingCameraScene): ) self.wait() self.play( - FadeInFrom(research, DOWN), + FadeIn(research, DOWN), question.shift, 2 * UP, ) self.wait() @@ -1474,8 +1474,8 @@ class IntroduceWindmill(WindmillScene): self.play( FadeIn(S_eq), - FadeInFrom(braces[0], RIGHT), - FadeInFrom(braces[1], LEFT), + FadeIn(braces[0], RIGHT), + FadeIn(braces[1], LEFT), ) self.play( LaggedStartMap(FadeInFromLarge, dots) @@ -1506,7 +1506,7 @@ class IntroduceWindmill(WindmillScene): self.add(line, dots) self.play( ShowCreation(line), - FadeInFrom(words, LEFT), + FadeIn(words, LEFT), dots[-1].set_color, RED, ) self.wait() @@ -1515,7 +1515,7 @@ class IntroduceWindmill(WindmillScene): FadeOut(words), ) self.play( - FadeOutAndShift( + FadeOut( dots[-1], 3 * RIGHT, path_arc=-PI / 4, rate_func=running_start, @@ -1557,7 +1557,7 @@ class IntroduceWindmill(WindmillScene): self.add(windmill, dots) self.play( GrowFromCenter(windmill), - FadeInFrom(l_label, DL), + FadeIn(l_label, DL), ) self.wait() self.play( @@ -1606,7 +1606,7 @@ class IntroduceWindmill(WindmillScene): self.rotate_to_next_pivot(windmill) self.play( - FadeInFrom(q_label, LEFT), + FadeIn(q_label, LEFT), FadeOut(p_label), FadeOut(arcs), ) @@ -1635,8 +1635,8 @@ class IntroduceWindmill(WindmillScene): buff=SMALL_BUFF, ) - self.play(FadeInFrom(p_label, UL)) - self.play(FadeInFrom(l_label, LEFT)) + self.play(FadeIn(p_label, UL)) + self.play(FadeIn(l_label, LEFT)) self.wait() self.add( @@ -1845,7 +1845,7 @@ class HarderThanExpected(TeacherStudentsScene): ) self.wait() self.play( - FadeInFrom(words, UP), + FadeIn(words, UP), self.get_student_changes(*3 * ["horrified"]), ) self.wait(3) @@ -1895,7 +1895,7 @@ class TraditionalDifficulty(ContrastToOtherOlympiadProblems): self.play( FadeIn(harder_words), GrowArrow(arrow), - LaggedStart(*[FadeInFrom(p, UP) for p in p_labels[:3]]), + LaggedStart(*[FadeIn(p, UP) for p in p_labels[:3]]), LaggedStartMap(ShowCreation, rects[:3]), ) self.wait() @@ -1920,16 +1920,16 @@ class TraditionalDifficulty(ContrastToOtherOlympiadProblems): Transform(big_rect, big_rects[1]), FadeOut(p_labels[0::3]), FadeIn(p_labels[1::3]), - FadeOutAndShift(p_words[0::3], DOWN), - FadeInFrom(p_words[1::3], UP), + FadeOut(p_words[0::3], DOWN), + FadeIn(p_words[1::3], UP), ) self.wait() self.play( Transform(big_rect, big_rects[2]), FadeOut(p_labels[1::3]), FadeIn(p_labels[2::3]), - FadeOutAndShift(p_words[1::3], DOWN), - FadeInFrom(p_words[2::3], UP), + FadeOut(p_words[1::3], DOWN), + FadeIn(p_words[2::3], UP), ) self.wait() @@ -2136,14 +2136,14 @@ class SixOnSix(Describe2011IMO): self.play( Write(title), - LaggedStart(*[FadeInFrom(row, UP) for row in grid.rows]), + LaggedStart(*[FadeIn(row, UP) for row in grid.rows]), LaggedStart(*[ShowCreation(line) for line in grid.h_lines]), ) self.play(ShowCreation(six_rect)) self.wait() self.play( ReplacementTransform(six_rect, two_rect), - FadeInFrom(subtitle, UP) + FadeIn(subtitle, UP) ) self.wait() @@ -2215,7 +2215,7 @@ class TryOutSimplestExamples(WindmillScene): # Shift point self.play( dot.next_to, words, DOWN, - FadeInFrom(words, RIGHT), + FadeIn(words, RIGHT), ) windmill.point_set[3] = dot.get_center() self.let_windmill_run(windmill, 4) @@ -2239,7 +2239,7 @@ class TryOutSimplestExamples(WindmillScene): counters = self.get_pivot_counters(windmill) self.play( LaggedStart(*[ - FadeInFrom(counter, DOWN) + FadeIn(counter, DOWN) for counter in counters ]) ) @@ -2329,14 +2329,14 @@ class WhereItStartsItEnds(WindmillScene): self.play( ShowCreation(windmill), GrowFromCenter(pivot_dot), - FadeInFrom(start_words, LEFT), + FadeIn(start_words, LEFT), ) self.wait() self.start_leaving_shadows() self.add(windmill, dots, pivot_dot) half_time = PI / windmill.rot_speed self.let_windmill_run(windmill, time=half_time) - self.play(FadeInFrom(end_words, UP)) + self.play(FadeIn(end_words, UP)) self.wait() self.let_windmill_run(windmill, time=half_time) self.wait() @@ -2388,7 +2388,7 @@ class WhereItStartsItEnds(WindmillScene): Write(middle_words), ) self.wait() - self.play(FadeInFrom(proof_words2, UP)) + self.play(FadeIn(proof_words2, UP)) self.wait() self.let_windmill_run(self.windmill, time=10) @@ -2472,7 +2472,7 @@ class FormalizeMiddle(WhereItStartsItEnds): self.wait() for arrow, step in zip(arrows, steps[1:]): self.play( - FadeInFrom(step, UP), + FadeIn(step, UP), GrowArrow(arrow), ) self.wait() @@ -2615,7 +2615,7 @@ class FormalizeMiddle(WhereItStartsItEnds): dot_rect.match_color(dot) dot_rects.add(dot_rect) - self.play(FadeInFrom(words, DOWN)) + self.play(FadeIn(words, DOWN)) self.wait() self.play( @@ -2623,7 +2623,7 @@ class FormalizeMiddle(WhereItStartsItEnds): self.pivot_dot.set_color, WHITE, ) - self.play(FadeInFrom(example, UP)) + self.play(FadeIn(example, UP)) self.play( ShowIncreasingSubsets(dot_rects), ChangingDecimal( @@ -2789,12 +2789,12 @@ class TalkThroughPivotChange(WindmillScene): self.add(top_half, tips) self.play( ShowCreationThenFadeOut(top_half), - FadeInFrom(top_words, -vect), + FadeIn(top_words, -vect), ) self.add(low_half, tips) self.play( ShowCreationThenFadeOut(low_half), - FadeInFrom(low_words, vect), + FadeIn(low_words, vect), ) self.wait() @@ -2851,7 +2851,7 @@ class TalkThroughPivotChange(WindmillScene): blue_rect.move_to, windmill.pivot, blue_rect.set_color, GREY_BROWN, old_pivot_word.move_to, new_pivot_word, - FadeOutAndShift(new_pivot_word, DL) + FadeOut(new_pivot_word, DL) ) self.let_windmill_run(windmill, 1) self.wait() @@ -3117,11 +3117,11 @@ class EvenCase(Rotate180Argument): groups.next_to(counter_group, DOWN, aligned_edge=LEFT) self.play( - FadeInFrom(blues_group, UP), + FadeIn(blues_group, UP), ShowCreation(blue_rects), ) self.play( - FadeInFrom(browns_group, UP), + FadeIn(browns_group, UP), ShowCreation(brown_rects), ) self.wait() @@ -3133,7 +3133,7 @@ class EvenCase(Rotate180Argument): pivot_words.next_to(arrow, RIGHT, SMALL_BUFF) self.play( - FadeInFrom(pivot_words, LEFT), + FadeIn(pivot_words, LEFT), ShowCreation(arrow), ) self.play( @@ -3191,7 +3191,7 @@ class EvenCase(Rotate180Argument): pivot_tracker.move_to, points[n // 2], run_time=2 ) - self.play(FadeInFrom(p_label, LEFT)) + self.play(FadeIn(p_label, LEFT)) self.wait() windmill.remove_updater(update_pivot) @@ -3232,7 +3232,7 @@ class TwoTakeaways(TeacherStudentsScene): self.change_all_student_modes("pondering") self.wait() for item in items: - self.play(FadeInFrom(item, LEFT)) + self.play(FadeIn(item, LEFT)) item.big = item.copy() item.small = item.copy() item.big.scale(1.5, about_edge=LEFT) @@ -3282,7 +3282,7 @@ class EasyToFoolYourself(PiCreatureScene): self.wait() self.play(morty.change, "thinking") self.play( - FadeInFrom(fool_word, LEFT), + FadeIn(fool_word, LEFT), ShowCreation(fool_arrow), ) self.wait() @@ -3510,7 +3510,7 @@ class VastSpaceOfConsiderations(Scene): considerations.to_edge(LEFT) self.play(LaggedStart(*[ - FadeInFrom(mob, UP) + FadeIn(mob, UP) for mob in considerations ], run_time=3, lag_ratio=0.2)) @@ -3539,7 +3539,7 @@ class WhatStaysConstantWrapper(Scene): self.play(FadeInFromDown(title1)) self.wait() self.play( - FadeOutAndShift(title1, UP), + FadeOut(title1, UP), FadeInFromDown(title2), ) self.wait() @@ -3580,10 +3580,10 @@ class CountHoles(Scene): FadeOut(labels[0::2]), ) self.play( - FadeInFrom(equation, RIGHT), + FadeIn(equation, RIGHT), GrowArrow(arrow), ) - self.play(FadeInFrom(equation_text, UP)) + self.play(FadeIn(equation_text, UP)) self.wait() @@ -3667,7 +3667,7 @@ class TerryTaoQuote(Scene): ) self.wait() self.play( - FadeInFrom(tiny_tao, LEFT) + FadeIn(tiny_tao, LEFT) ) self.wait() self.play(FadeOut(tiny_tao)) @@ -3728,8 +3728,8 @@ class WindmillFairyTale(Scene): self.wait() self.play( LaggedStart( - FadeInFrom(paths[1], RIGHT), - FadeInFrom(paths[2], RIGHT), + FadeIn(paths[1], RIGHT), + FadeIn(paths[2], RIGHT), lag_ratio=0.2, run_time=3, ) @@ -3761,7 +3761,7 @@ class SolveAProblemOneDay(SpiritOfIMO, PiCreatureScene): randy.change, "pondering", ) self.play( - FadeInFrom(you, LEFT), + FadeIn(you, LEFT), GrowArrow(arrow) ) self.wait(2) @@ -4092,11 +4092,11 @@ class Thumbnail(WindmillScene): for dot in sorted_dots[7:] ]), LaggedStart(*[ - FadeOutAndShift(word, RIGHT) + FadeOut(word, RIGHT) for word in words ]), LaggedStart(*[ - FadeOutAndShift(word, LEFT) + FadeOut(word, LEFT) for word in words2 ]), LaggedStartMap( diff --git a/from_3b1b/on_hold/moduli.py b/from_3b1b/on_hold/moduli.py index 7b79cdc9..e083005c 100644 --- a/from_3b1b/on_hold/moduli.py +++ b/from_3b1b/on_hold/moduli.py @@ -142,7 +142,7 @@ class TriangleModuliSpace(Scene): similar_word.to_edge(UP) self.play( - FadeOutAndShift(VGroup(title, subtitle), UP), + FadeOut(VGroup(title, subtitle), UP), tri1.next_to, sim_sign, LEFT, 0.75, tri2.next_to, sim_sign, RIGHT, 0.75, ) @@ -230,7 +230,7 @@ class TriangleModuliSpace(Scene): FadeOut(not_similar_word), FadeOut(sim_sign), FadeOut(sim_cross), - FadeInFrom(new_title[1], UP), + FadeIn(new_title[1], UP), ) self.play( ShowCreationThenDestruction(new_title_underline), @@ -380,7 +380,7 @@ class TriangleModuliSpace(Scene): var.suspend_updating() var.brace.suspend_updating() self.play( - FadeInFrom(var, DOWN), + FadeIn(var, DOWN), Write(var.brace, run_time=1), # MoveToTarget(num) ) @@ -602,8 +602,8 @@ class TriangleModuliSpace(Scene): self.play( ShowCreation(xpy1_line), - # FadeInFrom(xpy1_label, DOWN), - FadeInFrom(xpy1_ineq, UP) + # FadeIn(xpy1_label, DOWN), + FadeIn(xpy1_ineq, UP) ) self.wait() self.play( @@ -652,7 +652,7 @@ class TriangleModuliSpace(Scene): ms_arrow.scale(0.95) self.play( - FadeInFrom(ms_words, LEFT), + FadeIn(ms_words, LEFT), ) self.play(ShowCreation(ms_arrow)) self.wait() @@ -691,8 +691,8 @@ class TriangleModuliSpace(Scene): ) self.play( ShowCreation(elbow), - FadeInFrom(right_words, UP), - FadeOutAndShift(ineqs, DOWN), + FadeIn(right_words, UP), + FadeOut(ineqs, DOWN), ) self.play( ShowCreationThenFadeOut(elbow_circle), @@ -711,7 +711,7 @@ class TriangleModuliSpace(Scene): arc.replace(box) self.play( - FadeInFrom(pythag_eq, UP), + FadeIn(pythag_eq, UP), ) self.add(arc, arc) self.play(ShowCreation(arc)) @@ -757,10 +757,10 @@ class TriangleModuliSpace(Scene): coord_label.set_opacity, 0, FadeOut(elbow), FadeIn(acute_region), - FadeOutAndShift(right_words, UP), - FadeOutAndShift(eq, UP), - FadeInFrom(acute_words, DOWN), - FadeInFrom(gt, DOWN), + FadeOut(right_words, UP), + FadeOut(eq, UP), + FadeIn(acute_words, DOWN), + FadeIn(gt, DOWN), ) self.wait() self.play(tip_tracker.shift, 0.5 * RIGHT) @@ -769,10 +769,10 @@ class TriangleModuliSpace(Scene): self.play( tip_tracker.shift, 1.5 * DOWN, FadeIn(obtuse_region), - FadeOutAndShift(acute_words, DOWN), - FadeOutAndShift(gt, DOWN), - FadeInFrom(obtuse_words, UP), - FadeInFrom(lt, UP), + FadeOut(acute_words, DOWN), + FadeOut(gt, DOWN), + FadeIn(obtuse_words, UP), + FadeIn(lt, UP), ) self.wait() self.play(tip_tracker.shift, 0.5 * LEFT) diff --git a/manimlib/animation/fading.py b/manimlib/animation/fading.py index fc15eb76..373d22a3 100644 --- a/manimlib/animation/fading.py +++ b/manimlib/animation/fading.py @@ -52,73 +52,30 @@ class FadeIn(Transform): # Below will be deprecated -class FadeInFrom(Transform): - CONFIG = { - "direction": DOWN, - "lag_ratio": DEFAULT_ANIMATION_LAG_RATIO, - } - def __init__(self, mobject, direction=None, **kwargs): - if direction is not None: - self.direction = direction - super().__init__(mobject, **kwargs) - - def create_target(self): - return self.mobject.copy() - - def begin(self): - super().begin() - self.starting_mobject.shift(self.direction) - self.starting_mobject.set_opacity(0) - - -class FadeInFromDown(FadeInFrom): +class FadeInFromDown(FadeIn): """ - Identical to FadeInFrom, just with a name that + Identical to FadeIn, just with a name that communicates the default """ - CONFIG = { - "direction": DOWN, - "lag_ratio": DEFAULT_ANIMATION_LAG_RATIO, - } + + def __init__(self, mobject, **kwargs): + super().__init__(mobject, DOWN, **kwargs) -class FadeOutAndShift(FadeOut): - CONFIG = { - "direction": DOWN, - } - - def __init__(self, mobject, direction=None, **kwargs): - if direction is not None: - self.direction = direction - super().__init__(mobject, **kwargs) - - def create_target(self): - target = super().create_target() - target.shift(self.direction) - return target - - -class FadeOutAndShiftDown(FadeOutAndShift): +class FadeOutAndShiftDown(FadeOut): """ - Identical to FadeOutAndShift, just with a name that + Identical to FadeOut, just with a name that communicates the default """ - CONFIG = { - "direction": DOWN, - } + + def __init__(self, mobject, **kwargs): + super().__init__(mobject, DOWN, **kwargs) class FadeInFromPoint(FadeIn): def __init__(self, mobject, point, **kwargs): - self.point = point - super().__init__(mobject, **kwargs) - - def create_starting_mobject(self): - start = super().create_starting_mobject() - start.scale(0) - start.move_to(self.point) - return start + super().__init__(mobject, point - mobject.get_center(), **kwargs) class FadeInFromLarge(FadeIn): diff --git a/manimlib/mobject/types/surface.py b/manimlib/mobject/types/surface.py index 2adb1be0..02631004 100644 --- a/manimlib/mobject/types/surface.py +++ b/manimlib/mobject/types/surface.py @@ -194,6 +194,11 @@ class TexturedSurface(ParametricSurface): self.opacity = self.uv_surface.rgbas[:, 3] self.gloss = self.uv_surface.gloss + def interpolate_color(self, mobject1, mobject2, alpha): + # TODO, handle multiple textures + self.opacity = interpolate(mobject1.opacity, mobject2.opacity, alpha) + return self + def set_opacity(self, opacity, family=True): self.opacity = opacity if family: