Mathc initiation/a173
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "x_hfile.h"
/* ------------------------------------ */
int main(void)
{
Circlevalue c1;
strcpy(c1.name, "a_c01");
c1.radius = 1.;
c1.cx = 0;
c1.cy = 0;
c1.step = .1;
circle(c1);
Circlevalue c2;
strcpy(c2.name, "a_c02");
c2.radius = 1.;
c2.step = .1;
CTRL_splot w;
w.xmin = -5;
w.xmax = 5;
w.ymin = -5;
w.ymax = 5;
tvalue t;
t.value = 0.;
t.min = 0.;
t.max = 2.01*PI;
t.step = .1;
clrscrn();
printf(" Draw a circle.\n\n"
" ... load \"a_main.plt\" ... with gnuplot. \n\n");
for(t.value=t.min;t.value<t.max;t.value+=t.step)
{
c2.cx = cX(t.value);
c2.cy = cY(t.value);
circle(c2);
G_C_2d(w);
pause(9.E7);
}
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
Draw a circle.
Open the file "a_main.plt" with Gnuplot.
Press return to continue.