Mathc initiation/Fichiers h : c64a2


Sommaire


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

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

w.xmin  = -4;  w.xmax    =  4;
w.ymin  = -4;  w.ymax    =  4;
w.zmin  = -1;  w.zmax    =  1;
w.rot_x = 25;  w.rot_z   = 43;
w.scale = .7;  w.scale_z = .7;

pt2d      p = i_pt2d(2,-1);
pt2d   step = i_pt2d(.3,.3);

 clrscrn();

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

     G_3d_pxy(  w,
                feq,f,
                p,step);
 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Fichier de commande gnuplot :
set xlabel   "<x>"
set ylabel   "<y>"
set zlabel   "<z>"
set    samples 40
set isosamples 40
set view 25.000, 43.000, 0.700, 0.700 
set xrange [-4.000:4.000]
set yrange [-4.000:4.000]
set zrange [-1.000:1.000]
splot "a_ka" with line lw 6,\
"a_kb" with line lw 6,\
cos(x*y)


Le fichier : a_ka

  2.000   -4.000   -0.146
  2.000   -3.700    0.439
  2.000   -3.400    0.869
...


Le fichier : a_kb

 -4.000   -1.000   -0.654
 -3.700   -1.000   -0.848
 -3.400   -1.000   -0.967
...


Exemple de sortie écran 1 :

 f : (x,y)-> cos(x*y)


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

 Press return to continue.