Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Scenes up to AnalyzeSineCurve for diffyq part 3

Grant Sanderson43b82f2c53df
diff --git a/active_projects/ode/all_part3_scenes.py b/active_projects/ode/all_part3_scenes.py
index 58be7b502..b7c9fc01b 100644
--- a/active_projects/ode/all_part3_scenes.py
+++ b/active_projects/ode/all_part3_scenes.py
@@ -20,4 +20,5 @@ SCENES_IN_ORDER = [
OceanOfPossibilities,
InFouriersShoes,
AnalyzeSineCurve,
+ SineCurveIsUnrealistic,
]
diff --git a/active_projects/ode/part3/pi_creature_scenes.py b/active_projects/ode/part3/pi_creature_scenes.py
index 01a269a21..1767debc3 100644
--- a/active_projects/ode/part3/pi_creature_scenes.py
+++ b/active_projects/ode/part3/pi_creature_scenes.py
@@ -97,4 +97,20 @@ class InFouriersShoes(PiCreatureScene, WriteHeatEquationTemplate):
class SineCurveIsUnrealistic(TeacherStudentsScene):
def construct(self):
- pass
+ self.student_says(
+ "But that would\\\\never happen!",
+ student_index=1,
+ bubble_kwargs={
+ "direction": RIGHT,
+ "height": 3,
+ "width": 4,
+ },
+ target_mode="angry"
+ )
+ self.change_student_modes(
+ "guilty", "angry", "hesitant",
+ added_anims=[
+ self.teacher.change, "tease"
+ ]
+ )
+ self.wait(2)
diff --git a/active_projects/ode/part3/temperature_graphs.py b/active_projects/ode/part3/temperature_graphs.py
index daa7f5748..99d106339 100644
--- a/active_projects/ode/part3/temperature_graphs.py
+++ b/active_projects/ode/part3/temperature_graphs.py
@@ -628,16 +628,14 @@ class OceanOfPossibilities(TemperatureGraphScene):
phi=80 * DEGREES,
theta=-80 * DEGREES,
)
- self.camera.frame_center.move_to(
- 3 * RIGHT
- )
self.begin_ambient_camera_rotation(rate=0.01)
def setup_axes(self):
axes = self.get_three_d_axes(include_numbers=True)
axes.add(axes.input_plane)
- # axes.scale(1.25)
- axes.shift(1.5 * IN)
+ axes.scale(0.9)
+ axes.center()
+ axes.shift(OUT + RIGHT)
self.add(axes)
self.axes = axes
@@ -770,7 +768,6 @@ class OceanOfPossibilities(TemperatureGraphScene):
self.stop_ambient_camera_rotation()
self.move_camera(
theta=-45 * DEGREES,
- frame_center=ORIGIN,
added_anims=[
LaggedStartMap(ShowCreation, lines),
LaggedStartMap(
@@ -790,7 +787,6 @@ class OceanOfPossibilities(TemperatureGraphScene):
self.wait()
self.move_camera(
theta=-70 * DEGREES,
- frame_center=3 * RIGHT,
)
self.surface_boundary_lines = surface_boundary_lines
@@ -833,6 +829,7 @@ class OceanOfPossibilities(TemperatureGraphScene):
self.surface_boundary_lines.resume_updating()
self.surface.resume_updating()
self.graph.resume_updating()
+ self.begin_ambient_camera_rotation(rate=0.01)
self.wait(30)