Mathc initiation/c36bd

Un livre de Wikilivres.


Sommaire


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

c00d.c
/* --------------------------------- */
/* save as c00d.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fd.h"
/* --------------------------------- */
int main(void)
{
tvalue t;

  t.value =   2*PI/4.;
  t.min   =        0.; 
  t.max   =     2.*PI;  
  t.step  =       .05;  

CTRL_splot p;

  p.xmin = -4;
  p.xmax =  4;             
  p.ymin = -4;
  p.ymax =  4;

 clrscrn();

 printf(" Let C be the curve consisting of .\n\n");
 printf(" all ordered pairs (f(t),g(t)), with\n\n\n");
 printf(" f : t-> %s\n",     feq);
 printf(" g : t-> %s\n\n\n", geq);

 printf(" Find at t = %0.3f\n\n",t.value);
 printf(" the intersection points of the normal with the x-y axis.\n\n\n");

 printf(" P(%6.3f, %6.3f)     P(t, f(t))\n\n", 
        t.value, f(t.value));

 printf(" A(%6.3f, 0)          A(g(t)(DgDf)(t)+f(t), 0)\n\n",
           g(t.value)*(DgDf)(t.value)+f(t.value));

 printf(" B( 0, %6.3f)         B(0, f(t)/(DgDf)(t)+g(t))\n\n\n",
          f(t.value)/(DgDf)(t.value)+g(t.value));

 G_Normal_xy(p,
             f,g,DgDf,
             t
            );

 printf(" To see the graph, open the file \"a_main.plt\" with Gnuplot.\n\n");
 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Find the intersection points of the normal with the x-y axis in language c and gnuplot

Exemple de sortie écran :

 Let C be the curve consisting of .

 all ordered pairs (f(t),g(t)), with


 f : t-> (a-b)*cos(t)+b*cos((a-b/b)*t)
 g : t-> (a-b)*sin(t)-b*sin((a-b/b)*t)


 Find at t = 1.571

 the intersection points of the normal with the x-y axis.


 P( 1.571, -1.000)     P(t, f(t))

 A(-3.000, 0)          A(g(t)(DgDf)(t)+f(t), 0)

 B( 0,  3.000)         B(0, f(t)/(DgDf)(t)+g(t))


 To see the graph, open the file "a_main.plt" with Gnuplot.

 Press return to continue.