Mathc initiation/Fichiers h : c54a6
Apparence
Installer ce fichier dans votre répertoire de travail.
x_at_an3d.h |
---|
/* ---------------------------------- */
/* save as x_at_an3d.h */
/* ---------------------------------- */
double aT_3d(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
double t,
double e
)
{
v3d v;
v3d a;
v.i = fx_x((*P_f),t,e);
v.j = fx_x((*P_g),t,e);
v.k = fx_x((*P_h),t,e);
a.i = fx_xx((*P_f),t,e);
a.j = fx_xx((*P_g),t,e);
a.k = fx_xx((*P_h),t,e);
return( dotproduct3d(v,a)
/
norm3d(v)
);
}
/* ---------------------------------- */
double aN_3d(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
double t,
double e
)
{
v3d v;
v3d a;
v.i = fx_x((*P_f),t,e);
v.j = fx_x((*P_g),t,e);
v.k = fx_x((*P_h),t,e);
a.i = fx_xx((*P_f),t,e);
a.j = fx_xx((*P_g),t,e);
a.k = fx_xx((*P_h),t,e);
return( norm3d( vectorproduct3d(v,a) )
/
norm3d(v)
);
}
/* ---------------------------------- */
double aN_3d_2(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
double t,
double e
)
{
v3d v;
v3d a;
double aT;
double IIaII;
v.i = fx_x((*P_f),t,e);
v.j = fx_x((*P_g),t,e);
v.k = fx_x((*P_h),t,e);
a.i = fx_xx((*P_f),t,e);
a.j = fx_xx((*P_g),t,e);
a.k = fx_xx((*P_h),t,e);
aT = dotproduct3d(v,a)
/
norm3d(v);
IIaII = norm3d(a);
return( sqrt( IIaII*IIaII - aT*aT )
);
}
/* ---------------------------------- */
/* ---------------------------------- */
Déclaration des fichiers h.