Aller au contenu

Mathc initiation/Fichiers h : c44fc

Un livre de Wikilivres.


Sommaire


Installer ce fichier dans votre répertoire de travail.

x_curvat.h
/* ---------------------------------- */
/* save as x_curvat.h                 */
/* ---------------------------------- */
double aT_3d(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
double t
)
{
v3d  v;
v3d  a;

      v.i = fx_x((*P_f),t,H);
      v.j = fx_x((*P_g),t,H);
      v.k = fx_x((*P_h),t,H);

      a.i = fx_xx((*P_f),t,H);
      a.j = fx_xx((*P_g),t,H);
      a.k = fx_xx((*P_h),t,H);

 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
)
{
v3d   v;
v3d   a;

      v.i = fx_x((*P_f),t,H);
      v.j = fx_x((*P_g),t,H);
      v.k = fx_x((*P_h),t,H);

      a.i = fx_xx((*P_f),t,H);
      a.j = fx_xx((*P_g),t,H);
      a.k = fx_xx((*P_h),t,H);

 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
)
{
v3d   v;
v3d   a;

double   aT;
double IIaII;

      v.i = fx_x((*P_f),t,H);
      v.j = fx_x((*P_g),t,H);
      v.k = fx_x((*P_h),t,H);

      a.i = fx_xx((*P_f),t,H);
      a.j = fx_xx((*P_g),t,H);
      a.k = fx_xx((*P_h),t,H);

       aT =  dotproduct3d(v,a)
                  /
             norm3d(v);

    IIaII = norm3d(a);

 return(  sqrt( IIaII*IIaII - aT*aT )
       );
}
/* ---------------------------------------------------- */
double K_3d(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
double t
)
{
v3d   v;
v3d   a;

double    IIvII;

      v.i = fx_x((*P_f),t,H);
      v.j = fx_x((*P_g),t,H);
      v.k = fx_x((*P_h),t,H);

      a.i = fx_xx((*P_f),t,H);
      a.j = fx_xx((*P_g),t,H);
      a.k = fx_xx((*P_h),t,H);

      IIvII = norm3d(v);

 return(  norm3d( vectorproduct3d(v,a) )
                 /
           pow(IIvII,3)
       );
}
/* ---------------------------------- */
/* ---------------------------------- */