Aller au contenu

Mathc initiation/a152

Un livre de Wikilivres.


Sommaire


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

c00a.c
/* --------------------------------- */
/* save as c00a.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* --------------------------------- */
int main(void)
{
tvalue t;
double n = 2*200;
	
  t.value =      2*PI;
  t.min   =        0.; 
  t.max   =   t.value;  
  t.step  =        .1;  

double m = CurveLength3d_simpson(f,g,h,t.min,t.max,n);
          
 clrscrn();
 
 printf(" r(t) = f(t)i + g(t)j + h(t)k \n\n");
 printf(" With \n\n");
 printf(" f : t-> %s  \n", feq);
 printf(" g : t-> %s  \n", geq);
 printf(" h : t-> %s\n\n", heq);
 printf(" %+.2f < t < %+.2f \n\n",t.min,t.max);

 axe_3d();

 G_Curve_3d(
             f,g,h,
             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, h : t-> %s\n\n" 
        " And if C does not intersect itself,\n" 
        " except possibly for t= a and t = b,\n" 
        " then the length L of C is        \n\n" 
        "     / b = %+.2f\n" 
        "    |   \n" 
        "    |    [Df(t)^2 + Dg(t)^2 + Dh(t)^2]^1/2  dt = %.3f\n"
        "    |   \n" 
        "   /   a = %+.2f\n\n\n", feq, geq, heq, t.max, m, t.min);

 stop();

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


Exemple de sortie écran :

 r(t) = f(t)i + g(t)j + h(t)k

 With 

 f : t-> exp(t)*cos(t)  
 g : t-> exp(t)  
 h : t-> exp(t)*sin(t)

 +0.00 < t < +6.28 

 open the file "a_main.plt" with Gnuplot.


Exemple de sortie écran :

 If a curve C has a smooth parametrization 

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

 And if C does not intersect itself,
 except possibly for t= a and t = b,
 then the length L of C is        

     / b = +6.28
    |   
    |    [Df(t)^2 + Dg(t)^2 + Dh(t)^2]^1/2  dt = 925.767
    |   
   /   a = +0.00



 Press return to continue