Aller au contenu

Mathc initiation/Fichiers h : c17bd

Un livre de Wikilivres.


Sommaire


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

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

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

CTRL_splot p;

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

 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 tangent with the x-y axis.\n\n\n");

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

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

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

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

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

 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Find the intersection points of the tangent 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-> 3*pow(sin(t),5)
 g : t-> 3*pow(cos(t),5)


 Find at t = 0.785

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


 P( 0.530,  0.530)     P(f(t), g(t))

 A( 1.061, 0)          A(f(t)-g(t)/DgDf(t), 0)

 B( 0,  1.061)         B(0, g(t)-f(t)*DgDf(t))


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

 Press return to continue.