Mathc initiation/a66

Un livre de Wikilivres.


Sommaire


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

c00a.c
/* --------------------------------- */
/* save as c00a.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;

pt2d p = i_pt2d(2,-1);

 clrscrn();

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

     G_3d_p(    w,
                feq,f,
                p);
 stop();

 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)


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.