Aller au contenu

Mathc initiation/Fichiers h : c43fc

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.

c00a2.c
/* ---------------------------------- */
/* save as c00a2.c                    */
/* ---------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double t = 4;

 clrscrn();
 printf(" The position vector of a moving point at time t is  \n\n"
        " r(t) = f(t)i + g(t)j + h(t)k \n\n"
        " With \n\n"
        " f : t-> %s  \n"
        " g : t-> %s  \n"
        " h : t-> %s\n\n"
        "   1 < t < 5 \n\n"
        " Find the tangential component of acceleration at time t. (aT)\n\n"
        " Find the normal     component of acceleration at time t. (aN)\n\n"
        " Find the curvature K at time t.\n\n",
         feq, geq, heq);
 stop();

 clrscrn();
 
 printf(
 "  ----------------------------------------------------------------------\n"
 " |       |        |     ||r'xr''|| |        aN =        |    ||r'xr''|| |\n" 
 " |   t   |   aT   | aN =---------- | sqrt(||a||^2-aT^2) | K =---------- |\n"
 " |       |        |        ||r'||  |                    |     ||r'||^3  |\n"
 "  --------------------------------------------------------------------\n"); 

 for(;t<10;t++)
                               
 printf(
 " | %+3.2f | %+6.2f |     %+6.2f     |       %+6.2f       |    %+6.2e  |\n",
                   t,
      aT_3d  ( f,g,h,t),
      aN_3d  ( f,g,h,t),
      aN_3d_2( f,g,h,t),
       K_3d  ( f,g,h,t));

 printf(
 "  ----------------------------------------------------------------------\n"); 

 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


Exemple de sortie écran :

 The position vector of a moving point at time t is  

 r(t) = f(t)i + g(t)j + h(t)k 

 With 

 f : t-> t  
 g : t-> t**2  
 h : t-> t**3

   1 < t < 5 

 Find the tangential component of acceleration at time t. (aT)

 Find the normal     component of acceleration at time t. (aN)

 Find the curvature K at time t.

 Press return to continue.


Exemple de sortie écran :

  ----------------------------------------------------------------------
 |       |        |     ||r'xr''|| |        aN =        |    ||r'xr''|| |
 |   t   |   aT   | aN =---------- | sqrt(||a||^2-aT^2) | K =---------- |
 |       |        |        ||r'||  |                    |     ||r'||^3  |
  --------------------------------------------------------------------
 | +4.00 | +24.00 |      +2.03     |        +2.03       |    +8.58e-04  |
 | +5.00 | +30.00 |      +2.02     |        +2.02       |    +3.53e-04  |
 | +6.00 | +36.00 |      +2.02     |        +2.02       |    +1.71e-04  |
 | +7.00 | +42.00 |      +2.01     |        +2.01       |    +9.22e-05  |
 | +8.00 | +48.00 |      +2.01     |        +2.01       |    +5.41e-05  |
 | +9.00 | +54.00 |      +2.01     |        +2.01       |    +3.38e-05  |
  ----------------------------------------------------------------------
 Press return to continue.