summaryrefslogtreecommitdiff
path: root/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
diff options
context:
space:
mode:
Diffstat (limited to 'FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py')
-rw-r--r--FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
index a097a96..1fdd0b9 100644
--- a/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
+++ b/FSF-2020/calculus-of-several-variables/approximations-and-optimizations/Total-Differential/file1_Visualization_of_dz.py
@@ -1,11 +1,15 @@
from manimlib.imports import*
-
-class firstScene(ThreeDScene):
+#---- visualization of total differential dz between two points lying on the surface of the function
+class differentialdz(ThreeDScene):
def construct(self):
- axes = ThreeDAxes().rotate(1.571)
+ axes = ThreeDAxes()
+ label_x = TextMobject("$x$").shift([5.5,-0.5,0]).fade(0.4) #---- x axis
+ label_y = TextMobject("$y$").shift([-0.5,5.5,0]).rotate(-4.5).fade(0.4) #---- y axis
+
+ #---- surface of the funtion f(x,y)
surface = ParametricSurface(
lambda u, v: np.array([
u,
@@ -13,8 +17,8 @@ class firstScene(ThreeDScene):
u**2+v**2
]),u_min=-1,u_max=1, v_min=-1,v_max=1).set_color("#FF69B4").fade(0.6).scale(2).shift(3*UP+1*LEFT)
- d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP)
- d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP)
+ d = Dot([1.4,1.75,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
+ d2 = Dot([2,2,1],color = '#00FFFF').rotate(1.571,UP) #---- point on the surface
p1 = TextMobject("$P_1$",color ='#ADFF2F').scale(0.6).shift(2*RIGHT+1*UP)
p2 = TextMobject("$P_2$",color = '#ADFF2F').scale(0.6).shift(2.6*RIGHT+0.9*UP)
@@ -33,8 +37,10 @@ class firstScene(ThreeDScene):
label = TextMobject("$z = f(x,y)$").scale(0.6).shift(3.5*RIGHT+1.8*UP)
- self.add(axes)
self.set_camera_orientation(phi=75*DEGREES,theta=-10*DEGREES)
+ self.add(axes)
+ self.add(label_x)
+ self.add(label_y)
self.wait(1)
self.play(Write(plane))
self.play(Write(surface))