Aller au contenu

Mathc initiation/a45

Un livre de Wikilivres.


Sommaire


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

c00c2.c
/* --------------------------------- */
/* save as  c00c2.c                  */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fc.h"
/* --------------------------------- */
int main(void)
{
double x = 2.;

 clrscrn();

 printf(" If a smooth curve C is the graph of y = f(x), \n"
        " then the curvature K at P(x,y) is\n\n\n"
        " K = |y''| / [1 + y'^2]^(3/2)     \n\n\n"
        " If P(x,y) is a point on the graph of y = f(x)  \n"
        " at which K != 0. The point M(h,k) is the center\n"
        " of the cuvature for P if   \n\n\n"
        " h = x - y'[1 + y'^2] / y''     \n"
        " k = y +   [1 + y'^2] / y'' \n\n\n"
        " The radius is r = 1/K \n\n\n");
 stop();

 clrscrn();

 printf(" Find the curvature K of the curve at P(%+.2f,%+.2f) with\n\n\n",
          x,f(x));
 printf(" K = |y''| / [1 + y'^2]^(3/2)     \n\n\n");
 printf(" f : x-> %s  \n\n\n", feq);
 printf(" At the point P(%+.2f,%+.2f) K = %+.2f\n\n\n",
         x,f(x),K_y_2d(f,x));
 stop();

 clrscrn();

 printf(" Find the centre of the cuvature M(h,k)\n\n");
 printf(" h = x - y'[1 + y'^2] / y''     \n");
 printf(" k = y +   [1 + y'^2] / y'' \n\n\n");
 printf(" for the point P(%+.2f,%+.2f) with\n\n", x,f(x));
 printf(" f : x-> %s  \n\n\n", feq);
 printf(" At the point P(%+.2f,%+.2f)\n\n",x,f(x));
 printf(" The centre of the cuvature is M(%+.2f,%+.2f)\n\n\n",
               h_y_2d(f,x),
               k_y_2d(f,x) );

 stop();

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


Calculer la courbure pour une fonction log(x-1) en langage c gnuplot


Exemple de sortie écran :
 Find the curvature K of the curve at P(+2.00,+0.00) with


 K = |y''| / [1 + y'^2]^(3/2)     


 f : x-> log(x-1)  


 At the point P(+2.00,+0.00) K = +0.35


 Press return to continue. 

 Find the centre of the cuvature M(h,k)

 h = x - y'[1 + y'^2] / y''     
 k = y +   [1 + y'^2] / y'' 


 for the point P(+2.00,+0.00) with

 f : x-> log(x-1)  


 At the point P(+2.00,+0.00)

 The centre of the cuvature is M(+4.00,-2.00)


 Press return to continue.