Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Fichiers Sage

Project: Enseignement
Views: 431
%md # Paraboloïde

Paraboloïde

var('x, y, z') F(x,y,z) = x^2+y^2-z show(F)
(x, y, z)
(x,y,z)  x2+y2z\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() show(gradF)
(x,y,z)  (2x,2y,1)\displaystyle \left( x, y, z \right) \ {\mapsto} \ \left(2 \, x,\,2 \, y,\,-1\right)
gradF0 = gradF(1, 1, 2) show(gradF0)
(2,2,1)\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
2(2t+1)2=t+2\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)
t  (2t+1,2t+1,t+2)\displaystyle t \ {\mapsto}\ \left(2 \, t + 1,\,2 \, t + 1,\,-t + 2\right)
P0 = P(0) show(P0)
(1,1,2)\displaystyle \left(1,\,1,\,2\right)
Q = P(-9/8) show(Q)
(54,54,258)\displaystyle \left(-\frac{5}{4},\,-\frac{5}{4},\,\frac{25}{8}\right)