Aller au contenu

Mathc initiation/a141

Un livre de Wikilivres.


Sommaire


Installer ce fichier dans votre répertoire de travail.


Les fonctions f
fa.h
/* --------------------------------- */
/* save as fa.h                      */
/* --------------------------------- */
double f(
double t)
{
        return( exp(t)*cos(t) );
}
char  feq[] =  "exp(t)*cos(t)";
/* --------------------------------- */
double g(
double t)
{
        return( exp(t));
}
char  geq[] =  "exp(t)";
/* --------------------------------- */
double h(
double t)
{
        return( exp(t)*sin(t));
}
char  heq[] =  "exp(t)*sin(t)";
/* --------------------------------- */
void axe_3d(void)
{
FILE *fp;

   fp = fopen("draw_axe","w");

   fprintf(fp,"\n");
   fprintf(fp,"  300.000   0.000   0.000\n");
   fprintf(fp,"   -0.000   0.000   0.000\n");
   fprintf(fp,"    0.000   0.000   0.000\n");
   fprintf(fp,"    0.000 300.000   0.000\n");
   fprintf(fp,"    0.000  -0.000   0.000\n");
   fprintf(fp,"    0.000   0.000   0.000\n");
   fprintf(fp,"    0.000   0.000 300.000\n");
   fprintf(fp,"    0.000   0.000  -0.000\n");
   fprintf(fp,"\n");

   fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */
fb.h
/* --------------------------------- */
/* save as fb.h                      */
/* --------------------------------- */
double f(
double t)
{
        return( 6*t );
}
char  feq[] =  "6*t";
/* --------------------------------- */
double g(
double t)
{
        return( 3*t*t);
}
char  geq[] =  "3*t**2";
/* --------------------------------- */
double h(
double t)
{
        return( t*t*t );
}
char  heq[] =  "t**3";
/* --------------------------------- */
void axe_3d(void)
{
FILE *fp;

   fp = fopen("draw_axe","w");

   fprintf(fp,"\n");
   fprintf(fp,"   10.000   0.000    0.000\n");
   fprintf(fp,"  -10.000   0.000    0.000\n");
   fprintf(fp,"    0.000   0.000    0.000\n");
   fprintf(fp,"    0.000  10.000    0.000\n");
   fprintf(fp,"    0.000 -10.000    0.000\n");
   fprintf(fp,"    0.000   0.000    0.000\n");
   fprintf(fp,"    0.000   0.000   10.000\n");
   fprintf(fp,"    0.000   0.000  -10.000 \n");
   fprintf(fp,"\n");

   fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */