// guide graph(picture pic=currentpicture, // real[] x, real[] y, // interpolate join=operator --); // // Returns a graph using the scaling information for picture pic of the // elements of the arrays (x,y), using the given interpolation type. import graph; size(7.5cm,0); real[] x={ -3 , -2 , 0 , 2 , 3 }, y={ 4 , 3 , -2 , 4 , 3 }; guide courbe1=graph(x,y,join=operator ..); // tension = 1 // Si la tension de la courbe de Bézier (par défaut à 1) // n'est pas satisfaisante, on peut l'augmenter // et définir son propre opérateur de liaison. tensionSpecifier t= operator tension(2,true); interpolate operator ::=operator ..(t); // tension = 2 guide courbe2=graph(x,y,join=operator ::); dot(courbe1,3bp+blue); draw(courbe1,red); draw(courbe2,.7green+dashed); xaxis("$x$",Ticks("%",end=false),Arrow()); yaxis("$y$",Ticks("%",end=false),Arrow());