Aller au contenu

Mathc initiation/Fichiers h : c40fb

Un livre de Wikilivres.


Sommaire


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

c00b2.c
/* ---------------------------------- */
/* save as c00b2.c                    */
/* ---------------------------------- */
#include  "x_hfile.h"
#include       "fb.h"
/* ---------------------------------- */
int main(void)
{
double t = 1;

 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-> 4*cos(t)  
 g : t-> 9*sin(t)  
 h : t-> t

   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  |
  ----------------------------------------------------------------------
 | +1.00 |  -4.93 |      +6.14     |        +6.14       |    +1.71e-01  |
 | +2.00 |  +4.63 |      +6.95     |        +6.95       |    +2.46e-01  |
 | +3.00 |  +1.01 |      +4.03     |        +4.03       |    +5.00e-02  |
 | +4.00 |  -4.81 |      +5.49     |        +5.49       |    +1.23e-01  |
 | +5.00 |  +3.75 |      +7.86     |        +7.86       |    +3.53e-01  |
 | +6.00 |  +1.99 |      +4.14     |        +4.14       |    +5.38e-02  |
 | +7.00 |  -4.38 |      +4.98     |        +4.98       |    +9.24e-02  |
 | +8.00 |  +2.18 |      +8.65     |        +8.65       |    +4.71e-01  |
 | +9.00 |  +2.90 |      +4.32     |        +4.32       |    +6.09e-02  |
  ----------------------------------------------------------------------
 Press return to continue.