Aller au contenu

Mathc initiation/Fichiers h : c42fc

Un livre de Wikilivres.


Sommaire


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

c00c.c
/* --------------------------------- */
/* save as  c00c.c                   */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fc.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w;

w.xmin = -2.0; w.xmax = +10.0;
w.ymin = -5.0; w.ymax = + 1.0;

double     x = 2.0;
double cstep = 0.1;

   circle(1./K_y_2d(f,x),
          h_y_2d(f,x),
          k_y_2d(f,x),
          cstep);

   G_C_2d(w,
          f,x,
          feq
          );

 clrscrn();
 
 printf(" If a smooth curve C is the graph"
        " of y = %s \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"

        " ... load \"a_main.plt\" ... with gnuplot.  \n\n",feq);

 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Calculer la courbure pour une fonction log(x-1) en langage c gnuplot
Exemple de sortie écran :
 If a smooth curve C is the graph of y = log(x-1) 
 then the curvature K at P(x,y) is


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


 If P(x,y) is a point on the graph of y = f(x)  
 at which K != 0. The point M(h,k) is the center
 of the cuvature for P if   


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


 The radius is r = 1/K 


 Open the file "a_main.plt" with Gnuplot.

 Press return to continue.