mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Just starting SlopeOfCircleExample
This commit is contained in:
parent
7a5886beff
commit
331c906c8e
1 changed files with 113 additions and 7 deletions
120
eoc/chapter5.py
120
eoc/chapter5.py
|
@ -25,15 +25,121 @@ from camera import Camera
|
|||
from mobject.svg_mobject import *
|
||||
from mobject.tex_mobject import *
|
||||
|
||||
from eoc.chapter1 import OpeningQuote, PatreonThanks
|
||||
from topics.common_scenes import *
|
||||
from eoc.graph_scene import *
|
||||
|
||||
class Chapter3OpeningQuote(OpeningQuote):
|
||||
SPACE_UNIT_TO_PLANE_UNIT = 0.7
|
||||
|
||||
class Chapter5OpeningQuote(OpeningQuote):
|
||||
CONFIG = {
|
||||
"quote" : [
|
||||
"Using the chain rule is like peeling an onion: ",
|
||||
"you have to deal with each layer at a time, and ",
|
||||
"if it is too big you will start crying."
|
||||
"Do not ask whether a ",
|
||||
"statement is true until",
|
||||
"you know what it means."
|
||||
],
|
||||
"author" : "(Anonymous professor)"
|
||||
}
|
||||
"author" : "Errett Bishop"
|
||||
}
|
||||
|
||||
class ThisWasConfusing(TeacherStudentsScene):
|
||||
def construct(self):
|
||||
words = TextMobject("Implicit differentiation")
|
||||
words.move_to(self.get_teacher().get_corner(UP+LEFT), DOWN+RIGHT)
|
||||
words.set_fill(opacity = 0)
|
||||
|
||||
self.play(
|
||||
self.get_teacher().change_mode, "raise_right_hand",
|
||||
words.set_fill, None, 1,
|
||||
words.shift, 0.5*UP
|
||||
)
|
||||
self.change_student_modes(
|
||||
*["confused"]*3,
|
||||
look_at_arg = words,
|
||||
added_anims = [Animation(self.get_teacher())]
|
||||
)
|
||||
self.dither()
|
||||
self.play(
|
||||
self.get_teacher().change_mode, "confused",
|
||||
self.get_teacher().look_at, words,
|
||||
)
|
||||
self.dither(3)
|
||||
|
||||
class SlopeOfCircleExample(ZoomedScene):
|
||||
CONFIG = {
|
||||
"plane_kwargs" : {
|
||||
"x_radius" : SPACE_WIDTH/SPACE_UNIT_TO_PLANE_UNIT,
|
||||
"y_radius" : SPACE_HEIGHT/SPACE_UNIT_TO_PLANE_UNIT,
|
||||
"space_unit_to_x_unit" : SPACE_UNIT_TO_PLANE_UNIT,
|
||||
"space_unit_to_y_unit" : SPACE_UNIT_TO_PLANE_UNIT,
|
||||
},
|
||||
"example_point" : (3, 4),
|
||||
}
|
||||
def construct(self):
|
||||
should_skip_animations = self.skip_animations
|
||||
self.skip_animations = True
|
||||
|
||||
|
||||
self.skip_animations = should_skip_animations
|
||||
self.setup_plane()
|
||||
self.introduce_circle()
|
||||
self.talk_through_pythagorean_theorem()
|
||||
self.draw_example_slope()
|
||||
self.show_perpendicular_radius()
|
||||
self.show_dx_and_dy()
|
||||
self.point_out_this_is_not_a_graph()
|
||||
self.perform_implicit_derivative()
|
||||
self.show_rearrangement()
|
||||
self.show_final_slope()
|
||||
|
||||
def setup_plane(self):
|
||||
self.plane = NumberPlane(**self.plane_kwargs)
|
||||
self.plane.main_lines.fade()
|
||||
|
||||
self.plane.add(self.plane.get_axis_labels())
|
||||
self.plane.add_coordinates()
|
||||
|
||||
self.add(self.plane)
|
||||
|
||||
def introduce_circle(self):
|
||||
pass
|
||||
|
||||
def talk_through_pythagorean_theorem(self):
|
||||
pass
|
||||
|
||||
def draw_example_slope(self):
|
||||
pass
|
||||
|
||||
def show_perpendicular_radius(self):
|
||||
pass
|
||||
|
||||
def show_dx_and_dy(self):
|
||||
pass
|
||||
|
||||
def point_out_this_is_not_a_graph(self):
|
||||
pass
|
||||
|
||||
def perform_implicit_derivative(self):
|
||||
pass
|
||||
|
||||
def show_rearrangement(self):
|
||||
pass
|
||||
|
||||
def show_final_slope(self):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue