Sommaire


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

c00b.c
/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include  "x_hfile.h"
/* ------------------------------------ */
int main(void)
{
CTRL_splot w;

  w.xmin =  -1;
  w.xmax =  92;             
  w.ymin =  -1;
  w.ymax =  80;	

pt2d P0 = i_pt2d(40.,50.),
        P1 = i_pt2d(50.,80.),
        P2 = i_pt2d(60.,40.),
        P3 = i_pt2d(40.,30.),
        P4 = i_pt2d(40.,10.),
        P5 = i_pt2d(60.,20.),
        P6 = i_pt2d(70.,10.);

 clrscrn();
 
 printf(" Graph the quadratic bezier curve"
        " with the control points,\n\n"
        " P0,P1,P2,...\n\n");

 G_3_quadratic_Bezier_2d(
             w,
             P0,P1,P2,P3,P4,P5,P6
            );

 printf(" To see the curve, "
        "open the file \"a_main.plt\" with Gnuplot.\n\n");

 stop();
 
 clrscrn();
 
 printf(" Graph the quadratic bezier curve"
        " without the control points,\n\n"
        " P0,P1,P2,...\n\n");

 G_3_wp_quadratic_Bezier_2d(
             w,
             P0,P1,P2,P3,P4,P5,P6
            );

 printf(" To see the curve, "
        "open the file \"a_main.plt\" with Gnuplot.\n\n");

 stop();
 
 return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Deux exemples. Dessiner trois courbes avec les trois points de contrôles,  puis sans les points de contrôles.