Mathc initiation/Fichiers c : c29ca
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c16a.c |
---|
/* --------------------------------- */
/* save as c16a.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
double h = .01;
pt3d p = i_pt3d(2,-3,1);
v3d u = grad_fxyz(f,h,p);
clrscrn();
printf(" f : x,y,z -> %s\n\n\n",feq);
printf(" p(%+.1f,%+.1f,%+.1f)\n\n",p.x,p.y,p.z);
printf(" Find equations for the tangent plane\n");
printf(" and the normal line to the graph of\n");
printf(" the equation at the point P.\n\n\n");
printf(" The equations for the tangent plane is :\n\n");
printf(" %+.1f(x %+.1f)) %+.1f(y %+.1f) %+.1f(z %+.1f) = 0\n\n\n",
fxyz_x(f,h,p), -p.x,
fxyz_y(f,h,p), -p.y,
fxyz_z(f,h,p), -p.z);
printf(" grad(p) = %+.1fi %+.1fj %+.1fk \n\n",u.i,u.j,u.k);
printf(" p(%+.1f,%+.1f,%+.1f)\n\n",p.x,p.y,p.z);
stop();
clrscrn();
printf(" The normal line is parallel to,\n\n");
printf(" grad(p)]p = %+.1fi %+.1fj %+.1fk \n\n\n",u.i,u.j,u.k);
printf(" and passes throught p(%+.1f,%+.1f,%+.1f)\n\n",p.x,p.y,p.z);
printf(" x=%+6.1f %+6.1f t\n y=%+6.1f %+6.1f t\n z=%+6.1f %+6.1f t\n\n\n\n",
p.x, fxyz_x(f,h,p),
p.y, fxyz_y(f,h,p),
p.z, fxyz_z(f,h,p));
stop();
return 0;
}
/* ---------------------------------
An equation for the tangent plane to the graph
of z = f(x,y,z) at the point (x0,y0,z0) is
f_x(x0,y0,z0)(x-x0)+f_y(x0,y0,z0)(y-y0)+f_z(x0,y0,z0)(z-z0) = 0
A normal vector of z = f(x,y,z) at
the point (x0,y0,z0) is
grad(p)]p0 = f_x(x0,y0,z0)i+f_y(x0,y0,z0)j+f_z(x0,y0,z0)k
------------------------------------ */
/* --------------------------------- */
/* --------------------------------- */
L'équation du plan tangent au point P0 est donnée par :
f_x(x0,y0,z0)(x-x0)+f_y(x0,y0,z0)(y-y0)+f_z(x0,y0,z0)(z-z0) = 0 Le vecteur normal au point P0 est donné par le gradient : grad(p)]p0 = f_x(x0,y0,z0)i+f_y(x0,y0,z0)j+f_z(x0,y0,z0)k Les équations paramétriques de la droite normale au point P0 est donné par :
x= x0 + f_x(x0,y0,z0) t y= y0 + f_y(x0,y0,z0) t z= z0 + f_z(x0,y0,z0) t
Exemple de sortie écran :
f : x,y,z -> 4*x**2 - y**2 + 3*z**2 - 10
p(+2.0,-3.0,+1.0)
Find equations for the tangent plane
and the normal line to the graph of
the equation at the point P.
The equations for the tangent plane is :
+16.0(x -2.0)) +6.0(y +3.0) +6.0(z -1.0) = 0
grad(p) = +16.0i +6.0j +6.0k
p(+2.0,-3.0,+1.0)
Press return to continue.
Exemple de sortie écran :
The normal line is parallel to,
grad(p)]p = +16.0i +6.0j +6.0k
and passes throught p(+2.0,-3.0,+1.0)
x = +2.0 +16.0 t
y = -3.0 +6.0 t
z = +1.0 +6.0 t
Press return to continue.