Finished general L'Hoptital example of eoc7

This commit is contained in:
Grant Sanderson
2017-03-28 17:22:39 -07:00
parent 2d191354b6
commit 7452486ddf
5 changed files with 684 additions and 218 deletions

View File

@ -75,7 +75,10 @@ class Write(ShowCreation):
if "run_time" not in kwargs:
self.establish_run_time(mobject)
if "lag_factor" not in kwargs:
min_lag_factor = min(len(mobject.family_members_with_points())/2.0, 2)
if len(mobject.family_members_with_points()) < 2:
min_lag_factor = 1
else:
min_lag_factor = 2
self.lag_factor = max(self.run_time - 1, min_lag_factor)
ShowCreation.__init__(self, mobject, **kwargs)

View File

@ -137,7 +137,8 @@ class ApplyMethod(Transform):
)
assert(isinstance(method.im_self, Mobject))
method_kwargs = kwargs.get("method_kwargs", {})
target = copy.deepcopy(method)(*args, **method_kwargs)
target = method.im_self.copy()
method.im_func(target, *args, **method_kwargs)
Transform.__init__(self, method.im_self, target, **kwargs)

File diff suppressed because it is too large Load Diff

View File

@ -102,6 +102,7 @@ class TexMobject(SVGMobject):
self.expression_parts = list(self.args)
for expr in self.args:
sub_tex_mob = TexMobject(expr, **self.CONFIG)
sub_tex_mob.tex_string = expr ##Want it unmodified
new_index = curr_index + len(sub_tex_mob.submobjects)
sub_tex_mob.submobjects = self.submobjects[curr_index:new_index]
new_submobjects.append(sub_tex_mob)

View File

@ -129,7 +129,7 @@ class ZoomedScene(Scene):
)
if self.zoom_activated and self.little_rectangle in moving_mobjects:
# When the camera is moving, so is everything,
return list(moving_mobjects) + list(static_mobjects), []
return self.get_mobjects(), []
else:
return moving_mobjects, static_mobjects