Sommaire


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

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

CTRL_splot p;

  p.xmin = -2;
  p.xmax = +2;             
  p.ymin = -0;
  p.ymax = +2;

tvalue t;
  	
  t.min   =    0.; 
  t.max   =    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 = 4 PI r**2 = %.7f \n\n", 4*PI*r*r);
    
 stop(); 

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


Exemple de sortie écran :

 With 

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

 +0.00 < t < +3.14 

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

 Press return to continue.


Exemple de sortie écran :

 If a curve C has a smooth parametrization 

      f : t->  r * cos(t) , g : t->  r * sin(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 = 50.2654824
    |   
   /   a


 with a = 0.000000
      b = 3.141593


 S = 4 PI r**2 = 50.2654825 

 Press return to continue.