Sommaire


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

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

  w.xmin = -10;
  w.xmax =  90;             
  w.ymin = -10;
  w.ymax =  50;	
  
pt2d  P0 = i_pt2d(20.,10.),
      P1 = i_pt2d(40.,40.),
      P2 = i_pt2d(60.,10.);

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

    G_quadratic_Bezier_2d(
             w,
             P0,P1,P2
            );

 printf(" To see the curve, "
        " ... load \"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_wp_quadratic_Bezier_2d(
             w,
             P0,P1,P2
            );

 printf(" To see the curve, "
        " ... load \"a_main.plt\" ... with gnuplot.  \n\n");

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


Deux exemples : Dessiner une courbe avec les trois points de contrôles,  puis sans les points de contrôles.