Aller au contenu

Mathc initiation/Fichiers h : c24bc

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;
	
  t.value =      3.24;
  t.min   =        0.; 
  t.max   =        5.;  
  t.step  =       .02;  

CTRL_splot p;

  p.xmin = -16;
  p.xmax =  10;             
  p.ymin =  -8;
  p.ymax =   5;
  
double cstep =  0.01;

     circle(    1./fabs(Kt_2d(f,g,t.value)),
                        cx_2d(f,g,t.value),
                        cy_2d(f,g,t.value),
                        cstep);

     G_C_2d( p,
             f,g,
             t);

 clrscrn();

 printf(" The curvature K of a smooth parametric"
        " curve C is :\n\n\n"

        " K = |f' g'' - g' f''| / "
        "[ (f')^2 - (g')^2 ]^(3/2)\n\n"

        " If P(f(t),g(t)) is a point on the curve  \n"
        " at which K != 0. The point M(h,k)"
        " is the center\n"
        " of the cuvature for P if   \n\n\n"
        " h = f - g'[f'^2 + g'^2] / [f'g''-f''g']\n"
        " k = g + f'[f'^2 + g'^2] / [f'g''-f''g']\n\n\n"

        " The radius is r = 1/|K| \n\n\n"

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

 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Calculer la courbure pour une fonction paramétrique 2d en langage c et gnuplot

Exemple de sortie écran :

 The curvature K of a smooth parametric curve C is :


 K = |f' g'' - g' f''| / [ (f')^2 - (g')^2 ]^(3/2)

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


 h = f - g'[f'^2 + g'^2] / [f'g''-f''g']
 k = g + f'[f'^2 + g'^2] / [f'g''-f''g']


 The radius is r = 1/|K| 


 Open the file "a_main.plt" with Gnuplot.

 Press return to continue.