Aller au contenu

Mathc initiation/a263

Un livre de Wikilivres.


Sommaire


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

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

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

pt2d    P0 = i_pt2d(40.,40.),
        P1 = i_pt2d(48.,55.),
        P2 = i_pt2d(70.,45.),
        P3 = i_pt2d(50.,25.),
        P4 = i_pt2d(43.,18.),
        P5 = i_pt2d(40.,13.),
        P6 = i_pt2d(40.,10.),
        P7 = i_pt2d(46.,14.),
        P8 = i_pt2d(53.,09.),
        P9 = i_pt2d(58.,10.);

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

 G_3_Cubic_Bezier_2d(
             w,
             P0,P1,P2,P3,P4,P5,P6,P7,P8,P9
            );

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

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


Trois courbes. Dessiner un "2".