Mathc gnuplot/Fichiers h : xfxyz x

Un livre de Wikilivres.
Mathc gnuplot
Mathc gnuplot
Mathc gnuplot
Sommaire

I - Dessiner

Fichiers h partagés :

Application :

II - Animer

Application :

III - Géométrie de la tortue standard

Application :

IV - Géométrie de la tortue vectorielle

Application :

Annexe

Livre d'or



Préambule[modifier | modifier le wikicode]

Installez ce fichier dans votre répertoire de travail.

xfxyz_x.h
Dérivation de fonction df(x,y,z)/dx
/* ------------------------------------ */
/*  Save as :   xfxyz_x.h               */
/* ------------------------------------ */
double fxyz_x(
double (*P_f)(double x, double y, double z),
double   h,
point3d  p
)
{
double tplsh;
double tmnsh;
 
 tplsh = ((*P_f)(p.x+h,p.y,p.z));
 tmnsh = ((*P_f)(p.x-h,p.y,p.z));
 
 return(( tplsh-tmnsh)/(2.*h) );
}
/* ------------------------------------ */
double fxyz_y(
double (*P_f)(double x, double y, double z),
double   h,
point3d  p
)
{
double tplsh;
double tmnsh;
 
 tplsh = ((*P_f)(p.x,p.y+h,p.z));
 tmnsh = ((*P_f)(p.x,p.y-h,p.z));
 
 return(( tplsh-tmnsh)/(2.*h) );
}
/* ------------------------------------ */
double fxyz_z(
double (*P_f)(double x, double y, double z),
double   h,
point3d  p
)
{
double tplsh;
double tmnsh;
 
 tplsh = ((*P_f)(p.x,p.y,p.z+h));
 tmnsh = ((*P_f)(p.x,p.y,p.z-h));
 
 return(( tplsh-tmnsh)/(2.*h) );
}