Sommaire


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

c00a.c
/* --------------------------------- */
/* save as c00a.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#define   s      +2.
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
double     n = 2*200;

CTRL_splot p;

  p.xmin =     -0;
  p.xmax = +4.*PI;             
  p.ymin =     -0;
  p.ymax =     +5;

tvalue t; 
 	
  t.min   =     0.; 
  t.max   = +2.*PI;   
  t.step  =     .1;  
    
double  m = CurveLength2d_simpson(f,g,t.min,t.max,n);

 clrscrn();
 printf(" With \n\n");
 printf(" f : t-> %s  \n", feq);
 printf(" g : t-> %s\n\n", geq);
 printf(" %+.2f < t < %+.2f \n\n",t.min,t.max);

  G_Curve_2d(p,
             f,g,
             t
            );

 printf(" ... load \"a_main.plt\" ... with gnuplot.\n\n");
 
 stop(); 

 clrscrn();
 printf(" If a curve C has a smooth parametrization \n\n"
        "      f : t->  %s , g : t->  %s \n\n"
        " The area S of the surface generated by revolving\n" 
        " the graph of the curve about the x-axis is :\n\n"
        "     / b\n"
        "    |   \n"
        "    |    2 PI g(t) [Df(t)^2+Dg(t)^2]^1/2 dt = %.7f \n"
        "    |   \n"
        "   /   a\n\n\n"
        " with a = %f\n" 
        "      b = %f\n\n\n", feq, geq, 
                                     m, 
                           t.min,t.max);
                                                                           
 printf(" S = 64 PI s**2 / 3 = %.7f \n\n", 64*PI*s*s/3);
                           
 stop(); 

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :

 With 

 f : t-> s*t-s*sin(t)  
 g : t-> s-s*cos(t)

 +0.00 < t < +6.28 

 ... load "a_main.plt" ... with gnuplot.

 Press return to continue.


Exemple de sortie écran :

 If a curve C has a smooth parametrization 

      f : t->  s*t-s*sin(t) , g : t->  s-s*cos(t) 

 The area S of the surface generated by revolving
 the graph of the curve about the x-axis is :

     / b
    |   
    |    2 PI g(t) [Df(t)^2+Dg(t)^2]^1/2 dt = 268.0825728 
    |   
   /   a


 with a = 0.000000
      b = 6.283185


 S = 64 PI s**2 / 3 = 268.0825731 

 Press return to continue.