CoCalc Public Files201-303-AH / Dossier 303 étudiants / exercice 49 p 194.sagewsOpen with one click!
Author: Julien Giol
Description: 303 - Fichiers Sage Étudiants
Compute Environment: Ubuntu 18.04 (Deprecated)
%md # Ellipsoïde

Ellipsoïde

var('x, y, z') F(x,y,z) = 2*(x-2)^2+(y-1)^2+(z-3)^2 show(F)
(x, y, z)
(x,y,z)  2(x2)2+(y1)2+(z3)2\displaystyle \left( x, y, z \right) \ {\mapsto} \ 2 \, {\left(x - 2\right)}^{2} + {\left(y - 1\right)}^{2} + {\left(z - 3\right)}^{2}
r = 8 G = implicit_plot3d(F(x,y,z)==10, (x, -r, r), (y, -r, r), (z, -r, r), color='orange', mesh=1, opacity=.7, spin=1) show(G)
3D rendering not yet implemented
%md # Plan tangent

Plan tangent

gradF = F.gradient() show(gradF)
(x,y,z)  (4x8,2y2,2z6)\displaystyle \left( x, y, z \right) \ {\mapsto} \ \left(4 \, x - 8,\,2 \, y - 2,\,2 \, z - 6\right)
gradF0 = gradF(3, 3, 5) show(gradF0)
(4,4,4)\displaystyle \left(4,\,4,\,4\right)
PP0 = vector([x-3, y-3, z-5]) show(PP0)
(x3,y3,z5)\displaystyle \left(x - 3,\,y - 3,\,z - 5\right)
eq_plan_tangent = gradF0.dot_product(PP0)==0 show(eq_plan_tangent)
4x+4y+4z44=0\displaystyle 4 \, x + 4 \, y + 4 \, z - 44 = 0
G += implicit_plot3d(eq_plan_tangent, (x, -r, r), (y, -r, r), (z, -r, r), color='blue') show(G)
3D rendering not yet implemented
%md # Droite normale

Droite normale

var('s') s_max=3 G += parametric_plot3d([3+s, 3+s, 5+s], (s, -s_max, s_max), color='red') show(G)
s
3D rendering not yet implemented