CoCalc Public Files201-303-AH / Fichiers Sage pour les Étudiants / Exercice 65 p 195.sagews
Author: Julien Giol
Description: Fichiers Sage
Compute Environment: Ubuntu 18.04 (Deprecated)
%md
# Paraboloïde


# Paraboloïde

var('x, y, z')
F(x,y,z) = x^2+y^2-z
show(F)

(x, y, z)
$\displaystyle \left( x, y, z \right) \ {\mapsto} \ x^{2} + y^{2} - z$
r = 10
G = implicit_plot3d(F(x,y,z)==0, (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
# Droite normale


# Droite normale

gradF = F.gradient()

$\displaystyle \left( x, y, z \right) \ {\mapsto} \ \left(2 \, x,\,2 \, y,\,-1\right)$
gradF0 = gradF(1, 1, 2)

$\displaystyle \left(2,\,2,\,-1\right)$
var('t')
t_max=5
G += parametric_plot3d([1+2*t, 1+2*t, 2-t], (t, -t_max, t_max), color='red')
show(G)

t
3D rendering not yet implemented
%md
# Intersections


# Intersections

var('t')
x(t) = 1+2*t
y(t) = 1+2*t
z(t) = 2-t
eq = x(t)^2+y(t)^2 == z(t)
show(eq)

t
$\displaystyle 2 \, {\left(2 \, t + 1\right)}^{2} = -t + 2$
solve(eq, t)

[t == (-9/8), t == 0]
P(t) = ([x(t), y(t), z(t)])
show(P)

$\displaystyle t \ {\mapsto}\ \left(2 \, t + 1,\,2 \, t + 1,\,-t + 2\right)$
P0 = P(0)
show(P0)

$\displaystyle \left(1,\,1,\,2\right)$
Q = P(-9/8)
show(Q)

$\displaystyle \left(-\frac{5}{4},\,-\frac{5}{4},\,\frac{25}{8}\right)$