Mathc initiation/a124
Apparence
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)
{
CTRL_splot w;
w.xmin = -2.5;
w.xmax = +2.5;
w.ymin = -2.5;
w.ymax = +2.5;
tvalue t;
t.value = 0.;
t.min = 0.;
t.max = 4.*PI;
t.step = .05;
clrscrn();
printf(" r(t) = f(t)i + g(t)j \n\n");
printf(" With \n\n");
printf(" f : t-> %s \n", feq);
printf(" g : t-> %s\n\n", geq);
printf(" Animate the velocity and accelerator vectors\n\n"
" ... load \"a_main.plt\" ... with gnuplot. \n\n");
do{
G_Curve_2d(w,
f,g,
t
);
pause(9.E7);
} while((t.value+=t.step)<t.max);
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
r(t) = f(t)i + g(t)j
With
f : t-> cos(t)**2
g : t-> 2*sin(t)
Animate the velocity and accelerator vectors
... load "a_main.plt" ... with gnuplot