Mathc initiation/Fichiers h : c62a2


Sommaire


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

c03a.c
/* --------------------------------- */
/* save as c03a.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w;

w.xmin  = -3;  w.xmax    =  3;
w.ymin  = -2;  w.ymax    =  2;
w.zmin  = -0;  w.zmax    =  1;
w.rot_x = 55;  w.rot_z   = 57;
w.scale =  1;  w.scale_z =  1;

//                  t.value t.min t.max  t.step
tvalue t = i_tvalue(0,      0,    2.*PI, .006  );

 clrFILE("a_ka");

 clrscrn();
 printf(" f : (x,y)-> %s\n\n\n", feq);

  do{
     pause(9.E6);
   
     G_3d_p(    w,
                feq,f,
                i_pt2d(cos(t.value)+1,sin(t.value))
                );
                
  } while((t.value+=t.step)<t.max); 
  
 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


 Fichier de commande gnuplot :
reset
set    samples 40
set isosamples 40
set view 55.000, 57.000, 1.000, 1.000 
set xrange [-3.000:3.000]
set yrange [-2.000:2.000]
set zrange [0.000:1.000]
splot  "a_ka" pt 20,\
1/(x*x + y*y + 1)


Cette valeur sera modifiée dans la boucle for(;;)

Le fichier : a_ka

  2.000   -1.000    0.167


Exemple de sortie écran 1 :

 f : (x,y)-> 1/(x*x + y*y + 1)


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

 Press return to continue.