diff --git a/active_projects/eop/chapter0/__init__.py b/active_projects/eop/chapter0/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/active_projects/eop/chapter1/__init__.py b/active_projects/eop/chapter1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/active_projects/eop/chapter1/area_model_bayes.py b/active_projects/eop/chapter1/area_model_bayes.py index a7de457c..1dae8d35 100644 --- a/active_projects/eop/chapter1/area_model_bayes.py +++ b/active_projects/eop/chapter1/area_model_bayes.py @@ -1,5 +1,4 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * class IllustrateAreaModelBayes(Scene): diff --git a/active_projects/eop/chapter1/area_model_erf.py b/active_projects/eop/chapter1/area_model_erf.py index b526c8f6..cb978360 100644 --- a/active_projects/eop/chapter1/area_model_erf.py +++ b/active_projects/eop/chapter1/area_model_erf.py @@ -1,6 +1,5 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * from old_projects.eoc.chapter8 import * import scipy.special diff --git a/active_projects/eop/chapter1/area_model_expectation.py b/active_projects/eop/chapter1/area_model_expectation.py index 5cd69180..653e979f 100644 --- a/active_projects/eop/chapter1/area_model_expectation.py +++ b/active_projects/eop/chapter1/area_model_expectation.py @@ -1,6 +1,6 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class IllustrateAreaModelExpectation(Scene): diff --git a/active_projects/eop/chapter1/brick_row_scene.py b/active_projects/eop/chapter1/brick_row_scene.py index 13c3091c..f1237159 100644 --- a/active_projects/eop/chapter1/brick_row_scene.py +++ b/active_projects/eop/chapter1/brick_row_scene.py @@ -1,5 +1,5 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class BrickRowScene(PiCreatureScene): diff --git a/active_projects/eop/chapter1/entire_brick_wall.py b/active_projects/eop/chapter1/entire_brick_wall.py index 80b9c416..31d07ec1 100644 --- a/active_projects/eop/chapter1/entire_brick_wall.py +++ b/active_projects/eop/chapter1/entire_brick_wall.py @@ -1,6 +1,6 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class EntireBrickWall(Scene): diff --git a/active_projects/eop/chapter1/intro.py b/active_projects/eop/chapter1/intro.py index 3247bf45..39a924d3 100644 --- a/active_projects/eop/chapter1/intro.py +++ b/active_projects/eop/chapter1/intro.py @@ -1,5 +1,5 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class Chapter1OpeningQuote(OpeningQuote): CONFIG = { diff --git a/active_projects/eop/chapter1/just_randy_flipping_coin.py b/active_projects/eop/chapter1/just_randy_flipping_coin.py index 235f846c..abc95ef4 100644 --- a/active_projects/eop/chapter1/just_randy_flipping_coin.py +++ b/active_projects/eop/chapter1/just_randy_flipping_coin.py @@ -1,12 +1,12 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class JustFlipping(Scene): def construct(self): - randy = CoinFlippingPiCreature().shift(2 * DOWN) + randy = CoinFlippingPiCreature(color = MAROON_E, flip_height = 1).shift(2 * DOWN) self.add(randy) self.wait(2) @@ -21,7 +21,7 @@ class JustFlippingWithResults(Scene): def construct(self): - randy = CoinFlippingPiCreature().shift(2 * DOWN) + randy = CoinFlippingPiCreature(color = MAROON_E, flip_height = 1).shift(2 * DOWN) self.add(randy) self.wait(2) diff --git a/active_projects/eop/chapter1/morph_brick_row_into_histogram.py b/active_projects/eop/chapter1/morph_brick_row_into_histogram.py index c2613a60..7294e9e8 100644 --- a/active_projects/eop/chapter1/morph_brick_row_into_histogram.py +++ b/active_projects/eop/chapter1/morph_brick_row_into_histogram.py @@ -1,6 +1,6 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class GenericMorphBrickRowIntoHistogram(Scene): diff --git a/active_projects/eop/chapter1/quiz_result.py b/active_projects/eop/chapter1/quiz_result.py index 8ad7de16..f03700c1 100644 --- a/active_projects/eop/chapter1/quiz_result.py +++ b/active_projects/eop/chapter1/quiz_result.py @@ -1,7 +1,8 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * +from active_projects.eop.independence import * class QuizResult(Scene): diff --git a/active_projects/eop/chapter1/show_uncertainty_darts.py b/active_projects/eop/chapter1/show_uncertainty_darts.py index 4806e6c2..d206069a 100644 --- a/active_projects/eop/chapter1/show_uncertainty_darts.py +++ b/active_projects/eop/chapter1/show_uncertainty_darts.py @@ -1,8 +1,8 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * -class ShowUncertainty2(Scene): +class ShowUncertaintyDarts(Scene): def throw_darts(self, n, run_time = 1): diff --git a/active_projects/eop/chapter1/show_uncertainty_dice.py b/active_projects/eop/chapter1/show_uncertainty_dice.py index 22040b83..eafa1753 100644 --- a/active_projects/eop/chapter1/show_uncertainty_dice.py +++ b/active_projects/eop/chapter1/show_uncertainty_dice.py @@ -1,5 +1,5 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * class ShowUncertaintyDice(Scene): diff --git a/active_projects/eop/chapter1/show_uncertainty_disease.py b/active_projects/eop/chapter1/show_uncertainty_disease.py index d0933e3e..db5b71ad 100644 --- a/active_projects/eop/chapter1/show_uncertainty_disease.py +++ b/active_projects/eop/chapter1/show_uncertainty_disease.py @@ -1,5 +1,5 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * diff --git a/active_projects/eop/chapter1/various_intro_visuals.py b/active_projects/eop/chapter1/various_intro_visuals.py index 0c64154b..6e7151f2 100644 --- a/active_projects/eop/chapter1/various_intro_visuals.py +++ b/active_projects/eop/chapter1/various_intro_visuals.py @@ -1,5 +1,7 @@ from big_ol_pile_of_manim_imports import * -from active_projects.eop.reusables import * +from active_projects.eop.reusable_imports import * +from active_projects.eop.combinations import * +from active_projects.eop.independence import * import itertools as it diff --git a/active_projects/eop/chapter2/__init__.py b/active_projects/eop/chapter2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/active_projects/eop/reusable_imports.py b/active_projects/eop/reusable_imports.py new file mode 100644 index 00000000..7dcafd43 --- /dev/null +++ b/active_projects/eop/reusable_imports.py @@ -0,0 +1,11 @@ +from active_projects.eop.reusables.binary_option import * +from active_projects.eop.reusables.brick_row import * +from active_projects.eop.reusables.coin_flip_tree import * +from active_projects.eop.reusables.coin_flipping_pi_creature import * +from active_projects.eop.reusables.coin_stacks import * +from active_projects.eop.reusables.dice import * +from active_projects.eop.reusables.eop_constants import * +from active_projects.eop.reusables.eop_helpers import * +from active_projects.eop.reusables.histograms import * +from active_projects.eop.reusables.sick_pi_creature import * +from active_projects.eop.reusables.upright_coins import * diff --git a/active_projects/eop/reusables/binary_option.py b/active_projects/eop/reusables/binary_option.py index 2fdb58ea..ed0c3f45 100644 --- a/active_projects/eop/reusables/binary_option.py +++ b/active_projects/eop/reusables/binary_option.py @@ -1,4 +1,5 @@ from mobject.types.vectorized_mobject import * +from mobject.svg.tex_mobject import * class BinaryOption(VMobject): diff --git a/active_projects/eop/reusables/coin_flipping_pi_creature.py b/active_projects/eop/reusables/coin_flipping_pi_creature.py index c94c4ac1..20475532 100644 --- a/active_projects/eop/reusables/coin_flipping_pi_creature.py +++ b/active_projects/eop/reusables/coin_flipping_pi_creature.py @@ -6,7 +6,7 @@ from utils.rate_functions import * from for_3b1b_videos.pi_creature_scene import * from active_projects.eop.reusables.eop_helpers import * from active_projects.eop.reusables.eop_constants import * - +from active_projects.eop.reusables.coin_flipping_pi_creature import * class PiCreatureCoin(VMobject): @@ -46,6 +46,9 @@ class PiCreatureCoin(VMobject): self.add(ridge) class CoinFlippingPiCreature(PiCreature): + CONFIG = { + "flip_height": 3 + } def __init__(self, mode = "coin_flip_1", **kwargs): @@ -93,6 +96,7 @@ class FlipCoin(AnimationGroup): pi_creature.coin, vector = UP, nb_turns = 5, + height = pi_creature.flip_height * pi_creature.get_height(), rate_func = self.coin_rate_func, **kwargs ) diff --git a/active_projects/eop/reusables/histograms.py b/active_projects/eop/reusables/histograms.py index 8bb62d78..dc1e1b2c 100644 --- a/active_projects/eop/reusables/histograms.py +++ b/active_projects/eop/reusables/histograms.py @@ -282,8 +282,8 @@ class FlashThroughHistogram(Animation): class OutlineableBars(VGroup): - # A group of bars (rectangles), together with - # a method that draws an outline around them, + # A group of bars (rectangles), together with + # a method that draws an outline around them, # assuming the bars are arranged in a histogram # (aligned at the bottom without gaps). diff --git a/active_projects/eop/reusables/sick_pi_creature.py b/active_projects/eop/reusables/sick_pi_creature.py index e6d9469e..3b754e19 100644 --- a/active_projects/eop/reusables/sick_pi_creature.py +++ b/active_projects/eop/reusables/sick_pi_creature.py @@ -1,6 +1,6 @@ from for_3b1b_videos.pi_creature import * -from active_projects.eop.reusables.constants import * +from active_projects.eop.reusables.eop_constants import * class SicklyPiCreature(PiCreature):