Mathc initiation/a64
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b2.c |
---|
/* --------------------------------- */
/* save as c00b2.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double t = PI/6.;
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");
stop();
clrscrn();
printf(" If a plane curve C has a parametrization\n\n"
" x = f(t), y = g(t) and if f'' and g'' exist, \n\n\n "
" then the curvature K at P(x,y) is \n\n\n "
" K = |f' g'' - g' f''| / [ (f')^2 - (g')^2 ]^(3/2)\n\n\n\n"
" Find the curvature K of the curve at P(%+.2f,%+.2f) with\n\n\n"
" f : t-> %s \n"
" g : t-> %s \n\n",
f(t),g(t), feq, geq);
printf(" At the point P(%+.2f,%+.2f) K = %+.5f\n\n\n",
f(t),g(t),Kt_2d(f,g,t));
stop();
clrscrn();
printf(" 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");
printf(" At the point P(%+.2f,%+.2f)\n\n",f(t),g(t));
printf(" The centre of the cuvature is M(%+.2f,%+.2f)\n\n\n",
cx_2d(f,g,t),
cy_2d(f,g,t));
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
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|
Press return to continue.
Exemple de sortie écran :
If a plane curve C has a parametrization
x = f(t), y = g(t) and if f'' and g'' exist,
then the curvature K at P(x,y) is
K = |f' g'' - g' f''| / [ (f')^2 - (g')^2 ]^(3/2)
Find the curvature K of the curve at P(+4.87,+1.00) with
f : t-> 4+sin(2*t)
g : t-> 1-2*cos(3*t)
At the point P(+4.87,+1.00) K = +0.09235
Press return to continue.
Exemple de sortie écran :
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']
At the point P(+4.87,+1.00)
The centre of the cuvature is M(-5.81,+2.78)
Press return to continue.