mirror of
https://github.com/3b1b/videos.git
synced 2025-08-31 21:58:59 +00:00
Rename rotate_in_place and scale_in_place to simply rotate and scale
This commit is contained in:
parent
54ed6e140b
commit
3cc74ee56a
66 changed files with 343 additions and 343 deletions
|
@ -101,7 +101,7 @@ class Hand(ImageMobject):
|
|||
self.shrink()
|
||||
|
||||
def shrink(self):
|
||||
self.scale_in_place(0.8).to_edge(DOWN, buff = 0.0)
|
||||
self.scale(0.8).to_edge(DOWN, buff = 0.0)
|
||||
|
||||
# def set_color_thumb(self, color = "yellow"):
|
||||
# self.set_color(
|
||||
|
|
|
@ -285,9 +285,9 @@ class ThreePiecesOfTerminology(GraphScene):
|
|||
self.generate_spanning_tree()
|
||||
scale_factor = 1.2
|
||||
def accent(mobject, color = "yellow"):
|
||||
return mobject.scale_in_place(scale_factor).set_color(color)
|
||||
return mobject.scale(scale_factor).set_color(color)
|
||||
def tone_down(mobject):
|
||||
return mobject.scale_in_place(1.0/scale_factor).set_color("white")
|
||||
return mobject.scale(1.0/scale_factor).set_color("white")
|
||||
|
||||
self.add(accent(cycles))
|
||||
self.trace_cycle(run_time = 1.0)
|
||||
|
@ -952,7 +952,7 @@ class IntroduceMortimer(GraphScene):
|
|||
self.wait()
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
line.rotate_in_place,
|
||||
line.rotate,
|
||||
np.pi/10,
|
||||
rate_func = wiggle)
|
||||
for line in morty_crossed_lines
|
||||
|
@ -1161,7 +1161,7 @@ class FinalSum(Scene):
|
|||
for mob, index in zip(symbols, [-3, -2, -7, -6, -1, -4, -5]):
|
||||
copy = plus if index == -2 else deepcopy(mob)
|
||||
copy.center().shift(lines[index].get_center())
|
||||
copy.scale_in_place(lines[index].get_width()/mob.get_width())
|
||||
copy.scale(lines[index].get_width()/mob.get_width())
|
||||
anims.append(CounterclockwiseTransform(copy, mob))
|
||||
self.clear()
|
||||
self.play(*anims, run_time = 2.0)
|
||||
|
|
|
@ -1633,7 +1633,7 @@ class TriangleInequality(Scene):
|
|||
]).to_edge(UP).split()
|
||||
all_dists = [ab, ac, bc]
|
||||
ab_line, ac_line, bc_line = all_lines = [
|
||||
Line(*pair).scale_in_place(0.8)
|
||||
Line(*pair).scale(0.8)
|
||||
for pair in it.combinations(locations, 2)
|
||||
]
|
||||
def put_on_line(mob, line):
|
||||
|
@ -1898,7 +1898,7 @@ class RoomsAndSubroomsWithNumbers(Scene):
|
|||
num_mobs[index].set_color("green")
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
num_mobs[index].rotate_in_place, np.pi/10,
|
||||
num_mobs[index].rotate, np.pi/10,
|
||||
rate_func = wiggle
|
||||
)
|
||||
for index in pair
|
||||
|
|
|
@ -268,7 +268,7 @@ class PlaneToSpaceFunction(Scene):
|
|||
self.add(plane, divider, axes)
|
||||
self.play(Rotating(axes, **rot_kwargs))
|
||||
|
||||
target.rotate_in_place(rot_kwargs["radians"])
|
||||
target.rotate(rot_kwargs["radians"])
|
||||
self.play(
|
||||
TransformAnimations(
|
||||
Animation(plane.copy()),
|
||||
|
|
|
@ -368,7 +368,7 @@ class ExamplesOfNonlinearTwoDimensionalTransformations(Scene):
|
|||
rectangle.set_color(WHITE)
|
||||
rectangle.shift(self.blackness.get_center())
|
||||
self.blackness.add(rectangle)
|
||||
self.blackness.scale_in_place(0.95)
|
||||
self.blackness.scale(0.95)
|
||||
|
||||
|
||||
class TrickyExamplesOfNonlinearTwoDimensionalTransformations(Scene):
|
||||
|
@ -442,7 +442,7 @@ class TrickyExamplesOfNonlinearTwoDimensionalTransformations(Scene):
|
|||
rectangle.set_color(WHITE)
|
||||
rectangle.shift(self.blackness.get_center())
|
||||
self.blackness.add(rectangle)
|
||||
self.blackness.scale_in_place(0.95)
|
||||
self.blackness.scale(0.95)
|
||||
|
||||
|
||||
############# HORRIBLE! ##########################
|
||||
|
|
|
@ -419,7 +419,7 @@ class GeneralPositionRule(Scene):
|
|||
else:
|
||||
words_mob.set_color()
|
||||
intersecting_lines = [
|
||||
line.scale_in_place(0.3).set_color()
|
||||
line.scale(0.3).set_color()
|
||||
for i, j in pairs
|
||||
for line in [Line(cs.points[i], cs.points[j])]
|
||||
]
|
||||
|
@ -653,7 +653,7 @@ class QuadrupletsToIntersections(CircleScene):
|
|||
)).repeat(3)
|
||||
dot_quad = [deepcopy(self.dots[i]) for i in quad]
|
||||
for dot in dot_quad:
|
||||
dot.scale_in_place(2)
|
||||
dot.scale(2)
|
||||
dot_quad = Mobject(*dot_quad)
|
||||
dot_quad.set_color()
|
||||
self.add(dot_quad)
|
||||
|
@ -786,7 +786,7 @@ class EulersFormula(GraphScene):
|
|||
])
|
||||
self.add(formula)
|
||||
colored_dots = [
|
||||
deepcopy(d).scale_in_place(1.5).set_color("red")
|
||||
deepcopy(d).scale(1.5).set_color("red")
|
||||
for d in self.dots
|
||||
]
|
||||
colored_edges = [
|
||||
|
@ -833,7 +833,7 @@ class CannotDirectlyApplyEulerToMoser(CircleScene):
|
|||
mob.shift(shift_val)
|
||||
self.add(n_equals)
|
||||
yellow_dots = [
|
||||
d.set_color("yellow").scale_in_place(2)
|
||||
d.set_color("yellow").scale(2)
|
||||
for d in deepcopy(self.dots)
|
||||
]
|
||||
yellow_lines = Mobject(*[
|
||||
|
@ -879,7 +879,7 @@ class ShowMoserGraphLines(CircleScene):
|
|||
self.chop_lines_at_intersection_points()
|
||||
self.add(*self.intersection_dots)
|
||||
small_lines = [
|
||||
deepcopy(line).scale_in_place(0.5)
|
||||
deepcopy(line).scale(0.5)
|
||||
for line in self.lines
|
||||
]
|
||||
|
||||
|
@ -982,7 +982,7 @@ class HowIntersectionChopsLine(CircleScene):
|
|||
self.play(*[
|
||||
Transform(
|
||||
line,
|
||||
deepcopy(line).scale(1.1).scale_in_place(1/1.1),
|
||||
deepcopy(line).scale(1.1).scale(1/1.1),
|
||||
run_time = 1.5
|
||||
)
|
||||
for line in new_lines
|
||||
|
@ -998,7 +998,7 @@ class ApplyEulerToMoser(CircleScene):
|
|||
self.chop_circle_at_points()
|
||||
self.generate_regions()
|
||||
for dot in self.dots + self.intersection_dots:
|
||||
dot.scale_in_place(radius / RADIUS)
|
||||
dot.scale(radius / RADIUS)
|
||||
self.remove(*self.mobjects)
|
||||
|
||||
V = {}
|
||||
|
@ -1065,7 +1065,7 @@ class ApplyEulerToMoser(CircleScene):
|
|||
self.play(*[
|
||||
Transform(
|
||||
deepcopy(line),
|
||||
deepcopy(line).scale_in_place(0.5),
|
||||
deepcopy(line).scale(0.5),
|
||||
run_time = 2.0,
|
||||
)
|
||||
for line in self.lines
|
||||
|
@ -1084,7 +1084,7 @@ class ApplyEulerToMoser(CircleScene):
|
|||
self.play(*[
|
||||
Transform(
|
||||
deepcopy(dot),
|
||||
deepcopy(dot).scale_in_place(1.4).set_color("yellow")
|
||||
deepcopy(dot).scale(1.4).set_color("yellow")
|
||||
)
|
||||
for dot in self.dots + self.intersection_dots
|
||||
] + [
|
||||
|
@ -1122,7 +1122,7 @@ class ApplyEulerToMoser(CircleScene):
|
|||
] + [
|
||||
Transform(
|
||||
deepcopy(line),
|
||||
deepcopy(line).scale_in_place(0.5),
|
||||
deepcopy(line).scale(0.5),
|
||||
)
|
||||
for line in self.lines
|
||||
] + [
|
||||
|
@ -1682,7 +1682,7 @@ class IntersectionChoppingExamples(Scene):
|
|||
self.add(*lines)
|
||||
self.wait()
|
||||
self.play(*[
|
||||
Transform(line, deepcopy(line).scale(1.2).scale_in_place(1/1.2))
|
||||
Transform(line, deepcopy(line).scale(1.2).scale(1/1.2))
|
||||
for line in lines
|
||||
])
|
||||
self.count(lines, run_time = 3.0, num_offset = ORIGIN)
|
||||
|
|
|
@ -657,11 +657,11 @@ class ConstructPiano(Scene):
|
|||
keys = piano.split()
|
||||
anims = []
|
||||
askew = deepcopy(keys[-1])
|
||||
keys[-1].rotate_in_place(np.pi/5)
|
||||
keys[-1].rotate(np.pi/5)
|
||||
for key in keys:
|
||||
key.stroke_width = 1
|
||||
key_copy = deepcopy(key).to_corner(DOWN+LEFT)
|
||||
key_copy.scale_in_place(0.25)
|
||||
key_copy.scale(0.25)
|
||||
key_copy.shift(1.8*random.random()*FRAME_X_RADIUS*RIGHT)
|
||||
key_copy.shift(1.8*random.random()*FRAME_Y_RADIUS*UP)
|
||||
key_copy.rotate(2*np.pi*random.random())
|
||||
|
@ -1181,7 +1181,7 @@ class StepsToSolution(IntervalScene):
|
|||
anims = []
|
||||
for tick in self.ticks:
|
||||
interval = OpenInterval(tick.get_center(), self.spacing)
|
||||
interval.scale_in_place(0.5)
|
||||
interval.scale(0.5)
|
||||
squished = deepcopy(interval).stretch_to_fit_width(0)
|
||||
anims.append(Transform(squished, interval))
|
||||
self.play(*anims)
|
||||
|
@ -1201,7 +1201,7 @@ class StepsToSolution(IntervalScene):
|
|||
"rate_func" : there_and_back
|
||||
}
|
||||
self.play(*[
|
||||
ApplyMethod(mob.scale_in_place, 0.5*random.random(), **kwargs)
|
||||
ApplyMethod(mob.scale, 0.5*random.random(), **kwargs)
|
||||
for mob in self.intervals
|
||||
])
|
||||
self.wait()
|
||||
|
@ -1246,7 +1246,7 @@ class StepsToSolution(IntervalScene):
|
|||
def stretch_intervals(self):
|
||||
for interval, count in zip(self.intervals, it.count(1)):
|
||||
self.play(
|
||||
ApplyMethod(interval.scale_in_place, 1.0/(count**2)),
|
||||
ApplyMethod(interval.scale, 1.0/(count**2)),
|
||||
run_time = 1.0/count
|
||||
)
|
||||
self.wait()
|
||||
|
@ -1311,8 +1311,8 @@ class TroubleDrawingSmallInterval(IntervalScene):
|
|||
interval, line = self.add_open_interval(0.5, 0.5)
|
||||
big = Mobject(interval, line)
|
||||
small_int, small_line = self.add_open_interval(0.5, 0.01)
|
||||
small = Mobject(small_int, line.scale_in_place(0.01/0.5))
|
||||
shrunk = deepcopy(big).scale_in_place(0.01/0.5)
|
||||
small = Mobject(small_int, line.scale(0.01/0.5))
|
||||
shrunk = deepcopy(big).scale(0.01/0.5)
|
||||
self.clear()
|
||||
IntervalScene.construct(self)
|
||||
words = TextMobject("This tiny stretch")
|
||||
|
@ -1408,7 +1408,7 @@ class ShiftSetupByOne(IntervalScene):
|
|||
)
|
||||
self.remove(*intervals+lines)
|
||||
for interval, frac in zip(intervals, rationals()):
|
||||
interval.scale_in_place(2.0/frac.denominator)
|
||||
interval.scale(2.0/frac.denominator)
|
||||
|
||||
|
||||
for interval in intervals[:10]:
|
||||
|
@ -1496,7 +1496,7 @@ class FinalEquivalence(IntervalScene):
|
|||
run_time_per_interval = 0,
|
||||
)
|
||||
for interval, frac in zip(intervals, rationals()):
|
||||
interval.scale_in_place(2.0/frac.denominator)
|
||||
interval.scale(2.0/frac.denominator)
|
||||
self.remove(*intervals+lines)
|
||||
intervals = Mobject(*intervals)
|
||||
arrow = TexMobject("\\Leftrightarrow")
|
||||
|
|
|
@ -98,7 +98,7 @@ class SlideWordDownCycloid(Animation):
|
|||
angle = 0
|
||||
|
||||
letter.shift(position-letter.get_bottom())
|
||||
letter.rotate_in_place(angle-letter.angle)
|
||||
letter.rotate(angle-letter.angle)
|
||||
letter.angle = angle
|
||||
|
||||
|
||||
|
@ -202,7 +202,7 @@ class PathSlidingScene(Scene):
|
|||
def roll(self, mobject, arc_length):
|
||||
radius = mobject.get_width()/2
|
||||
theta = arc_length / radius
|
||||
mobject.rotate_in_place(-theta)
|
||||
mobject.rotate(-theta)
|
||||
|
||||
def add_cycloid_end_points(self):
|
||||
cycloid = Cycloid()
|
||||
|
@ -650,7 +650,7 @@ class DefineCurveWithKnob(PathSlidingScene):
|
|||
|
||||
def midslide_action(self, point, angle):
|
||||
d_angle = angle-self.last_angle
|
||||
self.knob.rotate_in_place(d_angle)
|
||||
self.knob.rotate(d_angle)
|
||||
self.last_angle = angle
|
||||
self.path.set_color(BLUE_D, lambda p : p[0] < point[0])
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class RollAlongVector(Animation):
|
|||
def interpolate_mobject(self, alpha):
|
||||
d_alpha = alpha - self.last_alpha
|
||||
self.last_alpha = alpha
|
||||
self.mobject.rotate_in_place(
|
||||
self.mobject.rotate(
|
||||
d_alpha*self.radians,
|
||||
self.rotation_vector
|
||||
)
|
||||
|
@ -247,7 +247,7 @@ class LeviSolution(CycloidScene):
|
|||
self.play(
|
||||
ShowCreation(arc),
|
||||
ApplyMethod(
|
||||
line.rotate_in_place,
|
||||
line.rotate,
|
||||
angle,
|
||||
path_func = path_along_arc(angle)
|
||||
),
|
||||
|
|
|
@ -286,7 +286,7 @@ class JohannThinksOfFermat(Scene):
|
|||
bubble.pin_to(johann)
|
||||
bubble.shift(DOWN)
|
||||
bubble.add_content(fermat)
|
||||
fermat.scale_in_place(0.4)
|
||||
fermat.scale(0.4)
|
||||
|
||||
|
||||
self.add(johann, bubble)
|
||||
|
|
|
@ -231,7 +231,7 @@ class MultilayeredGlass(PhotonScene, ZoomedScene):
|
|||
little_square.get_corner(UP+RIGHT) - \
|
||||
equation_frame.get_corner(UP+RIGHT)
|
||||
)
|
||||
equation_frame.scale_in_place(0.9)
|
||||
equation_frame.scale(0.9)
|
||||
self.show_snells(index+1, equation_frame)
|
||||
self.remove(*figure_marks)
|
||||
self.disactivate_zooming()
|
||||
|
|
|
@ -63,7 +63,7 @@ class IntroduceSteve(Scene):
|
|||
image.replace(sample_size)
|
||||
image.next_to(last, DOWN)
|
||||
last = image
|
||||
sci_fri.scale_in_place(0.9)
|
||||
sci_fri.scale(0.9)
|
||||
shift_val = 0
|
||||
sample_size.scale(0.75)
|
||||
for book in books:
|
||||
|
@ -170,8 +170,8 @@ class DisectBrachistochroneWord(Scene):
|
|||
)
|
||||
|
||||
pronunciation = TextMobject(["/br", "e", "kist","e","kr$\\bar{o}$n/"])
|
||||
pronunciation.split()[1].rotate_in_place(np.pi)
|
||||
pronunciation.split()[3].rotate_in_place(np.pi)
|
||||
pronunciation.split()[1].rotate(np.pi)
|
||||
pronunciation.split()[3].rotate(np.pi)
|
||||
pronunciation.scale(0.7)
|
||||
pronunciation.shift(DOWN)
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class DifferentConceptions(Scene):
|
|||
length = TextMobject("Length")
|
||||
length.next_to(brace, DOWN)
|
||||
group = VMobject(vector, brace, length)
|
||||
group.rotate_in_place(np.pi/6)
|
||||
group.rotate(np.pi/6)
|
||||
vector.get_center = lambda : vector.get_start()
|
||||
|
||||
direction = TextMobject("Direction")
|
||||
|
@ -616,7 +616,7 @@ class CoordinateSystemWalkthrough(VectorScene):
|
|||
self.play(FadeIn(point))
|
||||
self.wait()
|
||||
self.play(ApplyFunction(
|
||||
lambda m : m.scale_in_place(1.25).set_color(YELLOW),
|
||||
lambda m : m.scale(1.25).set_color(YELLOW),
|
||||
array.get_brackets(),
|
||||
rate_func = there_and_back
|
||||
))
|
||||
|
|
|
@ -62,7 +62,7 @@ class StudentsFindThisConfusing(TeacherStudentsScene):
|
|||
"What does this actually mean?",
|
||||
student_index = 2,
|
||||
added_anims = [
|
||||
question1.scale_in_place, 0.8,
|
||||
question1.scale, 0.8,
|
||||
question1.to_edge, LEFT,
|
||||
question1.shift, DOWN,
|
||||
]
|
||||
|
@ -260,7 +260,7 @@ class IHatAsEigenVector(ExampleTranformationScene):
|
|||
column1 = VGroup(*self.matrix.get_mob_matrix()[:,0])
|
||||
|
||||
self.play(faders.fade, 0.7, Animation(self.matrix))
|
||||
self.play(column1.scale_in_place, 1.3, rate_func = there_and_back)
|
||||
self.play(column1.scale, 1.3, rate_func = there_and_back)
|
||||
self.wait()
|
||||
self.play(faders.restore, Animation(self.matrix))
|
||||
self.wait()
|
||||
|
@ -727,7 +727,7 @@ class SymbolicEigenvectors(Scene):
|
|||
GrowFromCenter(group.brace),
|
||||
Write(group.text, run_time = 2)
|
||||
)
|
||||
self.play(group.scale_in_place, 1.2, rate_func = there_and_back)
|
||||
self.play(group.scale, 1.2, rate_func = there_and_back)
|
||||
self.wait()
|
||||
|
||||
morty = Mortimer().to_edge(DOWN)
|
||||
|
@ -1406,7 +1406,7 @@ class RevisitExampleTransformation(ExampleTranformationScene):
|
|||
self.play(*it.chain(
|
||||
list(map(FadeOut, faders)),
|
||||
[
|
||||
lambda_equals_two.scale_in_place, 1.3,
|
||||
lambda_equals_two.scale, 1.3,
|
||||
lambda_equals_two.next_to, self.matrix, DOWN
|
||||
]
|
||||
))
|
||||
|
@ -1742,7 +1742,7 @@ class ShearExample(RevisitExampleTransformation):
|
|||
# self.play(*it.chain(
|
||||
# map(FadeOut, faders),
|
||||
# [
|
||||
# lambda_equals_two.scale_in_place, 1.3,
|
||||
# lambda_equals_two.scale, 1.3,
|
||||
# lambda_equals_two.next_to, self.matrix, DOWN
|
||||
# ]
|
||||
# ))
|
||||
|
@ -1876,7 +1876,7 @@ class BasisVectorsAreEigenvectors(LinearTransformationScene):
|
|||
])
|
||||
for entries in diag_entries, off_diag_entries:
|
||||
self.play(
|
||||
entries.scale_in_place, 1.3,
|
||||
entries.scale, 1.3,
|
||||
entries.set_color, YELLOW,
|
||||
run_time = 2,
|
||||
rate_func = there_and_back
|
||||
|
@ -1908,7 +1908,7 @@ class DefineDiagonalMatrix(Scene):
|
|||
self.wait()
|
||||
for entries in off_diag_entries, diag_entries:
|
||||
self.play(
|
||||
entries.scale_in_place, 1.1,
|
||||
entries.scale, 1.1,
|
||||
entries.set_color, YELLOW,
|
||||
rate_func = there_and_back,
|
||||
)
|
||||
|
@ -1922,7 +1922,7 @@ class DefineDiagonalMatrix(Scene):
|
|||
self.wait()
|
||||
self.play(diag_entries.set_color, MAROON_B)
|
||||
self.play(
|
||||
diag_entries.scale_in_place, 1.1,
|
||||
diag_entries.scale, 1.1,
|
||||
rate_func = there_and_back,
|
||||
)
|
||||
self.wait()
|
||||
|
|
|
@ -236,7 +236,7 @@ class HigherDimensionalVectorsNumerically(Scene):
|
|||
self.play(*[
|
||||
Transform(
|
||||
entries[i],
|
||||
entries[i].copy().scale_in_place(1.2).set_color(WHITE),
|
||||
entries[i].copy().scale(1.2).set_color(WHITE),
|
||||
rate_func = squish_rate_func(
|
||||
there_and_back,
|
||||
i/(2.*num_entries),
|
||||
|
@ -278,7 +278,7 @@ class AskAbout4DPhysicsStudent(Scene):
|
|||
|
||||
line = Line(LEFT, RIGHT, color = BLUE_B)
|
||||
square = Square(color = BLUE_C)
|
||||
square.scale_in_place(0.5)
|
||||
square.scale(0.5)
|
||||
cube = HyperCube(color = BLUE_D, dims = 3)
|
||||
hyper_cube = HyperCube()
|
||||
thought_mobs = []
|
||||
|
@ -1390,7 +1390,7 @@ class DerivativeIsLinear(Scene):
|
|||
anims = []
|
||||
for term in terms:
|
||||
anims += [
|
||||
term.scale_in_place, 1.2,
|
||||
term.scale, 1.2,
|
||||
term.set_color, RED,
|
||||
]
|
||||
self.play(
|
||||
|
@ -1691,8 +1691,8 @@ class IntroducePolynomialSpace(Scene):
|
|||
self.wait()
|
||||
for i, mob in (2, VGroup(*self.poly2[3:5])), (7, self.poly2[0]):
|
||||
self.play(
|
||||
new_coords.get_entries()[i].scale_in_place, 1.3,
|
||||
mob.scale_in_place, 1.3,
|
||||
new_coords.get_entries()[i].scale, 1.3,
|
||||
mob.scale, 1.3,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.remove(*self.get_mobjects_from_last_animation())
|
||||
|
@ -1733,7 +1733,7 @@ class IntroducePolynomialSpace(Scene):
|
|||
self.wait()
|
||||
diag_entries.save_state()
|
||||
diag_entries.generate_target()
|
||||
diag_entries.target.scale_in_place(1.2)
|
||||
diag_entries.target.scale(1.2)
|
||||
diag_entries.target.set_color(YELLOW)
|
||||
for anim in MoveToTarget(diag_entries), diag_entries.restore:
|
||||
self.play(
|
||||
|
@ -1848,15 +1848,15 @@ class IntroducePolynomialSpace(Scene):
|
|||
self.play(FadeIn(rect), FadeIn(vert_rect))
|
||||
self.wait()
|
||||
self.play(
|
||||
entry.scale_in_place, 1.2,
|
||||
diag_entry.scale_in_place, 1.2,
|
||||
entry.scale, 1.2,
|
||||
diag_entry.scale, 1.2,
|
||||
)
|
||||
diag_entry_target, dot, entry_target = result_entry
|
||||
self.play(
|
||||
Transform(entry.copy(), entry_target),
|
||||
Transform(diag_entry.copy(), diag_entry_target),
|
||||
entry.scale_in_place, 1/1.2,
|
||||
diag_entry.scale_in_place, 1/1.2,
|
||||
entry.scale, 1/1.2,
|
||||
diag_entry.scale, 1/1.2,
|
||||
Write(dot)
|
||||
)
|
||||
self.wait()
|
||||
|
@ -2322,7 +2322,7 @@ class VectorSpaceOfPiCreatures(Scene):
|
|||
GREY_BROWN, GREY_BROWN, GREY,
|
||||
YELLOW_C, YELLOW_D, YELLOW_E
|
||||
]))
|
||||
pi.scale_in_place(random.random()+0.5)
|
||||
pi.scale(random.random()+0.5)
|
||||
|
||||
self.play(FadeIn(
|
||||
creatures,
|
||||
|
|
|
@ -177,7 +177,7 @@ class FollowLinearCombination(LinearTransformationScene):
|
|||
j_label = vector_coordinate_label(self.j_hat)
|
||||
j_label.set_color(Y_COLOR)
|
||||
for mob in i_label, j_label:
|
||||
mob.scale_in_place(0.8)
|
||||
mob.scale(0.8)
|
||||
background = BackgroundRectangle(mob)
|
||||
self.play(ShowCreation(background), Write(mob))
|
||||
|
||||
|
@ -1025,8 +1025,8 @@ class ExplanationTrumpsProof(Scene):
|
|||
run_time = 1
|
||||
)
|
||||
self.play(
|
||||
explanation.scale_in_place, 1.5,
|
||||
proof.scale_in_place, 0.7
|
||||
explanation.scale, 1.5,
|
||||
proof.scale, 0.7
|
||||
)
|
||||
self.wait()
|
||||
|
||||
|
|
|
@ -289,14 +289,14 @@ class SystemOfEquations(Scene):
|
|||
self.play(Transform(scaled_vars, isolated_scaled_vars))
|
||||
self.play(scalars.set_color, YELLOW, lag_ratio = 0.5)
|
||||
self.play(*[
|
||||
ApplyMethod(m.scale_in_place, 1.2, rate_func = there_and_back)
|
||||
ApplyMethod(m.scale, 1.2, rate_func = there_and_back)
|
||||
for m in scalars.split()
|
||||
])
|
||||
self.wait()
|
||||
self.remove(scalars)
|
||||
self.play(scaled_vars.restore)
|
||||
self.play(*[
|
||||
ApplyMethod(p.scale_in_place, 1.5, rate_func = there_and_back)
|
||||
ApplyMethod(p.scale, 1.5, rate_func = there_and_back)
|
||||
for p in plusses
|
||||
])
|
||||
self.wait()
|
||||
|
@ -328,7 +328,7 @@ class SystemOfEquations(Scene):
|
|||
circle_slash.next_to(arrow, RIGHT)
|
||||
def draw_circle_slash(mob):
|
||||
circle_slash.replace(mob)
|
||||
circle_slash.scale_in_place(1.4)
|
||||
circle_slash.scale(1.4)
|
||||
self.play(ShowCreation(circle_slash), run_time = 0.5)
|
||||
self.wait(0.5)
|
||||
self.play(FadeOut(circle_slash), run_time = 0.5)
|
||||
|
@ -369,14 +369,14 @@ class SystemOfEquations(Scene):
|
|||
for mob, color in zip([variables, constants, xs, ys, zs], colors):
|
||||
mob.square = Square(color = color)
|
||||
mob.square.replace(mob, stretch = True)
|
||||
mob.square.scale_in_place(1.1)
|
||||
mob.square.scale(1.1)
|
||||
if hasattr(mob, "words"):
|
||||
mob.words = TextMobject(mob.words)
|
||||
mob.words.set_color(color)
|
||||
mob.words.next_to(mob.square, UP)
|
||||
ys.square.add(xs.square, zs.square)
|
||||
zero_circles = VMobject(*[
|
||||
Circle().replace(mob).scale_in_place(1.3)
|
||||
Circle().replace(mob).scale(1.3)
|
||||
for mob in [
|
||||
VMobject(*equations.split()[i].split()[j:j+2])
|
||||
for i, j in [(1, 3), (2, 6)]
|
||||
|
@ -1751,7 +1751,7 @@ class OffsetNullSpace(NameNullSpace):
|
|||
color = RED
|
||||
)
|
||||
circle = Circle(color = YELLOW).replace(dot)
|
||||
circle.scale_in_place(5)
|
||||
circle.scale(5)
|
||||
words = TextMobject("""
|
||||
All vectors still land
|
||||
on the same spot
|
||||
|
|
|
@ -1430,7 +1430,7 @@ class ProjectOntoUnitVectorNumberline(VectorScene):
|
|||
u_brace.put_at_tip(one)
|
||||
u_brace.add(one)
|
||||
u_brace.rotate(u_hat.get_angle())
|
||||
one.rotate_in_place(-u_hat.get_angle())
|
||||
one.rotate(-u_hat.get_angle())
|
||||
|
||||
number_line = NumberLine(x_min = -9, x_max = 9)
|
||||
numbers = number_line.get_numbers()
|
||||
|
@ -1643,7 +1643,7 @@ class ProjectBasisVectors(ProjectOntoUnitVectorNumberline):
|
|||
proj_dots = self.get_proj_dots(dots)
|
||||
proj_lines = self.get_proj_lines(dots, proj_dots)
|
||||
for dot in proj_dots:
|
||||
dot.scale_in_place(0.1)
|
||||
dot.scale(0.1)
|
||||
proj_basis = VGroup(*[
|
||||
get_vect_mob_projection(vector, self.u_hat)
|
||||
for vector in basis_vectors
|
||||
|
|
|
@ -81,7 +81,7 @@ class ListSteps(Scene):
|
|||
self.wait()
|
||||
for step in steps:
|
||||
target = step.copy()
|
||||
target.scale_in_place(1.1)
|
||||
target.scale(1.1)
|
||||
target.set_color(YELLOW)
|
||||
target.set_color_by_tex("linear transformations", BLUE)
|
||||
step.target = target
|
||||
|
@ -188,7 +188,7 @@ class SimpleDefine2dCrossProduct(LinearTransformationScene):
|
|||
)
|
||||
self.wait()
|
||||
self.play(ApplyFunction(
|
||||
lambda m : m.scale_in_place(1.2).set_color(RED),
|
||||
lambda m : m.scale(1.2).set_color(RED),
|
||||
times,
|
||||
rate_func = there_and_back
|
||||
))
|
||||
|
@ -207,7 +207,7 @@ class SimpleDefine2dCrossProduct(LinearTransformationScene):
|
|||
vect.save_state()
|
||||
vect.target = vect.copy()
|
||||
vect.target.rotate(angle)
|
||||
vect.target.label.rotate_in_place(-angle)
|
||||
vect.target.label.rotate(-angle)
|
||||
vect.target.label.background_rectangle.set_fill(opacity = 0)
|
||||
square = self.square
|
||||
square.save_state()
|
||||
|
@ -899,8 +899,8 @@ class Define2dCrossProduct(LinearTransformationScene):
|
|||
angle = np.pi/3
|
||||
self.v.target.rotate(-angle)
|
||||
self.w.target.rotate(angle)
|
||||
self.v.target.label.rotate_in_place(angle)
|
||||
self.w.target.label.rotate_in_place(-angle)
|
||||
self.v.target.label.rotate(angle)
|
||||
self.w.target.label.rotate(-angle)
|
||||
for vect in self.v, self.w:
|
||||
vect.target.label[0].set_fill(opacity = 0)
|
||||
self.square.target = self.square.copy().restore()
|
||||
|
@ -957,8 +957,8 @@ class Define2dCrossProduct(LinearTransformationScene):
|
|||
for v1, v2 in (self.v, self.w), (self.w, self.v):
|
||||
v1.label[0].set_fill(opacity = 0)
|
||||
v1.target = v1.copy()
|
||||
v1.target.label.rotate_in_place(v1.get_angle()-v2.get_angle())
|
||||
v1.target.label.scale_in_place(v1.get_length()/v2.get_length())
|
||||
v1.target.label.rotate(v1.get_angle()-v2.get_angle())
|
||||
v1.target.label.scale(v1.get_length()/v2.get_length())
|
||||
v1.target.rotate(v2.get_angle()-v1.get_angle())
|
||||
v1.target.scale(v2.get_length()/v1.get_length())
|
||||
v1.target.label.move_to(v2.label)
|
||||
|
@ -1441,8 +1441,8 @@ class ShowCrossProductFormula(Scene):
|
|||
e1.save_state()
|
||||
e2.save_state()
|
||||
self.play(
|
||||
e1.scale_in_place, 1.5,
|
||||
e2.scale_in_place, 1.5,
|
||||
e1.scale, 1.5,
|
||||
e2.scale, 1.5,
|
||||
)
|
||||
self.play(
|
||||
Transform(e1.copy(), e1_target),
|
||||
|
@ -1580,7 +1580,7 @@ class DeterminantTrick(Scene):
|
|||
term.next_to(equation, DOWN, buff = MED_SMALL_BUFF, aligned_edge = LEFT)
|
||||
last_mob = term
|
||||
self.play(*it.chain(*[
|
||||
[mob.scale_in_place, 1.2]
|
||||
[mob.scale, 1.2]
|
||||
for mob in quint
|
||||
]))
|
||||
self.wait()
|
||||
|
|
|
@ -506,7 +506,7 @@ class DefineDualTransform(Scene):
|
|||
func_input.set_height(func_input_template.get_height())
|
||||
func_input.next_to(VGroup(*func_tex[:3]), RIGHT)
|
||||
VGroup(*func_tex[-2:]).next_to(func_input, RIGHT)
|
||||
func_tex[0].scale_in_place(1.5)
|
||||
func_tex[0].scale(1.5)
|
||||
|
||||
func_tex = VGroup(
|
||||
VGroup(*[func_tex[i] for i in (0, 1, 2, -2, -1)]),
|
||||
|
|
|
@ -185,9 +185,9 @@ class RemindOfCoordinates(LinearCombinationScene):
|
|||
|
||||
self.play(
|
||||
FadeOut(everything),
|
||||
x_coord.scale_in_place, 1.5,
|
||||
x_coord.scale, 1.5,
|
||||
x_coord.move_to, x_shift + 3*UP,
|
||||
y_coord.scale_in_place, 1.5,
|
||||
y_coord.scale, 1.5,
|
||||
y_coord.move_to, y_shift + 3*UP,
|
||||
Write(words)
|
||||
)
|
||||
|
@ -241,7 +241,7 @@ class RemindOfCoordinates(LinearCombinationScene):
|
|||
self.play(
|
||||
Write(ass1),
|
||||
ApplyFunction(
|
||||
lambda m : m.rotate_in_place(np.pi/6).set_color(X_COLOR),
|
||||
lambda m : m.rotate(np.pi/6).set_color(X_COLOR),
|
||||
x_coord,
|
||||
rate_func = wiggle
|
||||
)
|
||||
|
@ -250,7 +250,7 @@ class RemindOfCoordinates(LinearCombinationScene):
|
|||
self.play(
|
||||
Write(ass2),
|
||||
ApplyFunction(
|
||||
lambda m : m.rotate_in_place(np.pi/6).set_color(Y_COLOR),
|
||||
lambda m : m.rotate(np.pi/6).set_color(Y_COLOR),
|
||||
y_coord,
|
||||
rate_func = wiggle
|
||||
)
|
||||
|
@ -409,7 +409,7 @@ class IntroduceJennifer(JenniferScene):
|
|||
pi.bubble = get_small_bubble(pi)
|
||||
pi.bubble.set_fill(BLACK, opacity = 0.7)
|
||||
pi.bubble.add_content(pi.coords)
|
||||
jenny.coords.scale_in_place(0.7)
|
||||
jenny.coords.scale(0.7)
|
||||
|
||||
new_coords = [-1, 2]
|
||||
new_coords_mob = Matrix(new_coords)
|
||||
|
@ -969,7 +969,7 @@ class TalkThroughChangeOfBasisMatrix(JenniferScene):
|
|||
b2_coords.set_color(Y_COLOR)
|
||||
b2_coords.next_to(self.b2.get_end(), UP)
|
||||
for coords in b1_coords, b2_coords:
|
||||
coords.scale_in_place(0.7)
|
||||
coords.scale(0.7)
|
||||
|
||||
basis_coords_pair = VGroup(
|
||||
Matrix([1, 0]).set_color(X_COLOR).scale(0.7),
|
||||
|
@ -1164,13 +1164,13 @@ class FeelsBackwards(Scene):
|
|||
self.play(*list(map(Write, [inverse_word, inverse_exponent])))
|
||||
self.play(
|
||||
Swap(jenny_grid, our_grid),
|
||||
top_arrow.scale_in_place, 0.8,
|
||||
top_arrow.scale, 0.8,
|
||||
top_arrow.shift, 0.8*RIGHT,
|
||||
top_arrow.set_color, BLUE,
|
||||
)
|
||||
self.play(
|
||||
Swap(jenny_language, our_language),
|
||||
bottom_arrow.scale_in_place, 0.8,
|
||||
bottom_arrow.scale, 0.8,
|
||||
bottom_arrow.shift, 0.8*RIGHT
|
||||
)
|
||||
self.wait()
|
||||
|
@ -1236,7 +1236,7 @@ class RecallInverse(JenniferScene):
|
|||
inv_matrix.set_column_colors(X_COLOR)
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
mob.scale_in_place, 1.2,
|
||||
mob.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
for mob in inv_matrix.get_mob_matrix()[:,0]
|
||||
|
@ -1245,7 +1245,7 @@ class RecallInverse(JenniferScene):
|
|||
inv_matrix.set_column_colors(X_COLOR, Y_COLOR)
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
mob.scale_in_place, 1.2,
|
||||
mob.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
for mob in inv_matrix.get_mob_matrix()[:,1]
|
||||
|
@ -1290,7 +1290,7 @@ class WorkOutInverseComputation(Scene):
|
|||
""")
|
||||
her_text.set_color(her_vector.get_color())
|
||||
for text in our_text, her_text:
|
||||
text.scale_in_place(0.7)
|
||||
text.scale(0.7)
|
||||
|
||||
self.add(our_vector)
|
||||
self.play(
|
||||
|
@ -1396,7 +1396,7 @@ class SummarizeTranslationProcess(Scene):
|
|||
self.wait(2)
|
||||
self.play(
|
||||
VGroup(her_vector, equals).next_to, A_inv, LEFT,
|
||||
her_arrow.rotate_in_place, -np.pi/6,
|
||||
her_arrow.rotate, -np.pi/6,
|
||||
her_arrow.shift, MED_SMALL_BUFF*LEFT,
|
||||
Transform(A, A_inv, path_arc = np.pi)
|
||||
)
|
||||
|
@ -1538,7 +1538,7 @@ class JennyWatchesRotation(JenniferScene):
|
|||
matrix.get_entries().set_color_by_gradient(X_COLOR, Y_COLOR)
|
||||
jenny.bubble = get_small_bubble(jenny)
|
||||
jenny.bubble.add_content(matrix)
|
||||
matrix.scale_in_place(0.8)
|
||||
matrix.scale(0.8)
|
||||
|
||||
self.play(
|
||||
jenny.change_mode, "sassy",
|
||||
|
@ -1785,7 +1785,7 @@ class MathematicalEmpathy(TeacherStudentsScene):
|
|||
self.random_blink()
|
||||
for mob, color in (M, BLUE), (As, MAROON_B):
|
||||
self.play(mob.set_color, color)
|
||||
self.play(mob.scale_in_place, 1.2, rate_func = there_and_back)
|
||||
self.play(mob.scale, 1.2, rate_func = there_and_back)
|
||||
self.random_blink(2)
|
||||
|
||||
class NextVideo(Scene):
|
||||
|
|
|
@ -77,7 +77,7 @@ class Chapter9(Scene):
|
|||
vector = Vector([3, 2])
|
||||
vector.center().shift(2*DOWN)
|
||||
vector.set_stroke(width = 8)
|
||||
vector.tip.scale_in_place(2)
|
||||
vector.tip.scale(2)
|
||||
|
||||
you.coords = Matrix([3, 2])
|
||||
jenny.coords = Matrix(["5/3", "1/3"])
|
||||
|
|
|
@ -647,9 +647,9 @@ class IntroduceTowersOfHanoi(TowersOfHanoiScene):
|
|||
group = VGroup(disk, top, bottom)
|
||||
group.truly_original_state = group.copy()
|
||||
group.next_to(peg, UP, 0)
|
||||
group.rotate_in_place(-np.pi/24, RIGHT)
|
||||
group.rotate(-np.pi/24, RIGHT)
|
||||
group.save_state()
|
||||
group.rotate_in_place(-11*np.pi/24, RIGHT)
|
||||
group.rotate(-11*np.pi/24, RIGHT)
|
||||
disk.set_fill(opacity = 0)
|
||||
disk_groups.add(group)
|
||||
disk_groups.arrange()
|
||||
|
@ -672,7 +672,7 @@ class IntroduceTowersOfHanoi(TowersOfHanoiScene):
|
|||
for label in labels:
|
||||
label.save_state()
|
||||
self.play(
|
||||
label.scale_in_place, 2,
|
||||
label.scale, 2,
|
||||
label.set_color, YELLOW,
|
||||
last.restore,
|
||||
run_time = 0.5
|
||||
|
@ -928,7 +928,7 @@ class RhythmOfDecimalCounting(CountingScene):
|
|||
self.wait()
|
||||
ten_group.save_state()
|
||||
self.play(
|
||||
ten_group.scale_in_place, 7,
|
||||
ten_group.scale, 7,
|
||||
ten_group.shift, 2*(DOWN+LEFT),
|
||||
)
|
||||
self.wait()
|
||||
|
@ -1403,7 +1403,7 @@ class RecursionTime(Scene):
|
|||
keith.make_eye_contact(morty)
|
||||
|
||||
keith_kick = keith.copy().change_mode("dance_kick")
|
||||
keith_kick.scale_in_place(1.3)
|
||||
keith_kick.scale(1.3)
|
||||
keith_kick.shift(0.5*LEFT)
|
||||
keith_kick.look_at(morty.eyes)
|
||||
keith_hooray = keith.copy().change_mode("hooray")
|
||||
|
@ -2137,7 +2137,7 @@ class RecursiveSolutionToConstrained(RecursiveSolution):
|
|||
self.move_subtower_to_peg(self.num_disks-1, 0, added_anims = [
|
||||
steps_to_fade.fade, 0.7,
|
||||
sub_steps[2].set_color, WHITE,
|
||||
sub_steps[2].scale_in_place, 1.2,
|
||||
sub_steps[2].scale, 1.2,
|
||||
FadeIn(sub_sub_steps_brace)
|
||||
])
|
||||
num_disks = self.num_disks-1
|
||||
|
@ -3094,7 +3094,7 @@ class DescribeTriforcePattern(SierpinskiGraphScene):
|
|||
]
|
||||
def wiggle_island(island):
|
||||
return ApplyMethod(
|
||||
island.rotate_in_place, np.pi/12,
|
||||
island.rotate, np.pi/12,
|
||||
run_time = 1,
|
||||
rate_func = wiggle
|
||||
)
|
||||
|
|
|
@ -818,7 +818,7 @@ class Order3PseudoHilbertCurve(Scene):
|
|||
self.clear()
|
||||
self.add(words, grid8, *mini_curves)
|
||||
self.play(*[
|
||||
ApplyMethod(curve.rotate_in_place, np.pi, axis)
|
||||
ApplyMethod(curve.rotate, np.pi, axis)
|
||||
for curve, axis in [
|
||||
(mini_curves[0], UP+RIGHT),
|
||||
(mini_curves[3], UP+LEFT)
|
||||
|
@ -858,7 +858,7 @@ class GrowToOrder8PseudoHilbertCurve(Scene):
|
|||
self.clear()
|
||||
self.add(*mini_curves)
|
||||
self.play(*[
|
||||
ApplyMethod(curve.rotate_in_place, np.pi, axis)
|
||||
ApplyMethod(curve.rotate, np.pi, axis)
|
||||
for curve, axis in [
|
||||
(mini_curves[0], UP+RIGHT),
|
||||
(mini_curves[3], UP+LEFT)
|
||||
|
|
|
@ -543,7 +543,7 @@ class MakeALotOfPiCreaturesHappy(Scene):
|
|||
self.wait()
|
||||
for pi, color in zip(pis.target, colors):
|
||||
pi.change_mode("hooray")
|
||||
# pi.scale_in_place(1)
|
||||
# pi.scale(1)
|
||||
pi.set_color(color)
|
||||
self.play(
|
||||
MoveToTarget(
|
||||
|
|
|
@ -494,7 +494,7 @@ class AdditiveProperty(Scene):
|
|||
run_time = 0.5
|
||||
))
|
||||
self.play(ApplyMethod(
|
||||
copies.scale_in_place, 1.2,
|
||||
copies.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
))
|
||||
self.wait()
|
||||
|
|
|
@ -653,7 +653,7 @@ class PairOfPairBecomeRectangle(Scene):
|
|||
factor = lines[0].get_length()/lines[1].get_length()
|
||||
grower = groups[1].copy()
|
||||
new_line = grower[-1]
|
||||
new_line.scale_in_place(factor)
|
||||
new_line.scale(factor)
|
||||
grower[0].move_to(new_line.get_start())
|
||||
grower[2].next_to(grower[0], DOWN)
|
||||
grower[1].move_to(new_line.get_end())
|
||||
|
@ -697,7 +697,7 @@ class SearchForRectangleOnLoop(ClosedLoopScene):
|
|||
angle_mean = np.mean(angles)
|
||||
self.play(
|
||||
*[
|
||||
ApplyMethod(line.rotate_in_place, angle_mean-angle)
|
||||
ApplyMethod(line.rotate, angle_mean-angle)
|
||||
for line, angle in zip(self.connecting_lines, angles)
|
||||
] + [Animation(midpoint)],
|
||||
rate_func = there_and_back
|
||||
|
@ -1183,7 +1183,7 @@ class EdgesOfSquare(Scene):
|
|||
bottom_left = interval.get_left()
|
||||
for tick in interval.tick_marks:
|
||||
height = tick.get_height()
|
||||
tick.scale_in_place(0.5)
|
||||
tick.scale(0.5)
|
||||
tick.shift(height*DOWN/4.)
|
||||
self.numbers = interval.get_number_mobjects(0, 1)
|
||||
vert_interval = interval.copy()
|
||||
|
@ -1286,7 +1286,7 @@ class EndpointsGluedTogether(ClosedLoopScene):
|
|||
dots.set_color(BLUE)
|
||||
|
||||
self.add(interval, dots)
|
||||
self.play(dots.rotate_in_place, np.pi/20, rate_func = wiggle)
|
||||
self.play(dots.rotate, np.pi/20, rate_func = wiggle)
|
||||
self.wait()
|
||||
self.transform_loop(
|
||||
original_loop,
|
||||
|
@ -2095,7 +2095,7 @@ class ThumbnailImage(ClosedLoopScene):
|
|||
def construct(self):
|
||||
self.add_rect_dots(square = True)
|
||||
for dot in self.dots:
|
||||
dot.scale_in_place(1.5)
|
||||
dot.scale(1.5)
|
||||
self.add_connecting_lines(cyclic = True)
|
||||
self.connecting_lines.set_stroke(width = 10)
|
||||
self.loop.add(self.connecting_lines, self.dots)
|
||||
|
|
|
@ -901,7 +901,7 @@ class FromRealToComplex(ComplexTransformationScene):
|
|||
input_label.add_background_rectangle()
|
||||
input_label.save_state()
|
||||
input_label.replace(VGroup(*complex_zeta[1][2:5]))
|
||||
input_label.background_rectangle.scale_in_place(0.01)
|
||||
input_label.background_rectangle.scale(0.01)
|
||||
self.input_label = input_label
|
||||
|
||||
self.play(Transform(self.zeta, complex_zeta))
|
||||
|
@ -944,7 +944,7 @@ class FromRealToComplex(ComplexTransformationScene):
|
|||
|
||||
new_words = TextMobject("Not \\emph{super} \\\\", "crucial to know...")
|
||||
new_words.replace(words)
|
||||
new_words.scale_in_place(1.3)
|
||||
new_words.scale(1.3)
|
||||
|
||||
self.play(FadeIn(randy))
|
||||
self.play(
|
||||
|
@ -1318,7 +1318,7 @@ class ComplexExponentiation(Scene):
|
|||
label.move_to(plane.num_pair_to_point((0, y)))
|
||||
labels.add(label)
|
||||
for label in labels:
|
||||
label.scale_in_place(0.5)
|
||||
label.scale(0.5)
|
||||
label.next_to(
|
||||
label.get_center(), DOWN+RIGHT,
|
||||
buff = SMALL_BUFF
|
||||
|
@ -1882,7 +1882,7 @@ class ShowZetaOnHalfPlane(ZetaTransformationScene):
|
|||
when Re$(s) < 1$
|
||||
""", buff = SMALL_BUFF)
|
||||
words.add_background_rectangle()
|
||||
words.scale_in_place(0.8)
|
||||
words.scale(0.8)
|
||||
divergent_sum = TexMobject("1+2+3+4+\\cdots")
|
||||
divergent_sum.next_to(ORIGIN, UP)
|
||||
divergent_sum.to_edge(LEFT)
|
||||
|
|
|
@ -314,7 +314,7 @@ class MainBreakdown(Scene):
|
|||
hps, h_line, target_laptop = self.get_fraction(
|
||||
0, TextMobject("H/s"), Laptop()
|
||||
)
|
||||
hps.scale_in_place(0.7)
|
||||
hps.scale(0.7)
|
||||
|
||||
self.play(FadeIn(laptop))
|
||||
self.play(
|
||||
|
@ -858,7 +858,7 @@ class Thumbnail(Scene):
|
|||
num.set_stroke(BLUE_B, 3)
|
||||
num.shift(MED_SMALL_BUFF*UP)
|
||||
num.add_background_rectangle(opacity = 1)
|
||||
num.background_rectangle.scale_in_place(1.5)
|
||||
num.background_rectangle.scale(1.5)
|
||||
self.add(num)
|
||||
|
||||
background_num_str = "115792089237316195423570985008687907853269984665640564039457584007913129639936"
|
||||
|
|
|
@ -172,7 +172,7 @@ class PhotonsThroughPerpendicularFilters(PhotonPassesCompletelyOrNotAtAll):
|
|||
self.shoot_photon()
|
||||
|
||||
def reposition_filter_label(self, pf):
|
||||
pf.arrow_label.rotate_in_place(np.pi/2, OUT)
|
||||
pf.arrow_label.rotate(np.pi/2, OUT)
|
||||
pf.arrow_label.next_to(pf.arrow, RIGHT)
|
||||
return pf
|
||||
|
||||
|
@ -622,14 +622,14 @@ class ShowVariousFilterPairsWithPhotonsOverTime(PhotonsThroughPerpendicularFilte
|
|||
theta = -0.65*np.pi,
|
||||
added_anims = list(it.chain(*[
|
||||
[
|
||||
pf.arrow_label.rotate_in_place, np.pi/2, OUT,
|
||||
pf.arrow_label.rotate, np.pi/2, OUT,
|
||||
pf.arrow_label.next_to, pf.arrow, RIGHT
|
||||
]
|
||||
for pf in self.pol_filters[:2]
|
||||
]))
|
||||
)
|
||||
for pf in self.new_filters:
|
||||
pf.arrow_label.rotate_in_place(np.pi/2, OUT)
|
||||
pf.arrow_label.rotate(np.pi/2, OUT)
|
||||
pf.arrow_label.next_to(pf.arrow, RIGHT)
|
||||
|
||||
self.second_filter = self.pol_filters[1]
|
||||
|
@ -913,7 +913,7 @@ class ForgetPreviousActions(ShowVariousFilterPairs):
|
|||
VGroup(*self.pol_filters).shift(IN)
|
||||
|
||||
for pf in self.pol_filters:
|
||||
pf.arrow_label.rotate_in_place(np.pi/2, OUT)
|
||||
pf.arrow_label.rotate(np.pi/2, OUT)
|
||||
pf.arrow_label.next_to(pf.arrow, RIGHT)
|
||||
|
||||
self.stop_ambient_camera_rotation()
|
||||
|
@ -941,7 +941,7 @@ class ForgetPreviousActions(ShowVariousFilterPairs):
|
|||
|
||||
group = VGroup(*self.pol_filters)
|
||||
rect1 = SurroundingRectangle(group)
|
||||
rect1.rotate_in_place(np.pi/2, RIGHT)
|
||||
rect1.rotate(np.pi/2, RIGHT)
|
||||
rect1.rescale_to_fit(group.get_depth()+MED_SMALL_BUFF, 2, True)
|
||||
rect1.stretch_in_place(1.2, 0)
|
||||
prob_words = TextMobject(
|
||||
|
@ -961,7 +961,7 @@ class ForgetPreviousActions(ShowVariousFilterPairs):
|
|||
))
|
||||
|
||||
rect2 = SurroundingRectangle(front_filter, color = RED)
|
||||
rect2.rotate_in_place(np.pi/2, RIGHT)
|
||||
rect2.rotate(np.pi/2, RIGHT)
|
||||
rect2.rescale_to_fit(front_filter.get_depth()+MED_SMALL_BUFF, 2, True)
|
||||
rect2.stretch_in_place(1.5, 0)
|
||||
ignore_words = TextMobject("Photon \\\\", "``forgets'' this")
|
||||
|
@ -1394,7 +1394,7 @@ class VennDiagramProofByContradiction(Scene):
|
|||
for start in ("Would pass", "Pass")
|
||||
]
|
||||
for mob in label, alt_label:
|
||||
mob[-1][-1].rotate_in_place(-angle)
|
||||
mob[-1][-1].rotate(-angle)
|
||||
mob[-1][-1].shift(0.5*SMALL_BUFF*UP)
|
||||
center = circle.get_center()
|
||||
label.move_to(center)
|
||||
|
@ -1590,7 +1590,7 @@ class VennDiagramProofByContradiction(Scene):
|
|||
MoveToTarget(B),
|
||||
MoveToTarget(B.label),
|
||||
in_B.shift, 0.5*DOWN+0.2*LEFT,
|
||||
out_of_B.scale_in_place, 1./0.8,
|
||||
out_of_B.scale, 1./0.8,
|
||||
out_of_B.shift, 0.15*(UP+RIGHT),
|
||||
)
|
||||
|
||||
|
@ -2219,7 +2219,7 @@ class ReEmphasizeVennDiagram(VennDiagramProofByContradiction):
|
|||
for m1, m2 in [(C0, A1_yellow_copy), (C0, B1), (B0, A1)]
|
||||
])
|
||||
for group, vect in zip(groups[1:], [UP, 5*RIGHT+UP]):
|
||||
group.scale_in_place(0.5)
|
||||
group.scale(0.5)
|
||||
group.shift(vect)
|
||||
group.save_state()
|
||||
group.shift(-vect[0]*RIGHT + 5*LEFT)
|
||||
|
@ -2232,7 +2232,7 @@ class ReEmphasizeVennDiagram(VennDiagramProofByContradiction):
|
|||
|
||||
self.clear()
|
||||
self.play(
|
||||
groups[0].scale_in_place, 0.5,
|
||||
groups[0].scale, 0.5,
|
||||
groups[0].shift, 5*LEFT + UP,
|
||||
Write(inequality[0], run_time = 1),
|
||||
FadeIn(big_le),
|
||||
|
@ -2394,7 +2394,7 @@ class NoFirstMeasurementPreferenceBasedOnDirection(ShowVariousFilterPairs):
|
|||
chars = "ABC"
|
||||
colors = [RED, GREEN, BLUE]
|
||||
for z, char, color, pf in zip(zs, chars, colors, self.pol_filters):
|
||||
pf.scale_in_place(0.7)
|
||||
pf.scale(0.7)
|
||||
pf.move_to(z*OUT)
|
||||
label = TextMobject(char)
|
||||
label.add_background_rectangle()
|
||||
|
|
|
@ -195,7 +195,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
|
|||
)
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
jewel.rotate_in_place, np.pi/6, UP,
|
||||
jewel.rotate, np.pi/6, UP,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
for jewel in jewels
|
||||
|
@ -374,7 +374,7 @@ class IntroduceStolenNecklaceProblem(ThreeDScene):
|
|||
for jewel_type in jewel_types:
|
||||
self.play(
|
||||
*[
|
||||
ApplyMethod(jewel.scale_in_place, 1.5)
|
||||
ApplyMethod(jewel.scale, 1.5)
|
||||
for jewel in jewel_type
|
||||
],
|
||||
rate_func = there_and_back,
|
||||
|
@ -881,7 +881,7 @@ class WalkEquatorPostTransform(GraphScene):
|
|||
)
|
||||
self.play(
|
||||
dots.set_color, YELLOW,
|
||||
dots.scale_in_place, 1.2,
|
||||
dots.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.wait()
|
||||
|
@ -955,7 +955,7 @@ class WalkEquatorPostTransform(GraphScene):
|
|||
first_half = full_curve.copy().pointwise_become_partial(
|
||||
full_curve, 0, 0.5
|
||||
)
|
||||
second_half = first_half.copy().rotate_in_place(np.pi, RIGHT)
|
||||
second_half = first_half.copy().rotate(np.pi, RIGHT)
|
||||
broken_curve = VGroup(first_half, second_half)
|
||||
return broken_curve
|
||||
|
||||
|
@ -1867,7 +1867,7 @@ class ChoicesInNecklaceCutting(ReconfigurableScene):
|
|||
self.play(
|
||||
*it.chain(*[
|
||||
[
|
||||
line.rotate_in_place, np.pi/12, vect,
|
||||
line.rotate, np.pi/12, vect,
|
||||
line.set_color, RED
|
||||
]
|
||||
for line, vect in zip(self.v_lines, [OUT, IN])
|
||||
|
|
|
@ -1659,7 +1659,7 @@ class LedgerWithInitialBuyIn(SignedLedgerScene):
|
|||
lines.add(new_line)
|
||||
line = Line(LEFT, RIGHT)
|
||||
line.set_width(self.ledger.get_width())
|
||||
line.scale_in_place(0.9)
|
||||
line.scale(0.9)
|
||||
line.next_to(lines[-1], DOWN, SMALL_BUFF, LEFT)
|
||||
line.set_stroke(width = 1)
|
||||
lines[-1].add(line)
|
||||
|
@ -2366,7 +2366,7 @@ class TrustComputationalWork(DistributedLedgerScene):
|
|||
ledgers = self.get_distributed_ledgers()
|
||||
ledger = ledgers[0]
|
||||
ledger.scale(3)
|
||||
ledger[1].scale_in_place(2./3)
|
||||
ledger[1].scale(2./3)
|
||||
ledger.center().to_edge(UP).shift(4*LEFT)
|
||||
plus = TexMobject("+")
|
||||
plus.next_to(ledger, RIGHT)
|
||||
|
@ -3341,7 +3341,7 @@ class FromBankToDecentralizedSystem(DistributedBlockChainScene):
|
|||
VGroup(self.charlie, self.you).to_edge(DOWN)
|
||||
chains = self.get_distributed_ledgers()
|
||||
for pi, chain in zip(creatures, chains):
|
||||
pi.scale_in_place(1.5)
|
||||
pi.scale(1.5)
|
||||
pi.shift(0.5*pi.get_center()[0]*RIGHT)
|
||||
chain.next_to(pi, UP)
|
||||
center_chain = self.get_block_chain()
|
||||
|
|
|
@ -695,7 +695,7 @@ class ContrastTwoGraphs(SimpleVelocityGraph):
|
|||
for x in range(2):
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, dot_group1,
|
||||
lambda m : (m.scale_in_place, 0.5),
|
||||
lambda m : (m.scale, 0.5),
|
||||
rate_func = wiggle,
|
||||
lag_ratio = 0.05,
|
||||
run_time = 3,
|
||||
|
@ -705,7 +705,7 @@ class ContrastTwoGraphs(SimpleVelocityGraph):
|
|||
for x in range(2):
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, dot_group2,
|
||||
lambda m : (m.scale_in_place, 0.5),
|
||||
lambda m : (m.scale, 0.5),
|
||||
rate_func = wiggle,
|
||||
lag_ratio = 0.05,
|
||||
run_time = 3,
|
||||
|
@ -715,7 +715,7 @@ class ContrastTwoGraphs(SimpleVelocityGraph):
|
|||
for x in range(2):
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, dot_group3,
|
||||
lambda m : (m.scale_in_place, 0.5),
|
||||
lambda m : (m.scale, 0.5),
|
||||
rate_func = wiggle,
|
||||
lag_ratio = 0.05,
|
||||
run_time = 3,
|
||||
|
|
|
@ -526,7 +526,7 @@ class SymmetriesOfSquare(ThreeDScene):
|
|||
)
|
||||
if hasattr(square, "labels"):
|
||||
for label in rotation.target_mobject.labels:
|
||||
label.rotate_in_place(-angle, axis)
|
||||
label.rotate(-angle, axis)
|
||||
|
||||
if show_axis:
|
||||
axis_line = self.get_axis_line(square, axis)
|
||||
|
@ -575,7 +575,7 @@ class SymmetriesOfSquare(ThreeDScene):
|
|||
def get_axis_line(self, square, axis):
|
||||
axis_line = DashedLine(2*axis, -2*axis, **self.dashed_line_config)
|
||||
axis_line.replace(square, dim_to_match = np.argmax(np.abs(axis)))
|
||||
axis_line.scale_in_place(1.2)
|
||||
axis_line.scale(1.2)
|
||||
return axis_line
|
||||
|
||||
def add_labels_and_dots(self, square):
|
||||
|
@ -933,7 +933,7 @@ class AddCircleSymmetries(CircleSymmetries):
|
|||
self.wait(2)
|
||||
for term, arc in zip(equation[::2], arcs):
|
||||
self.play(*[
|
||||
ApplyMethod(mob.scale_in_place, 1.2, rate_func = there_and_back)
|
||||
ApplyMethod(mob.scale, 1.2, rate_func = there_and_back)
|
||||
for mob in (term, arc)
|
||||
])
|
||||
self.wait()
|
||||
|
@ -1798,7 +1798,7 @@ class MultiplicativeGroupOfReals(AdditiveGroupOfReals):
|
|||
self.zero_point = self.number_line.number_to_point(0)
|
||||
self.one = [m for m in self.number_line.numbers if m.get_tex_string() is "1"][0]
|
||||
self.one.add_background_rectangle()
|
||||
self.one.background_rectangle.scale_in_place(1.3)
|
||||
self.one.background_rectangle.scale(1.3)
|
||||
self.number_line.save_state()
|
||||
|
||||
def introduce_stretch_and_squish(self):
|
||||
|
@ -2213,7 +2213,7 @@ class MultiplicativeGroupOfComplexNumbers(AdditiveGroupOfComplexNumbers):
|
|||
brace_text.add_background_rectangle()
|
||||
brace_text.scale(0.7, about_point = brace.get_top())
|
||||
brace.rotate(angle)
|
||||
brace_text.rotate(angle).rotate_in_place(-angle)
|
||||
brace_text.rotate(angle).rotate(-angle)
|
||||
VGroup(brace, brace_text).set_color(MAROON_B)
|
||||
arc = Arc(angle, color = WHITE, radius = 0.5)
|
||||
angle_label = TexMobject("30^\\circ")
|
||||
|
@ -2485,7 +2485,7 @@ class ExponentsAsRepeatedMultiplication(TeacherStudentsScene):
|
|||
self.wait(2)
|
||||
self.play(
|
||||
imag_power.move_to, UP,
|
||||
imag_power.scale_in_place, 1.5,
|
||||
imag_power.scale, 1.5,
|
||||
imag_power.set_color, BLUE,
|
||||
self.exponential_rule.to_edge, RIGHT,
|
||||
self.get_teacher().change_mode, "speaking"
|
||||
|
@ -3301,7 +3301,7 @@ class ECLPromo(PiCreatureScene):
|
|||
)
|
||||
self.play(DrawBorderThenFill(logo_part2))
|
||||
self.play(
|
||||
logo_part2.scale_in_place, 0.5,
|
||||
logo_part2.scale, 0.5,
|
||||
logo_part2.to_edge, UP
|
||||
)
|
||||
self.play(
|
||||
|
|
|
@ -883,7 +883,7 @@ class ApproximateOneRing(CircleScene, ReconfigurableScene):
|
|||
)
|
||||
for vect in (UP, LEFT)
|
||||
]
|
||||
top_brace.scale_in_place(self.ring.R/(self.ring.R+self.dR))
|
||||
top_brace.scale(self.ring.R/(self.ring.R+self.dR))
|
||||
side_brace.set_stroke(WHITE, 0.5)
|
||||
|
||||
|
||||
|
@ -1416,7 +1416,7 @@ class GraphRectangles(CircleScene, GraphScene):
|
|||
|
||||
def show_circle_unwrapping(self):
|
||||
rings = self.fresh_rings
|
||||
rings.rotate_in_place(np.pi)
|
||||
rings.rotate(np.pi)
|
||||
rings.submobjects.reverse()
|
||||
ghost_rings = rings.copy()
|
||||
ghost_rings.set_fill(opacity = 0.25)
|
||||
|
@ -1474,7 +1474,7 @@ class GraphRectangles(CircleScene, GraphScene):
|
|||
arranged_group.set_height(FRAME_HEIGHT-1)
|
||||
arranged_group.to_corner(DOWN+LEFT, buff = MED_SMALL_BUFF)
|
||||
for mob in tex_mobs:
|
||||
mob.scale_in_place(0.7)
|
||||
mob.scale(0.7)
|
||||
|
||||
middle_rings = rings[self.num_rings_in_ring_sum_start:-1]
|
||||
alphas = np.linspace(0, 1, len(middle_rings))
|
||||
|
@ -1671,7 +1671,7 @@ class RecapCircleSolution(GraphRectangles, ReconfigurableScene):
|
|||
dr = self.area_label.get_part_by_tex("dr")
|
||||
dr_copy = dr.copy()
|
||||
circle = Circle().replace(dr)
|
||||
circle.scale_in_place(1.3)
|
||||
circle.scale(1.3)
|
||||
|
||||
dr_num = self.approximations[0][-1]
|
||||
|
||||
|
@ -2421,7 +2421,7 @@ class PlayingTowardsDADX(AreaUnderParabola, ReconfigurableScene):
|
|||
A_circle, dA_circle = [
|
||||
Circle(color = color).replace(
|
||||
mob, stretch = True
|
||||
).scale_in_place(1.5)
|
||||
).scale(1.5)
|
||||
for mob, color in [(self.A_func, RED), (self.deriv_equation, GREEN)]
|
||||
]
|
||||
q_marks = TexMobject("???")
|
||||
|
@ -2618,7 +2618,7 @@ class AlternateAreaUnderCurve(PlayingTowardsDADX):
|
|||
dA_dx = VGroup(*self.deriv_equation[:3])
|
||||
box = Rectangle(color = GREEN)
|
||||
box.replace(dA_dx, stretch = True)
|
||||
box.scale_in_place(1.3)
|
||||
box.scale(1.3)
|
||||
brace = Brace(box, UP)
|
||||
faders = VGroup(
|
||||
self.dx_to_zero_words[0],
|
||||
|
|
|
@ -627,7 +627,7 @@ class ConstructQuadraticApproximation(ExampleApproximationWithCos):
|
|||
)
|
||||
self.play(*[
|
||||
ApplyMethod(
|
||||
const.scale_in_place, 0.8,
|
||||
const.scale, 0.8,
|
||||
run_time = 2,
|
||||
rate_func = squish_rate_func(there_and_back, a, a + 0.75)
|
||||
)
|
||||
|
@ -1661,7 +1661,7 @@ class CubicAndQuarticApproximations(ConstructQuadraticApproximation):
|
|||
align_using_submobjects = True
|
||||
)
|
||||
rhs.add_background_rectangle()
|
||||
rhs.background_rectangle.scale_in_place(1.2)
|
||||
rhs.background_rectangle.scale(1.2)
|
||||
|
||||
self.cosine_third_derivative = VGroup(third_deriv, rhs)
|
||||
return self.cosine_third_derivative
|
||||
|
@ -1689,7 +1689,7 @@ class CubicAndQuarticApproximations(ConstructQuadraticApproximation):
|
|||
align_using_submobjects = True
|
||||
)
|
||||
rhs.add_background_rectangle()
|
||||
rhs.background_rectangle.scale_in_place(1.2)
|
||||
rhs.background_rectangle.scale(1.2)
|
||||
|
||||
self.cosine_fourth_derivative = VGroup(fourth_deriv, rhs)
|
||||
return self.cosine_fourth_derivative
|
||||
|
@ -2776,7 +2776,7 @@ class SecondTermIntuition(AreaIsDerivative):
|
|||
circle = Circle(color = RED)
|
||||
circle.set_height(triangle.get_height())
|
||||
circle.replace(triangle, dim_to_match = 1)
|
||||
circle.scale_in_place(1.3)
|
||||
circle.scale(1.3)
|
||||
|
||||
self.play(DrawBorderThenFill(triangle))
|
||||
self.play(ShowCreation(circle))
|
||||
|
@ -2954,13 +2954,13 @@ class SecondTermIntuition(AreaIsDerivative):
|
|||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
self.rect.scale_in_place, 0.5,
|
||||
self.rect.scale, 0.5,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.play(FadeIn(VGroup(*analytic_taylor[3:5])))
|
||||
self.wait(2)
|
||||
self.play(
|
||||
self.triangle.scale_in_place, 0.5,
|
||||
self.triangle.scale, 0.5,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.play(FadeIn(VGroup(*analytic_taylor[5:])))
|
||||
|
@ -2968,7 +2968,7 @@ class SecondTermIntuition(AreaIsDerivative):
|
|||
|
||||
class EachTermHasMeaning(TeacherStudentsScene):
|
||||
def construct(self):
|
||||
self.get_pi_creatures().scale_in_place(0.8).shift(UP)
|
||||
self.get_pi_creatures().scale(0.8).shift(UP)
|
||||
self.teacher_says(
|
||||
"Each term \\\\ has meaning!",
|
||||
target_mode = "hooray",
|
||||
|
@ -3202,7 +3202,7 @@ class ExpGraphConvergence(ExpPolynomial, ExpConvergenceExample):
|
|||
|
||||
equals = TexMobject("=")
|
||||
equals.replace(self.arrow)
|
||||
equals.scale_in_place(0.8)
|
||||
equals.scale(0.8)
|
||||
|
||||
brace = self.braces[1]
|
||||
approx_graph = approx_graphs[1]
|
||||
|
|
|
@ -1289,10 +1289,10 @@ class SecantLineToTangentLine(GraphCarTrajectory, DefineTrueDerivative):
|
|||
]
|
||||
dots = list(map(Dot, points))
|
||||
for dot in dots:
|
||||
dot.scale_in_place(0.5)
|
||||
dot.scale(0.5)
|
||||
secant_line = Line(*points)
|
||||
secant_line.set_color(VELOCITY_COLOR)
|
||||
secant_line.scale_in_place(
|
||||
secant_line.scale(
|
||||
self.secant_line_length/secant_line.get_length()
|
||||
)
|
||||
|
||||
|
@ -1366,7 +1366,7 @@ class SecantLineToTangentLine(GraphCarTrajectory, DefineTrueDerivative):
|
|||
deriv_def.add(deriv_word)
|
||||
rect = Rectangle(color = WHITE)
|
||||
rect.replace(deriv_def, stretch = True)
|
||||
rect.scale_in_place(1.2)
|
||||
rect.scale(1.2)
|
||||
deriv_def.add(rect)
|
||||
deriv_def.scale(0.7)
|
||||
deriv_def.move_to(target_upper_left, UP+LEFT)
|
||||
|
@ -1881,7 +1881,7 @@ class TCubedExample(SecantLineToTangentLine):
|
|||
slope_text.next_to(v_line.get_end(), LEFT)
|
||||
self.play(Write(slope_text))
|
||||
self.play(
|
||||
self.ds_dt_group.rotate_in_place, np.pi/24,
|
||||
self.ds_dt_group.rotate, np.pi/24,
|
||||
rate_func = wiggle
|
||||
)
|
||||
self.play(ShowCreation(v_line))
|
||||
|
@ -1934,7 +1934,7 @@ class TCubedExample(SecantLineToTangentLine):
|
|||
denominator = VGroup(*self.rhs[-2:])
|
||||
for mob in numerator, denominator, self.approach_text, self.deriv_term:
|
||||
mob.generate_target()
|
||||
mob.target.scale_in_place(1.2)
|
||||
mob.target.scale(1.2)
|
||||
mob.target.set_color(MAROON_B)
|
||||
self.play(
|
||||
MoveToTarget(
|
||||
|
@ -2164,7 +2164,7 @@ class ParadoxAtTEquals0(TCubedExample):
|
|||
VGroup(*derivative[0][:2]).set_color(DISTANCE_COLOR)
|
||||
VGroup(*derivative[0][3:5]).set_color(TIME_COLOR)
|
||||
derivative[1][3].set_color(RED)
|
||||
derivative[-1].scale_in_place(0.7)
|
||||
derivative[-1].scale(0.7)
|
||||
derivative.to_edge(RIGHT, buff = LARGE_BUFF)
|
||||
derivative.shift(2*UP)
|
||||
|
||||
|
@ -2269,7 +2269,7 @@ class ParadoxAtTEquals0(TCubedExample):
|
|||
self.play(Blink(morty))
|
||||
for word in change_word, moment_word:
|
||||
self.play(
|
||||
word.scale_in_place, 1.2,
|
||||
word.scale, 1.2,
|
||||
word.set_color, YELLOW,
|
||||
rate_func = there_and_back,
|
||||
run_time = 1.5
|
||||
|
@ -2287,7 +2287,7 @@ class ParadoxAtTEquals0(TCubedExample):
|
|||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
self.tangent_line.rotate_in_place, np.pi/24,
|
||||
self.tangent_line.rotate, np.pi/24,
|
||||
rate_func = wiggle,
|
||||
run_time = 1
|
||||
)
|
||||
|
@ -2339,7 +2339,7 @@ class TinyMovement(ZoomedScene):
|
|||
|
||||
self.add(car, time_label, start_time)
|
||||
self.play(
|
||||
zoom_rect.scale_in_place,
|
||||
zoom_rect.scale,
|
||||
10*self.distance / zoom_rect.get_width()
|
||||
)
|
||||
self.play(ShowCreation(dots[0]))
|
||||
|
|
|
@ -555,7 +555,7 @@ class NudgeSideLengthOfSquare(PiCreatureScene):
|
|||
for tup in tups:
|
||||
self.play(
|
||||
*it.chain(*[
|
||||
[m.scale_in_place, 1.2, m.set_color, RED]
|
||||
[m.scale, 1.2, m.set_color, RED]
|
||||
for m in tup
|
||||
]),
|
||||
rate_func = there_and_back
|
||||
|
@ -691,7 +691,7 @@ class NudgeSideLengthOfSquare(PiCreatureScene):
|
|||
dx_squared_group = VGroup(self.dx_squared, self.df_equation[-1])
|
||||
circle.replace(dx_squared_group, stretch = True)
|
||||
dx_squared_group.add(self.df_equation[-2])
|
||||
circle.scale_in_place(1.5)
|
||||
circle.scale(1.5)
|
||||
safe_to_ignore = TextMobject("Safe to ignore")
|
||||
safe_to_ignore.next_to(circle, DOWN, aligned_edge = LEFT)
|
||||
safe_to_ignore.set_color(circle.get_color())
|
||||
|
@ -850,8 +850,8 @@ class NudgeSideLengthOfCube(Scene):
|
|||
)
|
||||
dx_brace.stretch_in_place(1.5, 1)
|
||||
for brace, tex in (x_brace, "x"), (dx_brace, "dx"):
|
||||
brace.scale_in_place(0.95)
|
||||
brace.rotate_in_place(-np.pi/96)
|
||||
brace.scale(0.95)
|
||||
brace.rotate(-np.pi/96)
|
||||
brace.shift(0.3*(UP+LEFT))
|
||||
brace.add(brace.get_text("$%s$"%tex))
|
||||
|
||||
|
@ -917,7 +917,7 @@ class NudgeSideLengthOfCube(Scene):
|
|||
ignore_text = extras_brace.get_text(
|
||||
"Multiple \\\\ of $dx^2$"
|
||||
)
|
||||
ignore_text.scale_in_place(0.7)
|
||||
ignore_text.scale(0.7)
|
||||
x_squared_dx = TexMobject("x^2", "\\, dx")
|
||||
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ class NudgeSideLengthOfCube(Scene):
|
|||
def grab_pieces(self, start_pieces, end_pices, to_write = None):
|
||||
for piece in start_pieces:
|
||||
piece.generate_target()
|
||||
piece.target.rotate_in_place(
|
||||
piece.target.rotate(
|
||||
np.pi/12, piece.get_center()-self.cube.get_center()
|
||||
)
|
||||
piece.target.set_color(RED)
|
||||
|
@ -1183,11 +1183,11 @@ class NudgeSideLengthOfCube(Scene):
|
|||
return face
|
||||
|
||||
def pose_3d_mobject(self, mobject):
|
||||
mobject.rotate_in_place(self.pose_angle, self.pose_axis)
|
||||
mobject.rotate(self.pose_angle, self.pose_axis)
|
||||
return mobject
|
||||
|
||||
def unpose_3d_mobject(self, mobject):
|
||||
mobject.rotate_in_place(-self.pose_angle, self.pose_axis)
|
||||
mobject.rotate(-self.pose_angle, self.pose_axis)
|
||||
return mobject
|
||||
|
||||
class ShowCubeDVIn3D(Scene):
|
||||
|
@ -1496,8 +1496,8 @@ class PowerRuleAlgebra(Scene):
|
|||
|
||||
circle = Circle(color = DERIVATIVE_COLOR)
|
||||
circle.replace(derivative_term, stretch = True)
|
||||
circle.scale_in_place(1.4)
|
||||
circle.rotate_in_place(
|
||||
circle.scale(1.4)
|
||||
circle.rotate(
|
||||
Line(
|
||||
derivative_term.get_corner(DOWN+LEFT),
|
||||
derivative_term.get_corner(UP+RIGHT),
|
||||
|
@ -2092,7 +2092,7 @@ class SquareRootOfX(Scene):
|
|||
])
|
||||
for brace in little_braces:
|
||||
tex = brace.get_text("$d\\sqrt{x}$", buff = SMALL_BUFF)
|
||||
tex.scale_in_place(0.8)
|
||||
tex.scale(0.8)
|
||||
brace.add(tex)
|
||||
|
||||
area_increase = TextMobject("$dx$ = New area")
|
||||
|
@ -2588,7 +2588,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
|
|||
)
|
||||
new_angle_label.rotate(-np.pi/2)
|
||||
new_angle_label.shift(little_triangle.points[0])
|
||||
new_angle_label[1].rotate_in_place(np.pi/2)
|
||||
new_angle_label[1].rotate(np.pi/2)
|
||||
|
||||
little_triangle_lines = VGroup(*[
|
||||
Line(*list(map(little_triangle.get_corner, pair)))
|
||||
|
@ -2609,7 +2609,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
|
|||
groups = [self.d_theta_group, self.d_sine_group]
|
||||
for group, line in zip(groups, little_triangle_lines):
|
||||
self.play(ApplyMethod(
|
||||
line.rotate_in_place, np.pi/12,
|
||||
line.rotate, np.pi/12,
|
||||
rate_func = wiggle,
|
||||
remover = True,
|
||||
))
|
||||
|
@ -2633,7 +2633,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
|
|||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
self.radial_line.rotate_in_place, np.pi/12,
|
||||
self.radial_line.rotate, np.pi/12,
|
||||
Animation(big_triangle),
|
||||
rate_func = wiggle,
|
||||
)
|
||||
|
@ -2653,7 +2653,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
|
|||
),
|
||||
)
|
||||
self.play(
|
||||
new_angle_label.scale_in_place, 2,
|
||||
new_angle_label.scale, 2,
|
||||
new_angle_label.set_color, RED,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
|
|
|
@ -185,7 +185,7 @@ class TransitionFromLastVideo(TeacherStudentsScene):
|
|||
word.next_to(monster, UP)
|
||||
self.play(
|
||||
FadeIn(word),
|
||||
part.scale_in_place, 1.2,
|
||||
part.scale, 1.2,
|
||||
part.set_color, YELLOW
|
||||
)
|
||||
self.wait()
|
||||
|
@ -296,7 +296,7 @@ class PreSumRuleDiscussion(Scene):
|
|||
part = specific[i]
|
||||
self.play(
|
||||
part.set_color, YELLOW,
|
||||
part.scale_in_place, 1.2,
|
||||
part.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.wait()
|
||||
|
@ -352,11 +352,11 @@ class SumRule(GraphScene):
|
|||
direction = UP+RIGHT,
|
||||
buff = 0,
|
||||
)
|
||||
sine_label.scale_in_place(self.tex_scale_factor)
|
||||
sine_label.scale(self.tex_scale_factor)
|
||||
parabola_label = self.get_graph_label(
|
||||
parabola, "x^2", x_val = self.graph_label_x_value,
|
||||
)
|
||||
parabola_label.scale_in_place(self.tex_scale_factor)
|
||||
parabola_label.scale(self.tex_scale_factor)
|
||||
|
||||
graphs = VGroup(sine_graph, parabola)
|
||||
labels = VGroup(sine_label, parabola_label)
|
||||
|
@ -631,7 +631,7 @@ class SumRule(GraphScene):
|
|||
def indicate(mob):
|
||||
self.play(
|
||||
mob.set_color, YELLOW,
|
||||
mob.scale_in_place, 1.2,
|
||||
mob.scale, 1.2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
for tex, group in tex_group_pairs:
|
||||
|
@ -694,7 +694,7 @@ class DiscussProducts(TeacherStudentsScene):
|
|||
self.change_student_modes(
|
||||
"pondering", "confused", "erm",
|
||||
added_anims = [
|
||||
not_equals.scale_in_place, 1.3,
|
||||
not_equals.scale, 1.3,
|
||||
not_equals.set_color, RED
|
||||
]
|
||||
)
|
||||
|
@ -1053,7 +1053,7 @@ class IntroduceProductAsArea(ReconfigurableScene):
|
|||
label.set_color, RED,
|
||||
)
|
||||
self.play(
|
||||
label[1].scale_in_place, 1.1,
|
||||
label[1].scale, 1.1,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.play(boxes.restore, label.restore)
|
||||
|
@ -1175,7 +1175,7 @@ class IntroduceProductAsArea(ReconfigurableScene):
|
|||
|
||||
def indicate(mob):
|
||||
self.play(
|
||||
mob.scale_in_place, 1.2,
|
||||
mob.scale, 1.2,
|
||||
mob.set_color, YELLOW,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
|
@ -1928,7 +1928,7 @@ class GeneralizeChainRule(Scene):
|
|||
self.wait()
|
||||
self.wait()
|
||||
self.play(*it.chain(*[
|
||||
[mob.scale_in_place, 1.2, mob.set_color, YELLOW]
|
||||
[mob.scale, 1.2, mob.set_color, YELLOW]
|
||||
for mob in (example_inner, d_example_inner)
|
||||
]), rate_func = there_and_back)
|
||||
self.play(Transform(
|
||||
|
@ -1997,7 +1997,7 @@ class GeneralizeChainRule(Scene):
|
|||
self.wait()
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(d_general_outer_copy[1])
|
||||
circle.scale_in_place(1.4)
|
||||
circle.scale(1.4)
|
||||
self.play(ShowCreation(circle))
|
||||
self.play(Blink(morty))
|
||||
self.wait()
|
||||
|
@ -2042,7 +2042,7 @@ class GeneralizeChainRule(Scene):
|
|||
for mob in list(dg_dh)+list(dh_dx):
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(mob)
|
||||
circle.scale_in_place(1.3)
|
||||
circle.scale(1.3)
|
||||
self.play(ShowCreation(circle))
|
||||
self.wait()
|
||||
self.play(FadeOut(circle))
|
||||
|
@ -2161,7 +2161,7 @@ class NextVideo(TeacherStudentsScene):
|
|||
axes = Axes(x_min = -3, x_max = 3, color = GREY)
|
||||
axes.add(Circle(color = YELLOW))
|
||||
line = Line(np.sqrt(2)*UP, np.sqrt(2)*RIGHT)
|
||||
line.scale_in_place(1.5)
|
||||
line.scale(1.5)
|
||||
axes.add(line)
|
||||
|
||||
axes.scale(0.5)
|
||||
|
|
|
@ -632,7 +632,7 @@ class FakeDiagram(TeacherStudentsScene):
|
|||
|
||||
circle = Circle(color = RED)
|
||||
circle.replace(deriv, stretch = True)
|
||||
circle.scale_in_place(1.5)
|
||||
circle.scale(1.5)
|
||||
|
||||
words = TextMobject("Not a real explanation")
|
||||
words.to_edge(UP)
|
||||
|
@ -767,7 +767,7 @@ class AnalyzeExponentRatio(PiCreatureScene):
|
|||
Rectangle(
|
||||
stroke_color = BLUE,
|
||||
stroke_width = 2,
|
||||
).replace(mob).scale_in_place(1.1)
|
||||
).replace(mob).scale(1.1)
|
||||
for mob in [
|
||||
VGroup(*two_to_t_plus_dt[1:]),
|
||||
two_to_t_two_to_dt
|
||||
|
@ -875,7 +875,7 @@ class AnalyzeExponentRatio(PiCreatureScene):
|
|||
Rectangle(
|
||||
stroke_color = color,
|
||||
stroke_width = 2,
|
||||
).replace(mob, stretch = True).scale_in_place(1.1)
|
||||
).replace(mob, stretch = True).scale(1.1)
|
||||
for mob, color in [
|
||||
(VGroup(parens, dt_to_zero), GREEN),
|
||||
(extracted_two_to_t, YELLOW),
|
||||
|
@ -1248,7 +1248,7 @@ class ApplyChainRule(TeacherStudentsScene):
|
|||
exponent = VGroup(*deriv_equation[-2:])
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(exponent, stretch = True)
|
||||
circle.scale_in_place(1.5)
|
||||
circle.scale(1.5)
|
||||
|
||||
self.teacher_says("Think of the \\\\ chain rule")
|
||||
self.change_student_modes(*["pondering"]*3)
|
||||
|
|
|
@ -265,11 +265,11 @@ class SlopeOfCircleExample(ZoomedScene):
|
|||
self.activate_zooming()
|
||||
self.little_rectangle.move_to(step_line.get_center())
|
||||
self.little_rectangle.save_state()
|
||||
self.little_rectangle.scale_in_place(self.zoom_factor)
|
||||
self.little_rectangle.scale(self.zoom_factor)
|
||||
self.wait()
|
||||
self.play(
|
||||
self.little_rectangle.restore,
|
||||
dot.scale_in_place, 1./self.zoom_factor,
|
||||
dot.scale, 1./self.zoom_factor,
|
||||
run_time = 2
|
||||
)
|
||||
self.wait()
|
||||
|
@ -1105,7 +1105,7 @@ class RelatedRatesExample(ThreeDScene):
|
|||
|
||||
box = Rectangle(color = YELLOW)
|
||||
box.replace(solution)
|
||||
box.scale_in_place(1.5)
|
||||
box.scale(1.5)
|
||||
|
||||
self.play(Write(solution))
|
||||
self.wait()
|
||||
|
@ -1259,7 +1259,7 @@ class CompareLadderAndCircle(PiCreatureScene, ThreeDScene):
|
|||
|
||||
ladder_mobs.save_state()
|
||||
ladder_mobs.fade(1)
|
||||
ladder_mobs.rotate_in_place(np.pi/3, UP)
|
||||
ladder_mobs.rotate(np.pi/3, UP)
|
||||
self.play(
|
||||
self.pi_creature.change_mode, "raise_right_hand",
|
||||
self.pi_creature.look_at, ladder_mobs,
|
||||
|
@ -1791,7 +1791,7 @@ class TwoVariableFunctionAndDerivative(SlopeOfCircleExample):
|
|||
)
|
||||
self.wait(2)
|
||||
self.play(
|
||||
self.little_rectangle.scale_in_place, self.zoom_factor/2,
|
||||
self.little_rectangle.scale, self.zoom_factor/2,
|
||||
run_time = 4,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
|
@ -2115,7 +2115,7 @@ class AlternateExample(ZoomedScene):
|
|||
|
||||
circle = Circle(color = GREEN)
|
||||
circle.replace(self.rhs)
|
||||
circle.scale_in_place(1.7)
|
||||
circle.scale(1.7)
|
||||
|
||||
arrow = Arrow(rhs.get_right(), dx.get_top())
|
||||
arrow.set_color(GREEN)
|
||||
|
@ -2449,8 +2449,8 @@ class DerivativeOfNaturalLog(ZoomedScene):
|
|||
self.activate_zooming()
|
||||
lil_rect = self.little_rectangle
|
||||
lil_rect.move_to(group)
|
||||
lil_rect.scale_in_place(self.zoom_factor)
|
||||
self.play(lil_rect.scale_in_place, 1./self.zoom_factor)
|
||||
lil_rect.scale(self.zoom_factor)
|
||||
self.play(lil_rect.scale, 1./self.zoom_factor)
|
||||
self.play(Write(dx_line.label))
|
||||
self.play(Write(dy_line.label))
|
||||
self.wait()
|
||||
|
|
|
@ -315,7 +315,7 @@ class RefreshOnDerivativeDefinition(GraphScene):
|
|||
)
|
||||
for sf, color in (1.2, YELLOW), (1/1.2, WHITE):
|
||||
self.play(
|
||||
lim.scale_in_place, sf,
|
||||
lim.scale, sf,
|
||||
lim.set_color, color,
|
||||
lag_ratio = 0.5
|
||||
)
|
||||
|
@ -434,7 +434,7 @@ class DiscussLowercaseDs(RefreshOnDerivativeDefinition, PiCreatureScene, ZoomedS
|
|||
Circle(color = BLUE_B).replace(
|
||||
lhs.get_part_by_tex(tex)[0],
|
||||
stretch = True,
|
||||
).scale_in_place(1.5).rotate_in_place(-np.pi/12)
|
||||
).scale(1.5).rotate(-np.pi/12)
|
||||
for tex in ("df", "dx")
|
||||
])
|
||||
d_words = TextMobject("""
|
||||
|
@ -581,7 +581,7 @@ class DiscussLowercaseDs(RefreshOnDerivativeDefinition, PiCreatureScene, ZoomedS
|
|||
self.activate_zooming()
|
||||
lil_rect = self.little_rectangle
|
||||
lil_rect.move_to(self.ss_group)
|
||||
lil_rect.scale_in_place(3)
|
||||
lil_rect.scale(3)
|
||||
lil_rect.save_state()
|
||||
self.wait()
|
||||
self.add(self.rhs)
|
||||
|
@ -931,7 +931,7 @@ class GraphLimitExpression(GraphScene):
|
|||
))
|
||||
self.remove(colored_circle)
|
||||
self.play(
|
||||
circle.scale_in_place, 0.3,
|
||||
circle.scale, 0.3,
|
||||
run_time = 2,
|
||||
rate_func = wiggle
|
||||
)
|
||||
|
@ -1101,7 +1101,7 @@ class GraphLimitExpression(GraphScene):
|
|||
rate_func = lambda t : smooth(t, 2),
|
||||
added_anims = [
|
||||
ApplyMethod(
|
||||
hole.scale_in_place, 0.5,
|
||||
hole.scale, 0.5,
|
||||
run_time = 8
|
||||
)
|
||||
for hole in holes
|
||||
|
@ -1507,7 +1507,7 @@ class EpsilonDeltaExample(GraphLimitExpression, ZoomedScene):
|
|||
run_time = 2,
|
||||
added_anims = [
|
||||
ApplyMethod(
|
||||
hole.scale_in_place, 0.25,
|
||||
hole.scale, 0.25,
|
||||
run_time = 2
|
||||
)
|
||||
for hole in self.holes
|
||||
|
@ -1523,10 +1523,10 @@ class EpsilonDeltaExample(GraphLimitExpression, ZoomedScene):
|
|||
self.activate_zooming()
|
||||
lil_rect = self.little_rectangle
|
||||
lil_rect.move_to(self.graph_origin)
|
||||
lil_rect.scale_in_place(self.zoom_factor)
|
||||
lil_rect.scale(self.zoom_factor)
|
||||
self.add(self.holes)
|
||||
self.wait()
|
||||
self.play(lil_rect.scale_in_place, 1./self.zoom_factor)
|
||||
self.play(lil_rect.scale, 1./self.zoom_factor)
|
||||
self.wait()
|
||||
|
||||
def introduce_delta(self):
|
||||
|
@ -1566,7 +1566,7 @@ class EpsilonDeltaExample(GraphLimitExpression, ZoomedScene):
|
|||
self.get_delta_group(new_delta)
|
||||
)
|
||||
] + [
|
||||
ApplyMethod(hole.scale_in_place, 0.5)
|
||||
ApplyMethod(hole.scale, 0.5)
|
||||
for hole in self.holes
|
||||
]
|
||||
)
|
||||
|
@ -2113,7 +2113,7 @@ class LHopitalExample(LimitCounterExample, PiCreatureScene, ZoomedScene, Reconfi
|
|||
*self.zoomed_rect_center_coords
|
||||
))
|
||||
self.wait()
|
||||
self.play(lil_rect.scale_in_place, 1./self.zoom_factor)
|
||||
self.play(lil_rect.scale, 1./self.zoom_factor)
|
||||
self.wait()
|
||||
|
||||
def talk_through_sizes_of_nudges(self):
|
||||
|
@ -2337,7 +2337,7 @@ class LHopitalExample(LimitCounterExample, PiCreatureScene, ZoomedScene, Reconfi
|
|||
|
||||
dxs = VGroup(*rhs.get_parts_by_tex("dx"))
|
||||
circles = VGroup(*[
|
||||
Circle(color = GREEN).replace(dx).scale_in_place(1.3)
|
||||
Circle(color = GREEN).replace(dx).scale(1.3)
|
||||
for dx in dxs
|
||||
])
|
||||
|
||||
|
@ -2512,8 +2512,8 @@ class GeneralLHoptial(LHopitalExample):
|
|||
))
|
||||
self.wait()
|
||||
self.play(
|
||||
lil_rect.scale_in_place, 1./self.zoom_factor,
|
||||
self.a_dot.scale_in_place, 1./self.zoom_factor,
|
||||
lil_rect.scale, 1./self.zoom_factor,
|
||||
self.a_dot.scale, 1./self.zoom_factor,
|
||||
run_time = 3,
|
||||
)
|
||||
self.wait()
|
||||
|
@ -2642,7 +2642,7 @@ class GeneralLHoptial(LHopitalExample):
|
|||
|
||||
dxs = VGroup(*deriv_ratio.get_parts_by_tex("\\,dx"))
|
||||
circles = VGroup(*[
|
||||
Circle(color = GREEN).replace(dx).scale_in_place(1.3)
|
||||
Circle(color = GREEN).replace(dx).scale(1.3)
|
||||
for dx in dxs
|
||||
])
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ class InCarRestrictedView(ShowSpeedometer):
|
|||
|
||||
square = Square(stroke_color = WHITE)
|
||||
square.replace(VGroup(self.speedometer, self.speedometer_title))
|
||||
square.scale_in_place(1.5)
|
||||
square.scale(1.5)
|
||||
square.pointwise_become_partial(square, 0.25, 0.75)
|
||||
|
||||
time_label = TextMobject("Time (in seconds):", "0")
|
||||
|
@ -621,7 +621,7 @@ class ConstantVelocityPlot(PlotVelocity):
|
|||
width = 4,
|
||||
fill_opacity = 1,
|
||||
)
|
||||
bubble.content.scale_in_place(0.8)
|
||||
bubble.content.scale(0.8)
|
||||
bubble.content.shift(SMALL_BUFF*UP)
|
||||
VGroup(bubble[-1], bubble.content).shift(1.5*LEFT)
|
||||
|
||||
|
@ -710,15 +710,15 @@ class PiecewiseConstantCar(Scene):
|
|||
self.add(car)
|
||||
self.wait()
|
||||
for shift in 2, 6, 12:
|
||||
car.randy.rotate_in_place(np.pi/8)
|
||||
car.randy.rotate(np.pi/8)
|
||||
anim = MoveCar(
|
||||
car, start_point+shift*RIGHT,
|
||||
rate_func=linear
|
||||
)
|
||||
|
||||
anim.target_mobject[0].rotate_in_place(-np.pi/8)
|
||||
anim.target_mobject[0].rotate(-np.pi/8)
|
||||
# for mob in anim.starting_mobject, anim.mobject:
|
||||
# mob.randy.rotate_in_place(np.pi/6)
|
||||
# mob.randy.rotate(np.pi/6)
|
||||
self.play(anim)
|
||||
self.wait()
|
||||
|
||||
|
@ -1987,7 +1987,7 @@ class GraphSPlusC(GraphDistanceVsTime):
|
|||
v_line = self.get_vertical_line_to_graph(
|
||||
6, graph, line_class = DashedLine
|
||||
)
|
||||
v_line.scale_in_place(2)
|
||||
v_line.scale(2)
|
||||
v_line.set_color(WHITE)
|
||||
graph_label, plus_C = full_label = TexMobject(
|
||||
"s(t) = 4t^2 - \\frac{1}{3}t^3", "+C"
|
||||
|
@ -2044,7 +2044,7 @@ class LowerBound(AreaIsDerivative):
|
|||
lower_bound = self.integral.get_part_by_tex("0")
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(lower_bound)
|
||||
circle.scale_in_place(3)
|
||||
circle.scale(3)
|
||||
zero_label = lower_bound.copy()
|
||||
|
||||
self.play(ShowCreation(circle))
|
||||
|
@ -2067,7 +2067,7 @@ class LowerBound(AreaIsDerivative):
|
|||
for bound in zero_int_bounds:
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(bound)
|
||||
circle.scale_in_place(3)
|
||||
circle.scale(3)
|
||||
bound.circle = circle
|
||||
self.integral.save_state()
|
||||
equals_zero = TexMobject("=0")
|
||||
|
|
|
@ -330,7 +330,7 @@ class LengthOfDayGraph(GraphScene):
|
|||
|
||||
self.play(*[
|
||||
ApplyFunction(
|
||||
lambda c : c.scale_in_place(0.9).shift(SMALL_BUFF*DOWN).set_color(RED),
|
||||
lambda c : c.scale(0.9).shift(SMALL_BUFF*DOWN).set_color(RED),
|
||||
constant,
|
||||
run_time = 3,
|
||||
rate_func = squish_rate_func(there_and_back, a, a+0.7)
|
||||
|
@ -414,7 +414,7 @@ class AverageOfFiniteSet(Scene):
|
|||
])
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(averages[1], stretch = True)
|
||||
circle.scale_in_place(1.5)
|
||||
circle.scale(1.5)
|
||||
|
||||
self.add(lines)
|
||||
self.play(FadeIn(
|
||||
|
@ -1370,7 +1370,7 @@ class Antiderivative(AverageOfSineStart):
|
|||
self.pi_dot.get_center(),
|
||||
)
|
||||
line.set_color(RED)
|
||||
line.scale_in_place(1.2)
|
||||
line.scale(1.2)
|
||||
|
||||
new_v_line = self.v_line.copy().set_color(RED)
|
||||
new_h_line = self.h_line.copy().set_color(RED)
|
||||
|
@ -1905,7 +1905,7 @@ class GeneralAntiderivative(GeneralAverage):
|
|||
def draw_slope(self):
|
||||
line = Line(*self.graph_points_at_bounds)
|
||||
line.set_color(PINK)
|
||||
line.scale_in_place(1.3)
|
||||
line.scale(1.3)
|
||||
|
||||
self.play(ShowCreation(line, run_time = 2))
|
||||
self.wait()
|
||||
|
|
|
@ -331,7 +331,7 @@ class IntroduceNotation(TeacherStudentsScene):
|
|||
for mob in numerator, denominator:
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(mob, stretch = True)
|
||||
circle.scale_in_place(1.3)
|
||||
circle.scale(1.3)
|
||||
mob.circle = circle
|
||||
dx_to_zero = TexMobject("dx \\to 0")
|
||||
dx_to_zero.set_color(YELLOW)
|
||||
|
@ -643,7 +643,7 @@ class HowToReadNotation(GraphScene, ReconfigurableScene):
|
|||
left_shifter.shift, 0.2*LEFT,
|
||||
right_shifter.shift, 0.2*RIGHT,
|
||||
ReplacementTransform(pre_exp_two, exp_two),
|
||||
ddf_over_dx_squared.get_part_by_tex("over").scale_in_place, 0.8
|
||||
ddf_over_dx_squared.get_part_by_tex("over").scale, 0.8
|
||||
)
|
||||
self.wait(2)
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@ class PragmatismToArt(Scene):
|
|||
art
|
||||
),
|
||||
pragmatism.fade, 0.7,
|
||||
pragmatism.rotate_in_place, np.pi/4,
|
||||
pragmatism.rotate, np.pi/4,
|
||||
pragmatism.shift, DOWN+LEFT
|
||||
)
|
||||
self.play(Blink(morty))
|
||||
|
@ -627,7 +627,7 @@ class IntroduceTinyChangeInArea(CircleScene):
|
|||
added_anims = [self.pi_creature.change_mode, "pondering"]
|
||||
)
|
||||
|
||||
circum_brace = Brace(almost_rect, UP).scale_in_place(0.95)
|
||||
circum_brace = Brace(almost_rect, UP).scale(0.95)
|
||||
dR_brace = TexMobject("\\}")
|
||||
dR_brace.stretch(0.5, 1)
|
||||
dR_brace.next_to(almost_rect, RIGHT)
|
||||
|
@ -869,7 +869,7 @@ class BuildToDADR(CircleScene):
|
|||
rate_func = there_and_back
|
||||
)
|
||||
self.play(
|
||||
self.nudge_label.scale_in_place, 2,
|
||||
self.nudge_label.scale, 2,
|
||||
rate_func = there_and_back
|
||||
)
|
||||
self.wait(2)
|
||||
|
@ -1191,7 +1191,7 @@ class NameDerivative(IntroduceTinyChangeInArea):
|
|||
|
||||
dA_dR_circle = Circle()
|
||||
dA_dR_circle.replace(dA_dR, stretch = True)
|
||||
dA_dR_circle.scale_in_place(1.5)
|
||||
dA_dR_circle.scale(1.5)
|
||||
dA_dR_circle.set_color(BLUE)
|
||||
|
||||
words = TextMobject(
|
||||
|
@ -1351,7 +1351,7 @@ class NameDerivative(IntroduceTinyChangeInArea):
|
|||
self.play(Transform(self.last_mover, equals))
|
||||
self.remove(self.last_mover)
|
||||
self.play(
|
||||
equals.scale_in_place, 1.5,
|
||||
equals.scale, 1.5,
|
||||
equals.set_color, GREEN,
|
||||
rate_func = there_and_back,
|
||||
run_time = 2
|
||||
|
@ -1598,7 +1598,7 @@ class DerivativeAsTangentLine(ZoomedScene):
|
|||
self.play(ShowCreation(dashed_line))
|
||||
self.play(ShowCreation(dot))
|
||||
self.play(ShowCreation(arrow))
|
||||
self.play(dot.scale_in_place, 2, rate_func = there_and_back)
|
||||
self.play(dot.scale, 2, rate_func = there_and_back)
|
||||
self.wait()
|
||||
self.play(*list(map(FadeOut, [dashed_line, dot, arrow])))
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ class IntroduceConcentricRings(CircleScene):
|
|||
self.radial_line.get_center = self.circle.get_center
|
||||
self.radial_line.save_state()
|
||||
self.radial_line.generate_target()
|
||||
self.radial_line.target.scale_in_place(
|
||||
self.radial_line.target.scale(
|
||||
0.1 / self.radial_line.get_length()
|
||||
)
|
||||
self.r_label.generate_target()
|
||||
|
@ -1934,7 +1934,7 @@ class IntroduceConcentricRings(CircleScene):
|
|||
self.remove(self.get_mobjects_from_last_animation()[0])
|
||||
self.add(zero_target)
|
||||
self.wait()
|
||||
self.radial_line.target.scale_in_place(
|
||||
self.radial_line.target.scale(
|
||||
self.radius/self.radial_line.get_length()
|
||||
)
|
||||
equals_0.target = TexMobject("=R")
|
||||
|
|
|
@ -3,9 +3,9 @@ from manim_imports_ext import *
|
|||
from functools import reduce
|
||||
|
||||
def break_up(mobject, factor = 1.3):
|
||||
mobject.scale_in_place(factor)
|
||||
mobject.scale(factor)
|
||||
for submob in mobject:
|
||||
submob.scale_in_place(1./factor)
|
||||
submob.scale(1./factor)
|
||||
return mobject
|
||||
|
||||
class Britain(SVGMobject):
|
||||
|
@ -125,7 +125,7 @@ class ZoomInOnFractal(PiCreatureScene):
|
|||
|
||||
|
||||
def tweak_fractal_subpart(self, subpart):
|
||||
subpart.rotate_in_place(np.pi/4)
|
||||
subpart.rotate(np.pi/4)
|
||||
|
||||
class WhatAreFractals(TeacherStudentsScene):
|
||||
def construct(self):
|
||||
|
@ -284,7 +284,7 @@ class SelfSimilarFractalsAsSubset(Scene):
|
|||
|
||||
small_rect = Rectangle()
|
||||
small_rect.replace(VGroup(fractals, title), stretch = True)
|
||||
small_rect.scale_in_place(1.2)
|
||||
small_rect.scale(1.2)
|
||||
self.small_rect = small_rect
|
||||
|
||||
group = VGroup(fractals, title, small_rect)
|
||||
|
@ -837,9 +837,9 @@ class ScaledLineMass(Scene):
|
|||
|
||||
shape_copy = shape.copy()
|
||||
shape_copy.next_to(shape, DOWN, buff = self.shape_to_shape_buff)
|
||||
shape_copy.scale_in_place(self.break_up_factor)
|
||||
shape_copy.scale(self.break_up_factor)
|
||||
for submob in shape_copy:
|
||||
submob.scale_in_place(1./self.break_up_factor)
|
||||
submob.scale(1./self.break_up_factor)
|
||||
|
||||
little_brace = Brace(shape_copy[0], self.brace_direction)
|
||||
little_brace_text = little_brace.get_text("$\\frac{1}{2}$")
|
||||
|
@ -1025,7 +1025,7 @@ class DefineTwoDimensional(PiCreatureScene):
|
|||
shape, brace = group
|
||||
bottom_L = self.bottom_L.copy()
|
||||
shape.generate_target()
|
||||
shape.target.scale_in_place(
|
||||
shape.target.scale(
|
||||
self.scale_factor,
|
||||
)
|
||||
brace.target = Brace(shape.target, LEFT)
|
||||
|
@ -2226,7 +2226,7 @@ class IntroduceLogLogPlot(GraphScene):
|
|||
fill_opacity = 0.7,
|
||||
)
|
||||
box.replace(expression, stretch = True)
|
||||
box.scale_in_place(1.2)
|
||||
box.scale(1.2)
|
||||
expression.add_to_back(box)
|
||||
self.add(expression)
|
||||
|
||||
|
|
|
@ -798,7 +798,7 @@ class OfferAHybrid(SliderScene):
|
|||
titles.to_edge(UP)
|
||||
titles[1].set_color(BLUE)
|
||||
titles.generate_target()
|
||||
titles[1].scale_in_place(0.001)
|
||||
titles[1].scale(0.001)
|
||||
titles[0].shift(FRAME_X_RADIUS*LEFT/2)
|
||||
titles.target[0].shift(FRAME_WIDTH*LEFT/3)
|
||||
titles[2].shift(FRAME_X_RADIUS*RIGHT/2)
|
||||
|
|
|
@ -1779,7 +1779,7 @@ class NameGaussianIntegers(LatticePointScene):
|
|||
def restrict_to_one_circle(self):
|
||||
dots = self.get_lattice_points_on_r_squared_circle(25).copy()
|
||||
for dot in dots:
|
||||
dot.scale_in_place(2)
|
||||
dot.scale(2)
|
||||
circle = self.get_circle(5)
|
||||
radius, root_label = self.get_radial_line_with_label(5)
|
||||
|
||||
|
@ -4083,7 +4083,7 @@ class CountLatticePointsInBigCircle(LatticePointScene):
|
|||
self.plane.scale(2)
|
||||
self.lattice_points.scale(2)
|
||||
for point in self.lattice_points:
|
||||
point.scale_in_place(0.5)
|
||||
point.scale(0.5)
|
||||
|
||||
def introduce_points(self):
|
||||
circle = self.get_circle(radius = self.max_lattice_point_radius)
|
||||
|
@ -4157,7 +4157,7 @@ class CountLatticePointsInBigCircle(LatticePointScene):
|
|||
center_dot = self.lattice_points[0]
|
||||
circle = Circle(color = RED)
|
||||
circle.replace(center_dot)
|
||||
circle.scale_in_place(2)
|
||||
circle.scale(2)
|
||||
arrow = Arrow(ORIGIN, UP+RIGHT, color = RED)
|
||||
arrow.next_to(circle, DOWN+LEFT, SMALL_BUFF)
|
||||
new_max = 2*self.max_lattice_point_radius
|
||||
|
@ -4193,7 +4193,7 @@ class CountLatticePointsInBigCircle(LatticePointScene):
|
|||
self.play(FadeOut(self.rings))
|
||||
self.play(
|
||||
ApplyMethod(
|
||||
VGroup(self.circle, self.radius).scale_in_place, 2,
|
||||
VGroup(self.circle, self.radius).scale, 2,
|
||||
rate_func=linear,
|
||||
),
|
||||
LaggedStartMap(
|
||||
|
|
14
_2017/mug.py
14
_2017/mug.py
|
@ -557,7 +557,7 @@ class IntroduceGraph(PiCreatureScene):
|
|||
self.wait()
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, lines,
|
||||
lambda l : (l.rotate_in_place, np.pi/12),
|
||||
lambda l : (l.rotate, np.pi/12),
|
||||
rate_func = wiggle
|
||||
))
|
||||
self.play(
|
||||
|
@ -744,7 +744,7 @@ class IntroduceRegions(UtilitiesPuzzleScene):
|
|||
lambda m, a : m.set_fill(opacity = int(2*a)),
|
||||
),
|
||||
ApplyMethod(
|
||||
paint_bucket.scale_in_place, 0.5,
|
||||
paint_bucket.scale, 0.5,
|
||||
rate_func = there_and_back,
|
||||
),
|
||||
run_time = 0.25,
|
||||
|
@ -871,7 +871,7 @@ class AskAboutRegions(IntroduceRegions):
|
|||
self.play(MoveToTarget(front_regions))
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, front_regions,
|
||||
lambda m : (m.rotate_in_place, np.pi/12),
|
||||
lambda m : (m.rotate, np.pi/12),
|
||||
rate_func = wiggle,
|
||||
lag_ratio = 0.75,
|
||||
run_time = 1
|
||||
|
@ -1110,7 +1110,7 @@ class LightUpNodes(IntroduceRegions):
|
|||
houses, utilities = self.houses, self.utilities
|
||||
|
||||
#First region, lines 0, 1, 4, 3
|
||||
lines[4].rotate_in_place(np.pi)
|
||||
lines[4].rotate(np.pi)
|
||||
region = regions[1]
|
||||
|
||||
self.play(ShowCreation(lines[0]))
|
||||
|
@ -1144,7 +1144,7 @@ class LightUpNodes(IntroduceRegions):
|
|||
|
||||
#Next region, lines 2, 7, 8
|
||||
region = regions[3]
|
||||
lines[6].rotate_in_place(np.pi)
|
||||
lines[6].rotate(np.pi)
|
||||
|
||||
for line, vertex in (lines[2], houses[2]), (lines[6], utilities[2]):
|
||||
self.play(ShowCreation(line), *it.chain(
|
||||
|
@ -1861,8 +1861,8 @@ class EulersFormulaForGeneralPlanarGraph(LightUpNodes, ThreeDScene):
|
|||
])
|
||||
cube = self.get_cube_faces(points)
|
||||
cube.shift(OUT)
|
||||
cube.rotate_in_place(np.pi/12, RIGHT)
|
||||
cube.rotate_in_place(np.pi/6, UP)
|
||||
cube.rotate(np.pi/12, RIGHT)
|
||||
cube.rotate(np.pi/6, UP)
|
||||
cube.shift(MED_LARGE_BUFF*DOWN)
|
||||
shade_in_3d(cube)
|
||||
|
||||
|
|
|
@ -442,7 +442,7 @@ class ExampleThrees(PiCreatureScene):
|
|||
self.play(
|
||||
Animation(randy),
|
||||
moving_three.replace, randy.eyes[1],
|
||||
moving_three.scale_in_place, 0.7,
|
||||
moving_three.scale, 0.7,
|
||||
run_time = 2,
|
||||
lag_ratio = 0.5,
|
||||
)
|
||||
|
@ -1074,7 +1074,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
|||
neuron.move_to(pixel)
|
||||
neuron.set_fill(WHITE, pixel.get_fill_opacity())
|
||||
neurons.add(neuron)
|
||||
neurons.scale_in_place(1.2)
|
||||
neurons.scale(1.2)
|
||||
neurons.space_out_submobjects(1.3)
|
||||
neurons.to_edge(DOWN)
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
|||
layer.save_state()
|
||||
layer.rotate(np.pi/2)
|
||||
layer.center()
|
||||
layer.brace_label.rotate_in_place(-np.pi/2)
|
||||
layer.brace_label.rotate(-np.pi/2)
|
||||
n = network_mob.max_shown_neurons/2
|
||||
|
||||
rows = VGroup(*[
|
||||
|
@ -1255,7 +1255,7 @@ class IntroduceEachLayer(PreviewMNistNetwork):
|
|||
for mob in neuron, label:
|
||||
mob.save_state()
|
||||
mob.generate_target()
|
||||
neuron.target.scale_in_place(4)
|
||||
neuron.target.scale(4)
|
||||
neuron.target.shift(1.5*RIGHT)
|
||||
label.target.scale(1.5)
|
||||
label.target.next_to(neuron.target, RIGHT)
|
||||
|
@ -2415,7 +2415,7 @@ class IntroduceWeights(IntroduceEachLayer):
|
|||
)
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, edges,
|
||||
lambda m : (m.rotate_in_place, np.pi/24),
|
||||
lambda m : (m.rotate, np.pi/24),
|
||||
rate_func = wiggle,
|
||||
run_time = 2
|
||||
))
|
||||
|
@ -3185,7 +3185,7 @@ class ShowRemainingNetwork(IntroduceWeights):
|
|||
self.bias_count,
|
||||
)
|
||||
group.generate_target()
|
||||
group.target.scale_in_place(0.8)
|
||||
group.target.scale(0.8)
|
||||
rect = SurroundingRectangle(group.target, buff = MED_SMALL_BUFF)
|
||||
num_mob = TexMobject("13{,}002")
|
||||
num_mob.scale(1.5)
|
||||
|
|
|
@ -253,7 +253,7 @@ class PreviewLearning(NetworkScene):
|
|||
nc_color if w > 0 else pc_color,
|
||||
3*abs(w)/max_w
|
||||
)
|
||||
edge.rotate_in_place(np.pi)
|
||||
edge.rotate(np.pi)
|
||||
if i == 2:
|
||||
delta_edges.submobjects = [
|
||||
delta_edges[j]
|
||||
|
@ -314,7 +314,7 @@ class PreviewLearning(NetworkScene):
|
|||
return LaggedStartMap(
|
||||
ApplyFunction, edges,
|
||||
lambda mob : (
|
||||
lambda m : m.rotate_in_place(np.pi/12).set_color(YELLOW),
|
||||
lambda m : m.rotate(np.pi/12).set_color(YELLOW),
|
||||
mob
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
@ -743,7 +743,7 @@ class IntroduceCostFunction(PreviewLearning):
|
|||
)
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, neuron.edges_in,
|
||||
lambda m : (m.rotate_in_place, np.pi/12),
|
||||
lambda m : (m.rotate, np.pi/12),
|
||||
rate_func = wiggle,
|
||||
run_time = 2
|
||||
))
|
||||
|
@ -1298,7 +1298,7 @@ class EmphasizeComplexityOfCostFunction(IntroduceCostFunction):
|
|||
input_words, output_words, parameter_words = self.curr_words
|
||||
|
||||
network_mob.generate_target()
|
||||
network_mob.target.scale_in_place(0.7)
|
||||
network_mob.target.scale(0.7)
|
||||
network_mob.target.to_edge(UP, buff = LARGE_BUFF)
|
||||
rect = SurroundingRectangle(network_mob.target, color = BLUE)
|
||||
network_label = TextMobject("Input")
|
||||
|
@ -1771,7 +1771,7 @@ class SingleVariableCostFunction(GraphScene):
|
|||
target_x = 0.94
|
||||
point = VectorizedPoint(self.coords_to_point(x, 0))
|
||||
line = self.get_tangent_line(x)
|
||||
line.scale_in_place(0.5)
|
||||
line.scale(0.5)
|
||||
def update_line(line):
|
||||
x = self.x_axis.point_to_number(point.get_center())
|
||||
self.make_line_tangent(line, x)
|
||||
|
@ -2460,7 +2460,7 @@ class TwoGradientInterpretationsIn2D(Scene):
|
|||
grad_group.next_to(ORIGIN, RIGHT).to_edge(UP, buff = MED_SMALL_BUFF)
|
||||
for mob in grad, vect, func:
|
||||
mob.add_background_rectangle()
|
||||
mob.background_rectangle.scale_in_place(1.1)
|
||||
mob.background_rectangle.scale(1.1)
|
||||
|
||||
self.play(Write(func, run_time = 1))
|
||||
self.play(Write(grad_group, run_time = 2))
|
||||
|
@ -2668,7 +2668,7 @@ class GradientNudging(PreviewLearning):
|
|||
else:
|
||||
new_color = self.negative_edge_color
|
||||
edge.set_stroke(new_color, abs(new_num))
|
||||
edge.rotate_in_place(np.pi)
|
||||
edge.rotate(np.pi)
|
||||
return MoveToTarget(
|
||||
edges,
|
||||
lag_ratio = 0.5,
|
||||
|
@ -3571,7 +3571,7 @@ class TrainOnImages(PreviewLearning, RandomlyLabeledImageData):
|
|||
for group in groups:
|
||||
for edge in edges:
|
||||
edge.generate_target()
|
||||
edge.target.rotate_in_place(np.pi)
|
||||
edge.target.rotate(np.pi)
|
||||
alt_edge = random.choice(edges)
|
||||
color = alt_edge.get_stroke_color()
|
||||
width = alt_edge.get_stroke_width()
|
||||
|
|
|
@ -484,7 +484,7 @@ class ShowAveragingCost(PreviewLearning):
|
|||
self.play(LaggedStartMap(
|
||||
ApplyFunction, edges,
|
||||
lambda edge : (
|
||||
lambda m : m.rotate_in_place(np.pi/12).set_color(YELLOW),
|
||||
lambda m : m.rotate(np.pi/12).set_color(YELLOW),
|
||||
edge,
|
||||
),
|
||||
rate_func = lambda t : wiggle(t, 4),
|
||||
|
@ -509,7 +509,7 @@ class ShowAveragingCost(PreviewLearning):
|
|||
self.wait(self.time_per_example)
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, reversed_edges,
|
||||
lambda m : (m.rotate_in_place, np.pi),
|
||||
lambda m : (m.rotate, np.pi),
|
||||
run_time = 1,
|
||||
lag_ratio = 0.2,
|
||||
))
|
||||
|
@ -588,7 +588,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
return LaggedStartMap(
|
||||
ApplyFunction, edge_group,
|
||||
lambda edge : (
|
||||
lambda m : m.rotate_in_place(np.pi/12).set_color(YELLOW),
|
||||
lambda m : m.rotate(np.pi/12).set_color(YELLOW),
|
||||
edge
|
||||
),
|
||||
rate_func = wiggle,
|
||||
|
@ -632,7 +632,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
for mover in movers:
|
||||
mover.save_state()
|
||||
mover.generate_target()
|
||||
mover.target.scale_in_place(2)
|
||||
mover.target.scale(2)
|
||||
neurons[2].save_state()
|
||||
|
||||
neurons.target.to_edge(DOWN, MED_LARGE_BUFF)
|
||||
|
@ -721,7 +721,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
arrow.shift(0.175*RIGHT)
|
||||
if i == 2:
|
||||
arrow.set_color(BLUE)
|
||||
arrow.rotate_in_place(np.pi)
|
||||
arrow.rotate(np.pi)
|
||||
arrows.add(arrow)
|
||||
|
||||
rect = SurroundingRectangle(VGroup(neuron, label))
|
||||
|
@ -773,7 +773,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
self.play(LaggedStartMap(
|
||||
ApplyFunction, arrows,
|
||||
lambda arrow : (
|
||||
lambda m : m.scale_in_place(0.5).set_color(YELLOW),
|
||||
lambda m : m.scale(0.5).set_color(YELLOW),
|
||||
arrow,
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
@ -966,7 +966,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
self.play(LaggedStartMap(
|
||||
ApplyFunction, edges,
|
||||
lambda edge : (
|
||||
lambda m : m.rotate_in_place(np.pi/12).set_stroke(YELLOW),
|
||||
lambda m : m.rotate(np.pi/12).set_stroke(YELLOW),
|
||||
edge
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
@ -1164,7 +1164,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
self.play(LaggedStartMap(
|
||||
ApplyFunction, prev_neurons,
|
||||
lambda neuron : (
|
||||
lambda m : m.scale_in_place(0.5).set_color(YELLOW),
|
||||
lambda m : m.scale(0.5).set_color(YELLOW),
|
||||
neuron
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
@ -1364,7 +1364,7 @@ class WalkThroughTwoExample(ShowAveragingCost):
|
|||
edge_copies = neuron.edges_in.copy()
|
||||
for edge in edge_copies:
|
||||
edge.set_stroke(arrow.get_color(), 2)
|
||||
edge.rotate_in_place(np.pi)
|
||||
edge.rotate(np.pi)
|
||||
self.play(
|
||||
edges.set_stroke, None, 0.15,
|
||||
neuron.edges_in.restore,
|
||||
|
@ -1579,7 +1579,7 @@ class ConstructGradientFromAllTrainingExamples(Scene):
|
|||
for i in range(5)
|
||||
])
|
||||
more_h_dots.shift(MED_LARGE_BUFF*RIGHT)
|
||||
more_h_dots[-2].rotate_in_place(-np.pi/4)
|
||||
more_h_dots[-2].rotate(-np.pi/4)
|
||||
more_v_dots = VGroup(*[
|
||||
self.dots.copy().move_to(
|
||||
self.get_grid_position(3, j)
|
||||
|
@ -1595,7 +1595,7 @@ class ConstructGradientFromAllTrainingExamples(Scene):
|
|||
for j in range(1, self.n_examples)
|
||||
])
|
||||
for change in changes:
|
||||
change.scale_in_place(self.change_scale_val)
|
||||
change.scale(self.change_scale_val)
|
||||
|
||||
self.play(
|
||||
LaggedStartMap(FadeIn, examples),
|
||||
|
@ -1960,7 +1960,7 @@ class OrganizeDataIntoMiniBatches(Scene):
|
|||
return LaggedStartMap(
|
||||
ApplyFunction, row,
|
||||
lambda row : (
|
||||
lambda m : m.scale_in_place(0.75).set_color(YELLOW),
|
||||
lambda m : m.scale(0.75).set_color(YELLOW),
|
||||
row
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
@ -3883,7 +3883,7 @@ class GeneralFormulas(SimplestNetworkExample):
|
|||
self.play(LaggedStartMap(
|
||||
ApplyFunction, edges,
|
||||
lambda e : (
|
||||
lambda m : m.rotate_in_place(np.pi/12).set_color(YELLOW),
|
||||
lambda m : m.rotate(np.pi/12).set_color(YELLOW),
|
||||
e
|
||||
),
|
||||
rate_func = wiggle
|
||||
|
|
|
@ -531,7 +531,7 @@ class TwoDCase(Scene):
|
|||
self.wait()
|
||||
self.play(
|
||||
ApplyMethod(
|
||||
arc.rotate_in_place, np.pi/12,
|
||||
arc.rotate, np.pi/12,
|
||||
rate_func = wiggle,
|
||||
)
|
||||
)
|
||||
|
@ -684,7 +684,7 @@ class TwoDCase(Scene):
|
|||
def update_lines(center_lines):
|
||||
for point_mob, line in zip(point_mobs, center_lines):
|
||||
point = point_mob.get_center() - self.center
|
||||
line.rotate_in_place(
|
||||
line.rotate(
|
||||
angle_of_vector(point) - line.get_angle()
|
||||
)
|
||||
line.move_to(self.center)
|
||||
|
@ -860,7 +860,7 @@ class RevisitTwoDCase(TwoDCase):
|
|||
four = title[-1][-1]
|
||||
four_circle = Circle(color = YELLOW)
|
||||
four_circle.replace(four, dim_to_match = 1)
|
||||
four_circle.scale_in_place(1.2)
|
||||
four_circle.scale(1.2)
|
||||
|
||||
self.n_in = 0
|
||||
self.n_out = 0
|
||||
|
@ -1078,7 +1078,7 @@ class RevisitTwoDCase(TwoDCase):
|
|||
rect.set_stroke(WHITE, 2)
|
||||
brace = Brace(words[2], DOWN)
|
||||
brace_text = brace.get_text("4 equally likely outcomes")
|
||||
brace_text.scale_in_place(0.8)
|
||||
brace_text.scale(0.8)
|
||||
|
||||
self.play(ShowCreation(rect))
|
||||
self.play(GrowFromCenter(brace))
|
||||
|
@ -1152,7 +1152,7 @@ class ContrastTwoRandomProcesses(TwoDCase):
|
|||
circle = Circle(color = WHITE, radius = self.radius)
|
||||
point_mobs = self.get_point_mobs()
|
||||
for point in point_mobs:
|
||||
point.scale_in_place(1.5)
|
||||
point.scale(1.5)
|
||||
point.set_stroke(RED, 1)
|
||||
labels = self.get_point_mob_labels()
|
||||
self.get_labels_update(point_mobs, labels).update(1)
|
||||
|
|
|
@ -225,7 +225,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
brace = Brace(line, UP, buff = SMALL_BUFF)
|
||||
one = brace.get_text("1", buff = SMALL_BUFF)
|
||||
VGroup(line, brace, one).rotate(self.theta_value)
|
||||
one.rotate_in_place(-self.theta_value)
|
||||
one.rotate(-self.theta_value)
|
||||
self.circle.rotate(self.theta_value)
|
||||
|
||||
words = TextMobject("Corresponding point")
|
||||
|
@ -328,7 +328,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
self.change_mode("pondering")
|
||||
for frac, text in (tan_frac, tan_text), (cot_frac, cot_text):
|
||||
VGroup(frac[5], frac[-2]).set_color(YELLOW)
|
||||
frac.scale_in_place(0.7)
|
||||
frac.scale(0.7)
|
||||
text.save_state()
|
||||
text.next_to(frac, LEFT)
|
||||
self.play(Write(VGroup(text, frac)))
|
||||
|
@ -411,7 +411,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
|
||||
for text, frac in (sec_text, sec_frac), (csc_text, csc_frac):
|
||||
frac[-2].set_color(YELLOW)
|
||||
frac.scale_in_place(0.7)
|
||||
frac.scale(0.7)
|
||||
text.save_state()
|
||||
text.next_to(frac, LEFT)
|
||||
frac.add_to_back(text.copy())
|
||||
|
@ -487,7 +487,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
arc_theta = VGroup(*self.theta_group[1:3]).copy()
|
||||
arc_theta.rotate(-np.pi/2)
|
||||
arc_theta.shift(csc_line.get_end())
|
||||
arc_theta[1].rotate_in_place(np.pi/2)
|
||||
arc_theta[1].rotate(np.pi/2)
|
||||
|
||||
radial_line = self.theta_group[0]
|
||||
|
||||
|
@ -525,7 +525,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
|
||||
self.play(ShowCreation(tri1))
|
||||
self.play(
|
||||
ApplyMethod(tri1.rotate_in_place, np.pi/12, rate_func = wiggle),
|
||||
ApplyMethod(tri1.rotate, np.pi/12, rate_func = wiggle),
|
||||
self.pi_creature.change_mode, "thinking"
|
||||
)
|
||||
self.wait()
|
||||
|
@ -533,7 +533,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
self.play(Transform(tri1, tri2, path_arc = np.pi/2))
|
||||
self.play(Write(arc_theta))
|
||||
self.play(ApplyMethod(
|
||||
tri1.rotate_in_place, np.pi/12,
|
||||
tri1.rotate, np.pi/12,
|
||||
rate_func = wiggle
|
||||
))
|
||||
self.wait(2)
|
||||
|
@ -568,7 +568,7 @@ class ExplainTrigFunctionDistances(TrigRepresentationsScene, PiCreatureScene):
|
|||
FadeOut(sin_group)
|
||||
)
|
||||
self.play(
|
||||
radial_line.rotate_in_place, np.pi/12,
|
||||
radial_line.rotate, np.pi/12,
|
||||
rate_func = wiggle
|
||||
)
|
||||
self.wait()
|
||||
|
|
|
@ -427,7 +427,7 @@ class PythagoreanProof(Scene):
|
|||
VGroup(triangle, triangle.added_triangles),
|
||||
stretch = True
|
||||
)
|
||||
square.scale_in_place(1.01)
|
||||
square.scale(1.01)
|
||||
return square
|
||||
|
||||
#####
|
||||
|
@ -475,7 +475,7 @@ class PythagoreanProof(Scene):
|
|||
|
||||
def get_added_triangles_to_ab_squares(self, triangle, a_square):
|
||||
t1 = triangle.copy()
|
||||
t1.rotate_in_place(np.pi)
|
||||
t1.rotate(np.pi)
|
||||
group = VGroup(triangle, t1).copy()
|
||||
group.rotate(-np.pi/2)
|
||||
group.move_to(a_square.get_right(), LEFT)
|
||||
|
@ -1732,7 +1732,7 @@ class VisualizeZSquared(Scene):
|
|||
scale_factor = self.big_dot_radius/self.dot_radius
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, self.dots,
|
||||
lambda d : (d.scale_in_place, scale_factor),
|
||||
lambda d : (d.scale, scale_factor),
|
||||
rate_func = there_and_back,
|
||||
run_time = 3
|
||||
))
|
||||
|
@ -1771,7 +1771,7 @@ class VisualizeZSquared(Scene):
|
|||
about_point = self.plane_center
|
||||
)
|
||||
for dot in self.dots.target:
|
||||
dot.scale_in_place(1./scale_factor)
|
||||
dot.scale(1./scale_factor)
|
||||
self.background_plane.target.fade()
|
||||
|
||||
self.revert_to_original_skipping_status()
|
||||
|
@ -2141,7 +2141,7 @@ class DrawRadialLines(PointsWeMiss):
|
|||
dot = line.seed_dot
|
||||
|
||||
self.play(
|
||||
dot.scale_in_place, 2,
|
||||
dot.scale, 2,
|
||||
dot.set_color, RED
|
||||
)
|
||||
self.play(ReplacementTransform(dot, line))
|
||||
|
@ -2159,7 +2159,7 @@ class DrawRadialLines(PointsWeMiss):
|
|||
new_dots = VGroup(*[line.new_dots for line in self.lines])
|
||||
for dot in seed_dots:
|
||||
dot.generate_target()
|
||||
dot.target.scale_in_place(1.5)
|
||||
dot.target.scale(1.5)
|
||||
dot.target.set_color(RED)
|
||||
|
||||
self.play(LaggedStartMap(
|
||||
|
@ -2724,7 +2724,7 @@ class FinalProof(RationalPointsOnUnitCircle):
|
|||
uv_arc.shift(self.plane_center)
|
||||
theta = TexMobject("\\theta")
|
||||
theta.next_to(uv_arc, RIGHT, SMALL_BUFF, DOWN)
|
||||
theta.scale_in_place(0.8)
|
||||
theta.scale(0.8)
|
||||
|
||||
square_point = self.background_plane.number_to_point(z**2)
|
||||
square_dot = Dot(square_point, color = MAROON_B)
|
||||
|
@ -3057,7 +3057,7 @@ class Poster(DrawRadialLines):
|
|||
|
||||
for dot_group in self.dots, self.new_dots:
|
||||
for dot in dot_group.family_members_with_points():
|
||||
dot.scale_in_place(0.5)
|
||||
dot.scale(0.5)
|
||||
self.remove(self.coordinate_labels)
|
||||
|
||||
# rect = Rectangle(
|
||||
|
|
|
@ -430,7 +430,7 @@ class DirectionOfPolarizationScene(FilterScene):
|
|||
anchors = r1.get_anchors()
|
||||
vect = anchors[0] - anchors[3]
|
||||
curr_angle = angle_of_vector([vect[2], -vect[1]])
|
||||
r1.rotate_in_place(target_angle - curr_angle, RIGHT)
|
||||
r1.rotate(target_angle - curr_angle, RIGHT)
|
||||
|
||||
epsilon = 0.001
|
||||
curr_depth = max(r2.get_depth(), epsilon)
|
||||
|
@ -2223,7 +2223,7 @@ class EnergyOfWavesWavePortion(DirectWaveOutOfScreen):
|
|||
brace = Brace(Line(ORIGIN, 4*RIGHT))
|
||||
brace.rotate(np.pi/4, OUT)
|
||||
brace.A = brace.get_tex("A", buff = MED_SMALL_BUFF)
|
||||
brace.A.scale_in_place(2)
|
||||
brace.A.scale(2)
|
||||
brace.A.set_color(GREEN)
|
||||
brace_group = VGroup(brace, brace.A)
|
||||
self.position_brace_group(brace_group)
|
||||
|
@ -2246,7 +2246,7 @@ class EnergyOfWavesWavePortion(DirectWaveOutOfScreen):
|
|||
v_brace = Brace(Line(ORIGIN, length*UP), LEFT)
|
||||
for brace, c in (h_brace, "x"), (v_brace, "y"):
|
||||
brace.A = brace.get_tex("A_%s"%c, buff = MED_LARGE_BUFF)
|
||||
brace.A.scale_in_place(2)
|
||||
brace.A.scale(2)
|
||||
brace.A.set_color(GREEN)
|
||||
brace_group = VGroup(h_brace, h_brace.A, v_brace, v_brace.A)
|
||||
self.position_brace_group(brace_group)
|
||||
|
@ -2628,7 +2628,7 @@ class DescribePhoton(ThreeDScene):
|
|||
superposition.target.set_color_by_tex("gamma", TEAL_D)
|
||||
superposition.target.set_color_by_tex("delta", MAROON)
|
||||
for part in superposition.target.get_parts_by_tex("rangle"):
|
||||
part[1].rotate_in_place(-np.pi/12)
|
||||
part[1].rotate(-np.pi/12)
|
||||
superposition.target.rotate(np.pi/2, RIGHT)
|
||||
superposition.target.rotate(np.pi/2, OUT)
|
||||
superposition.target.move_to(superposition)
|
||||
|
@ -3025,7 +3025,7 @@ class ShootPhotonThroughFilter(DirectionOfPolarizationScene):
|
|||
Rotate(self.superposition_tex, np.pi/2),
|
||||
] + [
|
||||
ApplyMethod(
|
||||
v.rotate_in_place,
|
||||
v.rotate,
|
||||
-np.pi/2,
|
||||
method_kwargs = {"axis" : v.get_vector()}
|
||||
)
|
||||
|
@ -3050,7 +3050,7 @@ class ShootPhotonThroughFilter(DirectionOfPolarizationScene):
|
|||
Rotate(self.superposition_tex, -np.pi/2),
|
||||
] + [
|
||||
ApplyMethod(
|
||||
v.rotate_in_place,
|
||||
v.rotate,
|
||||
np.pi/2,
|
||||
method_kwargs = {"axis" : v.get_vector()}
|
||||
)
|
||||
|
@ -3473,7 +3473,7 @@ class PhotonAtSlightAngle(ThreeFilters):
|
|||
phi = np.pi/2, theta = 0,
|
||||
added_anims = list(it.chain(*[
|
||||
[
|
||||
v.rotate_in_place, np.pi/2, v.get_vector(),
|
||||
v.rotate, np.pi/2, v.get_vector(),
|
||||
v.set_fill, None, 0.7,
|
||||
]
|
||||
for v in self.photon.mobject
|
||||
|
|
|
@ -299,8 +299,8 @@ class EquationSolver1d(GraphScene, ZoomedScene):
|
|||
self.coords_to_point(self.targetX, self.targetY))
|
||||
inverseZoomFactor = 1/float(self.zoom_factor)
|
||||
self.play(
|
||||
lowerDot.scale_in_place, inverseZoomFactor,
|
||||
upperDot.scale_in_place, inverseZoomFactor)
|
||||
lowerDot.scale, inverseZoomFactor,
|
||||
upperDot.scale, inverseZoomFactor)
|
||||
|
||||
|
||||
def makeUpdater(xAtStart, fixed_guess_x):
|
||||
|
@ -370,7 +370,7 @@ class EquationSolver1d(GraphScene, ZoomedScene):
|
|||
midDot = Dot(midCoords, color = sign_color)
|
||||
if(self.iteration_at_which_to_start_zoom != None and
|
||||
i >= self.iteration_at_which_to_start_zoom):
|
||||
midDot.scale_in_place(inverseZoomFactor)
|
||||
midDot.scale(inverseZoomFactor)
|
||||
self.add(midDot)
|
||||
midYLine = DashedLine(midCoords, self.coords_to_point(0, midY), color = sign_color)
|
||||
self.play(
|
||||
|
|
|
@ -836,7 +836,7 @@ class UpdatePokerPrior(SampleSpaceScene):
|
|||
|
||||
def tweak_non_flush_case(self):
|
||||
her = self.her
|
||||
her.scale_in_place(0.7)
|
||||
her.scale(0.7)
|
||||
her.change_mode("plain")
|
||||
her.shift(DOWN)
|
||||
her.glasses = SunGlasses(her)
|
||||
|
|
|
@ -1057,7 +1057,7 @@ class SourceOfConfusion(Scene):
|
|||
rule_rect.set_color(BLUE)
|
||||
rule.save_state()
|
||||
rule.replace(words_rect)
|
||||
rule.scale_in_place(0.9)
|
||||
rule.scale(0.9)
|
||||
rule.set_fill(opacity = 0)
|
||||
|
||||
self.play(ShowCreation(words_rect))
|
||||
|
|
|
@ -1140,7 +1140,7 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
|
|||
"=",
|
||||
str(len(stack))
|
||||
)
|
||||
equation[0].scale_in_place(0.6)
|
||||
equation[0].scale(0.6)
|
||||
equation.arrange(RIGHT, SMALL_BUFF)
|
||||
equation.set_color(YELLOW)
|
||||
equation.set_color_by_tex("=", WHITE)
|
||||
|
@ -1226,7 +1226,7 @@ class ProbabilityOfKWomenInGroupOfFive(Scene):
|
|||
question.to_edge(UP)
|
||||
numbers = self.numbers
|
||||
circles = VGroup(*[
|
||||
Circle().replace(num, dim_to_match = 1).scale_in_place(1.5)
|
||||
Circle().replace(num, dim_to_match = 1).scale(1.5)
|
||||
for num in numbers
|
||||
])
|
||||
circles.set_color(WHITE)
|
||||
|
@ -1886,7 +1886,7 @@ class IntroducePascalsTriangle(Scene):
|
|||
self.dehighlight_num(num)
|
||||
self.remove(line)
|
||||
num.set_color(YELLOW)
|
||||
num.scale_in_place(1.2)
|
||||
num.scale(1.2)
|
||||
self.add(line)
|
||||
self.wait()
|
||||
|
||||
|
@ -1953,7 +1953,7 @@ class IntroducePascalsTriangle(Scene):
|
|||
self.play(Write(eq_result))
|
||||
show_random_lines(6)
|
||||
self.play(
|
||||
self.nine_choose_four_term.scale_in_place, 1./1.2,
|
||||
self.nine_choose_four_term.scale, 1./1.2,
|
||||
self.nine_choose_four_term.set_color, WHITE,
|
||||
*list(map(FadeOut, [
|
||||
expr, nine_choose_four_term,
|
||||
|
@ -1966,7 +1966,7 @@ class IntroducePascalsTriangle(Scene):
|
|||
top_row = self.rows[0]
|
||||
circle = Circle(color = YELLOW)
|
||||
circle.replace(top_row, dim_to_match = 1)
|
||||
circle.scale_in_place(1.5)
|
||||
circle.scale(1.5)
|
||||
|
||||
line_groups = VGroup()
|
||||
for n in range(4, -1, -1):
|
||||
|
@ -2003,11 +2003,11 @@ class IntroducePascalsTriangle(Scene):
|
|||
|
||||
def set_color_num(self, num):
|
||||
num.set_color(YELLOW)
|
||||
num.scale_in_place(1.2)
|
||||
num.scale(1.2)
|
||||
|
||||
def dehighlight_num(self, num):
|
||||
num.set_color(WHITE)
|
||||
num.scale_in_place(1.0/1.2)
|
||||
num.scale(1.0/1.2)
|
||||
|
||||
class StacksApproachBellCurve(Scene):
|
||||
CONFIG = {
|
||||
|
|
|
@ -1293,7 +1293,7 @@ class SubmitToTemptation(TemptingButWrongCalculation):
|
|||
title = self.title
|
||||
question = self.question
|
||||
title.generate_target()
|
||||
title.target.scale_in_place(1./1.5)
|
||||
title.target.scale(1./1.5)
|
||||
new_words = TextMobject("and", "okay", "assuming independence.")
|
||||
new_words.set_color_by_tex("okay", GREEN)
|
||||
new_words.next_to(title.target, RIGHT)
|
||||
|
@ -1927,7 +1927,7 @@ class ShowTrueDistribution(PiCreatureScene):
|
|||
arrow.shift(3*UP)
|
||||
arrows.add(arrow)
|
||||
for arrow in arrows[1:3]:
|
||||
arrow.rotate_in_place(np.pi)
|
||||
arrow.rotate(np.pi)
|
||||
arrow.set_color(RED)
|
||||
arrows.set_color_by_gradient(BLUE, YELLOW)
|
||||
|
||||
|
@ -2821,7 +2821,7 @@ class GeneralBinomialDistributionValues(Scene):
|
|||
self.play(FocusOn(last_row))
|
||||
self.play(LaggedStartMap(
|
||||
ApplyMethod, last_row,
|
||||
lambda m : (m.scale_in_place, 1.2),
|
||||
lambda m : (m.scale, 1.2),
|
||||
rate_func = there_and_back,
|
||||
))
|
||||
self.wait()
|
||||
|
@ -3079,7 +3079,7 @@ class CorrectForDependence(NameBinomial):
|
|||
]
|
||||
for arrow in arrows:
|
||||
arrow.target = arrow.deepcopy()
|
||||
arrow.target.rotate_in_place(np.pi)
|
||||
arrow.target.rotate(np.pi)
|
||||
for group in checkmarks, crosses:
|
||||
for mob, arrow in zip(group, arrows):
|
||||
mob.generate_target()
|
||||
|
@ -3092,7 +3092,7 @@ class CorrectForDependence(NameBinomial):
|
|||
else:
|
||||
mob.target.set_fill(opacity = 0.5)
|
||||
for checkmark in checkmarks:
|
||||
checkmark.target.scale_in_place(1.2)
|
||||
checkmark.target.scale(1.2)
|
||||
|
||||
kwargs = {"path_arc" : np.pi}
|
||||
if len(indices) > 1:
|
||||
|
|
|
@ -210,7 +210,7 @@ class AddingPureFrequencies(PiCreatureScene):
|
|||
pressure = TextMobject("Pressure")
|
||||
time = TextMobject("Time")
|
||||
for label in pressure, time:
|
||||
label.scale_in_place(0.8)
|
||||
label.scale(0.8)
|
||||
pressure.next_to(axes.y_axis, UP)
|
||||
pressure.to_edge(LEFT, buff = MED_SMALL_BUFF)
|
||||
time.next_to(axes.x_axis.get_right(), DOWN+LEFT)
|
||||
|
|
|
@ -1407,7 +1407,7 @@ class Lemma1(DistanceProductScene):
|
|||
UpdateFromFunc(self.distance_product_column, update_distance_product_column),
|
||||
run_time=5
|
||||
)
|
||||
self.distance_product_column[-1].set_color(BLUE).scale_in_place(1.05)
|
||||
self.distance_product_column[-1].set_color(BLUE).scale(1.05)
|
||||
self.wait()
|
||||
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ class BabyPiCreature(PiCreature):
|
|||
eyes.move_to(eyes_bottom, aligned_edge=DOWN)
|
||||
looking_direction = self.get_looking_direction()
|
||||
for pupil in self.pupils:
|
||||
pupil.scale_in_place(self.pupil_scale_factor)
|
||||
pupil.scale(self.pupil_scale_factor)
|
||||
self.look(looking_direction)
|
||||
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class MoveCar(ApplyMethod):
|
|||
return
|
||||
radians = alpha * self.total_tire_radians
|
||||
for tire in self.mobject.get_tires():
|
||||
tire.rotate_in_place(radians)
|
||||
tire.rotate(radians)
|
||||
|
||||
|
||||
class PartyHat(SVGMobject):
|
||||
|
@ -361,7 +361,7 @@ class PlayingCard(VGroup):
|
|||
])
|
||||
for symbol in design:
|
||||
if symbol.get_center()[1] < self.get_center()[1]:
|
||||
symbol.rotate_in_place(np.pi)
|
||||
symbol.rotate(np.pi)
|
||||
return design
|
||||
|
||||
def get_face_card_design(self, value, symbol):
|
||||
|
|
Loading…
Add table
Reference in a new issue