Skip to content

Commit 9e76198

Browse files
committed
Latest animations for diffyq part 3
1 parent 6c2e7f4 commit 9e76198

File tree

5 files changed

+879
-24
lines changed

5 files changed

+879
-24
lines changed

active_projects/ode/all_part3_scenes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
FlatEdgesForDiscreteEvolutionTinySteps,
4040
FlatEdgesContinuousEvolution,
4141
FlatAtBoundaryWords,
42+
SlopeToHeatFlow,
43+
CloserLookAtStraightLine,
44+
WriteOutBoundaryCondition,
45+
TeacherStudentsScene,
46+
ManipulateSinExpSurface,
47+
HeatEquationFrame,
48+
ShowFreq1CosExpDecay,
49+
ShowFreq2CosExpDecay,
50+
ShowFreq4CosExpDecay,
51+
CompareFreqDecays,
4252

4353
# SimpleCosExpGraph,
4454
# AddMultipleSolutions,

active_projects/ode/part2/heat_equation.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -523,25 +523,24 @@ def update_arrows(arrows):
523523
self.arrows = arrows
524524

525525
def initialize_updaters(self):
526-
graph = self.graph
527-
rod = self.rod
528-
time_label = self.time_label
529-
530-
graph.add_updater(self.update_graph)
531-
time_label.add_updater(
532-
lambda d, dt: d.increment_value(dt)
533-
)
534-
rod.add_updater(self.color_rod_by_graph)
526+
if hasattr(self, "graph"):
527+
self.graph.add_updater(self.update_graph)
528+
if hasattr(self, "rod"):
529+
self.rod.add_updater(self.color_rod_by_graph)
530+
if hasattr(self, "time_label"):
531+
self.time_label.add_updater(
532+
lambda d, dt: d.increment_value(dt)
533+
)
535534

536535
def let_play(self):
537-
clock = self.clock
536+
self.run_clock(self.wait_time)
538537

539-
# return
538+
def run_clock(self, time):
540539
self.play(
541540
ClockPassesTime(
542-
clock,
543-
run_time=self.wait_time,
544-
hours_passed=self.wait_time,
541+
self.clock,
542+
run_time=time,
543+
hours_passed=time,
545544
),
546545
)
547546

active_projects/ode/part3/pi_creature_scenes.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,39 @@ def construct(self):
137137
)
138138
self.wait(3)
139139

140+
141+
class SoWeGotNowhere(TeacherStudentsScene):
142+
def construct(self):
143+
self.student_says(
144+
"So we've gotten\\\\nowhere!",
145+
target_mode="angry",
146+
added_anims=[
147+
self.teacher.change, "guilty"
148+
]
149+
)
150+
self.change_all_student_modes("angry")
151+
self.wait()
152+
text = TexMobject(
153+
"&\\text{Actually,}\\\\",
154+
"&\\sin\\left({x}\\right)"
155+
"e^{-\\alpha {t}}\\\\",
156+
"&\\text{isn't far off.}",
157+
tex_to_color_map={
158+
"{x}": GREEN,
159+
"{t}": YELLOW,
160+
}
161+
)
162+
text.scale(0.8)
163+
self.teacher_says(
164+
text,
165+
content_introduction_class=FadeIn,
166+
bubble_kwargs={
167+
"width": 4,
168+
"height": 3.5,
169+
}
170+
)
171+
self.change_all_student_modes(
172+
"pondering",
173+
look_at_arg=self.screen
174+
)
175+
self.wait(3)

0 commit comments

Comments
 (0)