Mathc initiation/Fichiers h : c47a4
Apparence
Installer ce fichier dans votre répertoire de travail.
kg_2d.h utilitaire |
---|
/* ---------------------------------- */
/* save as kg_2d.h */
/* ---------------------------------- */
void G_2d(
double xmin,
double xmax,
double ymin,
double ymax,
char feq[],
double (*P_f)(double x, double y),
char geq[],
double (*P_g)(double x, double y)
)
{
FILE *fp;
fp = fopen("a_main.plt","w");
fprintf(fp,"set samples 400\n");
fprintf(fp,"set isosamples 400\n");
fprintf(fp,"set view 1.000, 1.000, 1.000, 1.000 \n");
fprintf(fp,"set xrange [%0.3f:%0.3f]\n",xmin,xmax);
fprintf(fp,"set yrange [%0.3f:%0.3f]\n",ymin,ymax);
fprintf(fp,"set zrange [%0.3f:%0.3f]\n",-.0,+.01);
fprintf(fp,"splot ");
fprintf(fp,"%s,\\\n",feq);
fprintf(fp,"%s\n\n",geq);
fprintf(fp,"reset\n\n");
fclose(fp);
}
/* ---------------------------------- */
/* ---------------------------------- */