Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Moved many folders from topics/ to the new once_useful_constructs/

Grant Sandersonb9edafa9421d
diff --git a/active_projects/eop/bayes.py b/active_projects/eop/bayes.py
index 1ad2d9bd4..39b63e580 100644
--- a/active_projects/eop/bayes.py
+++ b/active_projects/eop/bayes.py
@@ -1,33 +1,4 @@
-from constants import *
-
-from mobject.tex_mobject import TexMobject
-from mobject.mobject import Mobject
-from mobject.image_mobject import ImageMobject
-from mobject.vectorized_mobject import *
-
-from animation.animation import Animation
-from animation.transform import *
-from animation.simple_animations import *
-from animation.composition import *
-from animation.playground import *
-from topics.geometry import *
-from topics.characters import *
-from topics.functions import *
-from topics.fractals import *
-from topics.number_line import *
-from topics.combinatorics import *
-from topics.numerals import *
-from topics.three_dimensions import *
-from topics.objects import *
-from topics.complex_numbers import *
-from topics.common_scenes import *
-from topics.probability import *
-from scene.scene import Scene
-from scene.reconfigurable_scene import ReconfigurableScene
-from scene.zoomed_scene import *
-from camera.camera import Camera
-from mobject.svg_mobject import *
-from mobject.tex_mobject import *
+from big_ol_pile_of_manim_imports import *
#revert_to_original_skipping_status
diff --git a/active_projects/eop/bayes_footnote.py b/active_projects/eop/bayes_footnote.py
index 38bacda7b..06f4b2b3a 100644
--- a/active_projects/eop/bayes_footnote.py
+++ b/active_projects/eop/bayes_footnote.py
@@ -1,33 +1,4 @@
-from constants import *
-
-from mobject.tex_mobject import TexMobject
-from mobject.mobject import Mobject
-from mobject.image_mobject import ImageMobject
-from mobject.vectorized_mobject import *
-
-from animation.animation import Animation
-from animation.transform import *
-from animation.simple_animations import *
-from animation.composition import *
-from animation.playground import *
-from topics.geometry import *
-from topics.characters import *
-from topics.functions import *
-from topics.fractals import *
-from topics.number_line import *
-from topics.combinatorics import *
-from topics.numerals import *
-from topics.three_dimensions import *
-from topics.objects import *
-from topics.complex_numbers import *
-from topics.common_scenes import *
-from topics.probability import *
-from scene.scene import Scene
-from scene.reconfigurable_scene import ReconfigurableScene
-from scene.zoomed_scene import *
-from camera.camera import Camera
-from mobject.svg_mobject import *
-from mobject.tex_mobject import *
+from big_ol_pile_of_manim_imports import *
from eop.bayes import IntroducePokerHand
diff --git a/active_projects/eop/combinations.py b/active_projects/eop/combinations.py
index 906fa96f7..31e88ce9c 100644
--- a/active_projects/eop/combinations.py
+++ b/active_projects/eop/combinations.py
@@ -1,36 +1,4 @@
-from constants import *
-
-from mobject.tex_mobject import TexMobject
-from mobject.mobject import Mobject
-from mobject.image_mobject import ImageMobject
-from mobject.vectorized_mobject import *
-
-from animation.animation import Animation
-from animation.transform import *
-from animation.simple_animations import *
-from animation.composition import *
-from animation.playground import *
-from animation.continual_animation import *
-from topics.geometry import *
-from topics.characters import *
-from topics.functions import *
-from topics.fractals import *
-from topics.number_line import *
-from topics.combinatorics import *
-from topics.numerals import *
-from topics.three_dimensions import *
-from topics.objects import *
-from topics.probability import *
-from topics.complex_numbers import *
-from scene.scene import Scene
-from scene.reconfigurable_scene import ReconfigurableScene
-from scene.zoomed_scene import *
-from camera.camera import Camera
-from mobject.svg_mobject import *
-from mobject.tex_mobject import *
-from topics.graph_scene import *
-from topics.probability import *
-from topics.common_scenes import *
+from big_ol_pile_of_manim_imports import *
#revert_to_original_skipping_status
diff --git a/active_projects/eop/independence.py b/active_projects/eop/independence.py
index d31b65b37..48fd868b3 100644
--- a/active_projects/eop/independence.py
+++ b/active_projects/eop/independence.py
@@ -1,33 +1,4 @@
-from constants import *
-
-from mobject.tex_mobject import TexMobject
-from mobject.mobject import Mobject
-from mobject.image_mobject import ImageMobject
-from mobject.vectorized_mobject import *
-
-from animation.animation import Animation
-from animation.transform import *
-from animation.simple_animations import *
-from animation.composition import *
-from animation.playground import *
-from topics.geometry import *
-from topics.characters import *
-from topics.functions import *
-from topics.fractals import *
-from topics.number_line import *
-from topics.combinatorics import *
-from topics.numerals import *
-from topics.three_dimensions import *
-from topics.objects import *
-from topics.complex_numbers import *
-from topics.common_scenes import *
-from topics.probability import *
-from scene.scene import Scene
-from scene.reconfigurable_scene import ReconfigurableScene
-from scene.zoomed_scene import *
-from camera.camera import Camera
-from mobject.svg_mobject import *
-from mobject.tex_mobject import *
+from big_ol_pile_of_manim_imports import *
from scene.scene import ProgressDisplay
import scipy
diff --git a/big_ol_pile_of_manim_imports.py b/big_ol_pile_of_manim_imports.py
index 58361f9d0..0a033ec96 100644
--- a/big_ol_pile_of_manim_imports.py
+++ b/big_ol_pile_of_manim_imports.py
@@ -25,8 +25,8 @@ from animation.transform import *
from animation.update import *
from camera.camera import *
-from camera.moving_camera import *
from camera.mapping_camera import *
+from camera.moving_camera import *
from continual_animation.continual_animation import *
from continual_animation.from_animation import *
@@ -49,16 +49,18 @@ from scene.scene import *
from scene.scene_from_video import *
from scene.zoomed_scene import *
-from topics.arithmetic import *
-from topics.combinatorics import *
+from once_useful_constructs.arithmetic import *
+from once_useful_constructs.combinatorics import *
+from once_useful_constructs.counting import *
+from once_useful_constructs.fractals import *
+from once_useful_constructs.graph_theory import *
+from once_useful_constructs.light import *
+
from topics.common_scenes import *
from topics.complex_numbers import *
-from topics.counting import *
-from topics.fractals import *
from topics.functions import *
from topics.geometry import *
from topics.graph_scene import *
-from topics.graph_theory import *
from topics.matrix import *
from topics.number_line import *
from topics.numerals import *
@@ -89,6 +91,7 @@ import os
import random
import re
import string
+import sys
from PIL import Image
from colour import Color
diff --git a/old_projects/basel/basel.py b/old_projects/basel/basel.py
index 2937ced57..259c537cb 100644
--- a/old_projects/basel/basel.py
+++ b/old_projects/basel/basel.py
@@ -2,7 +2,7 @@
from big_ol_pile_of_manim_imports import *
-from old_projects.basel.light import *
+from once_useful_constructs.light import *
import types
import functools
diff --git a/old_projects/basel/basel2.py b/old_projects/basel/basel2.py
index 55e8cd72d..1638a26f3 100644
--- a/old_projects/basel/basel2.py
+++ b/old_projects/basel/basel2.py
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
from big_ol_pile_of_manim_imports import *
-from old_projects.basel.light import *
+from once_useful_constructs.light import *
import types
import functools
diff --git a/old_projects/nn/playground.py b/old_projects/nn/playground.py
index 478faeb4f..1edcbf7f1 100644
--- a/old_projects/nn/playground.py
+++ b/old_projects/nn/playground.py
@@ -7,34 +7,7 @@ import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from constants import *
-from mobject.tex_mobject import TexMobject
-from mobject.mobject import Mobject, Group
-from mobject.image_mobject import ImageMobject
-from mobject.vectorized_mobject import *
-
-from animation.animation import Animation
-from animation.transform import *
-from animation.simple_animations import *
-from animation.composition import *
-from animation.playground import *
-from animation.continual_animation import *
-from topics.geometry import *
-from topics.characters import *
-from topics.functions import *
-from topics.fractals import *
-from topics.number_line import *
-from topics.combinatorics import *
-from topics.numerals import *
-from topics.three_dimensions import *
-from topics.objects import *
-from topics.probability import *
-from topics.complex_numbers import *
-from scene.scene import Scene
-from scene.reconfigurable_scene import ReconfigurableScene
-from scene.zoomed_scene import *
-from camera.camera import Camera
-from mobject.svg_mobject import *
-from mobject.tex_mobject import *
+from big_ol_pile_of_manim_imports import *
from nn.network import *
from nn.part1 import *
diff --git a/once_useful_constructs/NOTE.md b/once_useful_constructs/NOTE.md
new file mode 100644
index 000000000..931ae0de4
--- /dev/null
+++ b/once_useful_constructs/NOTE.md
@@ -0,0 +1 @@
+This folder contains a collection of various things that were built for a video at some point, but were really one-off and should be given more careful consideration before being brought into the main library. In particular, there is really no guarantee of these being fully functional.
\ No newline at end of file
diff --git a/once_useful_constructs/__init__.py b/once_useful_constructs/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/topics/arithmetic.py b/once_useful_constructs/arithmetic.py
similarity index 100%
rename from topics/arithmetic.py
rename to once_useful_constructs/arithmetic.py
diff --git a/topics/combinatorics.py b/once_useful_constructs/combinatorics.py
similarity index 100%
rename from topics/combinatorics.py
rename to once_useful_constructs/combinatorics.py
diff --git a/topics/counting.py b/once_useful_constructs/counting.py
similarity index 99%
rename from topics/counting.py
rename to once_useful_constructs/counting.py
index e8aa6dbbc..8b43ae5ff 100644
--- a/topics/counting.py
+++ b/once_useful_constructs/counting.py
@@ -13,7 +13,6 @@ from animation.transform import Transform
from topics.geometry import Arrow
from topics.geometry import Circle
from topics.geometry import Dot
-# from topics.fractals import *
from scene.scene import Scene
diff --git a/topics/fractals.py b/once_useful_constructs/fractals.py
similarity index 99%
rename from topics/fractals.py
rename to once_useful_constructs/fractals.py
index f3122dde5..5f2e72005 100644
--- a/topics/fractals.py
+++ b/once_useful_constructs/fractals.py
@@ -1,8 +1,8 @@
from animation.creation import ShowCreation
from animation.transform import Transform
-from characters import PiCreature
-from characters import Randolph
-from characters import get_all_pi_creature_modes
+from pi_creature.pi_creature import PiCreature
+from pi_creature.pi_creature import Randolph
+from pi_creature.pi_creature import get_all_pi_creature_modes
from mobject.vectorized_mobject import VGroup
from mobject.vectorized_mobject import VMobject
from mobject.vectorized_mobject import VectorizedPoint
@@ -22,7 +22,6 @@ from utils.space_ops import rotation_matrix
from constants import *
-
def rotate(points, angle = np.pi, axis = OUT):
if axis is None:
return points
@@ -277,8 +276,6 @@ class CircularFractal(SelfSimilarFractal):
part.rotate(i*2*np.pi/self.num_subparts, about_point = ORIGIN)
self.num_subparts -= 1
-
-
######## Space filling curves ############
class JaggedCurvePiece(VMobject):
diff --git a/topics/graph_theory.py b/once_useful_constructs/graph_theory.py
similarity index 100%
rename from topics/graph_theory.py
rename to once_useful_constructs/graph_theory.py
diff --git a/old_projects/basel/light.py b/once_useful_constructs/light.py
similarity index 100%
rename from old_projects/basel/light.py
rename to once_useful_constructs/light.py
diff --git a/topics/common_scenes.py b/topics/common_scenes.py
index 9b2d208b7..bc3b88b38 100644
--- a/topics/common_scenes.py
+++ b/topics/common_scenes.py
@@ -12,9 +12,9 @@ from mobject.tex_mobject import TexMobject
from mobject.tex_mobject import TextMobject
from mobject.vectorized_mobject import VGroup
from scene.scene import Scene
-from topics.characters import Blink
-from topics.characters import Mortimer
-from topics.characters import Randolph
+from pi_creature.pi_creature_animations import Blink
+from pi_creature.pi_creature import Mortimer
+from pi_creature.pi_creature import Randolph
from topics.geometry import DashedLine
from topics.geometry import Rectangle
from topics.geometry import Square
@@ -209,17 +209,3 @@ class TODOStub(Scene):
self.add(TextMobject("TODO: %s"%self.message))
self.wait()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/topics/objects.py b/topics/objects.py
index 48a999e2e..ee0d4deb9 100644
--- a/topics/objects.py
+++ b/topics/objects.py
@@ -518,7 +518,7 @@ class Car(SVGMobject):
self.set_stroke(color = WHITE, width = 0)
self.set_fill(self.color, opacity = 1)
- from topics.characters import Randolph
+ from pi_creature.pi_creature import Randolph
randy = Randolph(mode = "happy")
randy.scale_to_fit_height(0.6*self.get_height())
randy.stretch(0.8, 0)
diff --git a/topics/probability.py b/topics/probability.py
index 8e086fb89..3034859ab 100644
--- a/topics/probability.py
+++ b/topics/probability.py
@@ -382,7 +382,6 @@ class BarChart(VGroup):
def copy(self):
return self.deepcopy()
-
### Cards ###
class DeckOfCards(VGroup):
@@ -542,7 +541,7 @@ class PlayingCard(VGroup):
return design
def get_face_card_design(self, value, symbol):
- from topics.characters import PiCreature
+ from pi_creature.pi_creature import PiCreature
sub_rect = Rectangle(
stroke_color = BLACK,
fill_opacity = 0,