Mathc initiation/a117

Un livre de Wikilivres.


Sommaire


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

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

 t.value =   7.;
 t.min   =   0.;
 t.max   = 2*PI;
 t.step  =   .1;

tvalue L_tan;
 	
 L_tan.min  = -1.;
 L_tan.max  =  1.;
 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(" t = %+.2f \n\n", t.value);

 axe_3d();

     G_Curve_tang_3d(
                     f,g,h,
                     t,
                     L_tan                          
                    );

 printf(" Draw the tangent and the vector"
        " at the point P(f(t),g(t),h(t))\n\n"
        " ... load \"a_main.plt\" ... with gnuplot.\n\n");
 
 stop();

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

 t = +7.00 

 Draw the tangent and the vector at the point P(f(t),g(t),h(t))

 ... load "a_main.plt" ... with gnuplot.

 Press return to continue.