From 4ec63f22ee468ce169fbf547608822943fffcafe Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 12 Mar 2019 20:29:23 -0700 Subject: [PATCH 1/2] Beginning ode project --- active_projects/ode/all_part1_scenes.py | 6 +++ active_projects/ode/part1/pendulum.py | 50 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 active_projects/ode/all_part1_scenes.py create mode 100644 active_projects/ode/part1/pendulum.py diff --git a/active_projects/ode/all_part1_scenes.py b/active_projects/ode/all_part1_scenes.py new file mode 100644 index 00000000..5e117116 --- /dev/null +++ b/active_projects/ode/all_part1_scenes.py @@ -0,0 +1,6 @@ +# from active_projects.ode.part1 import * + +OUTPUT_DIRECTORY = "ode/part1" +ALL_SCENE_CLASSES = [ + +] diff --git a/active_projects/ode/part1/pendulum.py b/active_projects/ode/part1/pendulum.py new file mode 100644 index 00000000..76af75a2 --- /dev/null +++ b/active_projects/ode/part1/pendulum.py @@ -0,0 +1,50 @@ +from big_ol_pile_of_manim_imports import * + + +class Pendulum(VGroup): + CONFIG = { + "length": 3, + "gravity": 9.8, + "weight_diameter": 0.5, + "rod_style": { + "stroke_width": 2, + "stroke_color": LIGHT_GREY, + }, + "weight_style": { + "stroke_width": 0, + "fill_opacity": 1, + "fill_color": LIGHT_GREY, + "sheen_direction": UL, + "sheen_factor": 0.5, + } + } + + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.create_rod() + + def create_rod(self): + pass + + def create_weight(self): + pass + + def get_theta(self): + pass + + def set_theta(self): + pass + + def get_angular_velocity(self): + pass + + def set_angular_velocity(self): + pass + + def get_fixed_point(self): + pass + + +class PendulumTest(Scene): + def construct(self): + pass From 5c79d80187f3fdbbb8fc3ef6ae2c85aa13474294 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 13 Mar 2019 05:20:56 -0700 Subject: [PATCH 2/2] Fix to Matrix --- manimlib/mobject/matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/mobject/matrix.py b/manimlib/mobject/matrix.py index b5a2e283..f4f31913 100644 --- a/manimlib/mobject/matrix.py +++ b/manimlib/mobject/matrix.py @@ -99,7 +99,7 @@ class Matrix(VMobject): return self def add_brackets(self): - bracket_pair = TexMobject("\\big[ \\big]") + bracket_pair = TexMobject("\\big[", "\\big]") bracket_pair.scale(2) bracket_pair.stretch_to_fit_height(self.get_height() + 0.5) l_bracket, r_bracket = bracket_pair.split()