A community-maintained Python framework for creating mathematical animations.
Small fixes while putting together Hilbert video
Grant Sanderson810bcb98133a
diff --git a/hilbert/section1.py b/hilbert/section1.pyindex 67537133f..54dd27f25 100644--- a/hilbert/section1.py+++ b/hilbert/section1.py@@ -503,6 +503,12 @@ class RandomMapping(Scene):+class DataScrambledAnyway(Scene):+ def construct(self):+ self.add(TextMobject("Data is scrambled anyway, right?"))+ self.dither()++class LeverageExistingIntuitions(Scene):def construct(self):self.add(TextMobject("Leverage existing intuitions"))diff --git a/hilbert/section2.py b/hilbert/section2.pyindex 8d4be272b..fa8f1f71b 100644--- a/hilbert/section2.py+++ b/hilbert/section2.py@@ -796,6 +796,14 @@ class DefineActualHilbertCurveText(Scene):self.dither()+class ReliesOnWonderfulProperty(Scene):+ def construct(self):+ self.add(TextMobject("""+ \\dots which relies on a certain property+ of Pseudo-Hilbert-curves.+ """))+ self.dither()+class WonderfulPropertyOfPseudoHilbertCurves(Scene):def construct(self):@@ -943,6 +951,15 @@ class FormalDefinitionOfHilbertCurve(Scene):Transform(dot, new_dot),)++class CouldNotDefineForSnakeCurve(Scene):+ def construct(self):+ self.add(TextMobject("""+ You could not define a limit curve from+ snake curves.+ """))+ self.dither()+class ThreeThingsToProve(Scene):def construct(self):definition = TexMobject([@@ -958,7 +975,7 @@ class ThreeThingsToProve(Scene):prove_that.to_edge(LEFT)items = TextMobject(["\\begin{enumerate}",- "\\item Well-define: ",+ "\\item Well-defined: ","Points on Pseudo-Hilbert-curves really do converge","\\item A Curve: ","HC is continuous",diff --git a/stage_animations.py b/stage_animations.pyindex ed4fbaeba..9599b854d 100644--- a/stage_animations.py+++ b/stage_animations.py@@ -2,6 +2,7 @@ import sysimport inspectimport osimport shutil+import itertools as itfrom extract_scene import is_scene, get_modulefrom constants import MOVIE_DIR, STAGED_SCENES_DIR@@ -33,8 +34,12 @@ def stage_animaions(module_name):)for f in os.listdir(STAGED_SCENES_DIR):os.remove(os.path.join(STAGED_SCENES_DIR, f))- for f in sorted_files:- shutil.copy(f, STAGED_SCENES_DIR)+ for f, count in zip(sorted_files, it.count()):+ symlink_name = os.path.join(+ STAGED_SCENES_DIR,+ "Scene_%03d"%count + f.split(os.sep)[-1]+ )+ os.symlink(f, symlink_name)