Aller au contenu

Mathc initiation/a462

Un livre de Wikilivres.


Sommaire


Installer ce fichier dans votre répertoire de travail.


Texte de la légende
fa.h
/* --------------------------------- */
/* save as fa.h                      */
/* --------------------------------- */
#define  LOOP  2*300
/* ---------------------------------- */
double f(
double X,
double Y)
{
 return(    pow(X*X + Y*Y, 3./2.) );
}
char  feq[] = "(X**2 + Y**2)**(3/2)";
/* --------------------------------- */
/* --------------------------------- */
double Y(
double r,
double t)
{
 return(        r*sin(t) );
}
char  Yeq[] = "(r*sin(t))";
/* ---------------------------------- */
double X(
double r,
double t)
{
 return(        r*cos(t) );
}
char  Xeq[] = "(r*cos(t))";
/* --------------------------------- */
/* --------------------------------- */
double br(
double t)
{
 return(       (1.) );
}
char  breq[] = "1";
/* --------------------------------- */
double ar(
double t)
{
 return(       (0.) );
}
char  areq[] = "0";
/* ---------------------------------- */
double bt = PI;    char bteq[] = "PI";
double at = 0.;    char ateq[] =  "0";
/* ---------------------------------- */
/* ---------------------------------- */
fb.h
/* --------------------------------- */
/* save as fb.h                      */
/* --------------------------------- */
#define  LOOP  2*300
/* ---------------------------------- */
double f(
double X,
double Y)
{
 return(   sqrt(pow(X*X+Y*Y,3) + 1) );
}
char  feq[] = "((X**2 + Y**2)**3) + 1)**(1/2)";
/* --------------------------------- */
/* --------------------------------- */
double Y(
double r,
double t)
{
 return(        r*sin(t) );
}
char  Yeq[] = "(r*sin(t))";
/* ---------------------------------- */
double X(
double r,
double t)
{
 return(        r*cos(t) );
}
char  Xeq[] = "(r*cos(t))";
/* --------------------------------- */
/* --------------------------------- */
double br(
double t)
{
 return(        (2.*PI) );
}
char  breq[] = "2*PI";
/* --------------------------------- */
double ar(
double t)
{
 return(       (0.) );
}
char  areq[] = "0";
/* ---------------------------------- */
double bt = 1.;    char bteq[] =  "1";
double at = 0.;    char ateq[] =  "0";
/* ---------------------------------- */
/* ---------------------------------- */