From f637e824fe522d5daef67d301c063dad6dcbd7d4 Mon Sep 17 00:00:00 2001 From: Ben Hambrecht Date: Tue, 8 May 2018 00:18:53 +0200 Subject: [PATCH] tweaks --- active_projects/eop/chapter1/prob_dist_visuals.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/active_projects/eop/chapter1/prob_dist_visuals.py b/active_projects/eop/chapter1/prob_dist_visuals.py index a024cf4b..b72957e1 100644 --- a/active_projects/eop/chapter1/prob_dist_visuals.py +++ b/active_projects/eop/chapter1/prob_dist_visuals.py @@ -13,7 +13,11 @@ class ProbabilityDistributions(PiCreatureScene): def construct(self): - # weather forecast + lag_ratio = 0.2 + run_time = 5 + + +# WEATHER FORECAST unit_rect = Rectangle( @@ -105,9 +109,6 @@ class ProbabilityDistributions(PiCreatureScene): def sun_update_func(alpha): return 1 - rain_update_func(alpha) - lag_ratio = 0.1 - run_time = 5 - update_p_rain = ChangingDecimal( p_rain_decimal, rain_update_func, tracked_mobject = p_rain_label, @@ -149,6 +150,8 @@ class ProbabilityDistributions(PiCreatureScene): +# COIN FLIP + coin_flip_rect = BrickRow(3) @@ -172,7 +175,7 @@ class ProbabilityDistributions(PiCreatureScene): self.play( LaggedStart(ShowCreation, braces, lag_ratio = lag_ratio, run_time = run_time), - LaggedStart(Write, labels) + LaggedStart(Write, labels, lag_ratio = lag_ratio, run_time = run_time) ) coin_flip_rect.add(braces, labels) @@ -182,7 +185,7 @@ class ProbabilityDistributions(PiCreatureScene): - +# DOUBLE DICE THROW cell_size = 0.5 dice_table = TwoDiceTable(cell_size = cell_size, label_scale = 0.7)