Aller au contenu

Mathc initiation/a116

Un livre de Wikilivres.


Sommaire


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

c00a1.c
/* --------------------------------- */
/* save as c00a1.c                   */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* --------------------------------- */
int main(void)
{
tvalue t;

 t.value =  0.;
 t.min   =  0.;
 t.max   = 10.;
 t.step  = .1;

tvalue L_tan;

 L_tan.min  = -.6;
 L_tan.max  =  .6;  
 L_tan.step =  .1;
 
 clrscrn();

 printf(" r(t) = f(t)i + g(t)j + h(t)k \n\n");
 printf(" With \n\n");
 printf(" f : t-> %s  \n", feq);
 printf(" g : t-> %s  \n", geq);
 printf(" h : t-> %s\n\n", heq);

 printf(" Animate the tangent and the vector\n"
        " ... load \"a_main.plt\" ... with gnuplot.\n\n");
 
 axe_3d();

  do{
     G_Curve_tang_3d(
                     f,g,h,
                     t,
                     L_tan                          
                    );
                  
                   pause(9.E7);
                   
  } while((t.value+=t.step)<t.max);

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Draw the tangent of a vectoriel function in 3d with gnuplot and the c language

Exemple de sortie écran :

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

 With 

 f : t-> cos(t)  
 g : t-> sin(t)  
 h : t-> t

 Animate the tangent and the vector
 ... load "a_main.plt" ... with gnuplot.