Sommaire


Installer ce fichier dans votre répertoire de travail.

kg_polfg.h
/* --------------------------------- */
/* save as kg_polfg.h                */
/* --------------------------------- */
void G_polarg(
CTRL_splot w,
double (*P_f)(double k),
double (*P_g)(double k),
tvalue t
)
{
FILE *fp = fopen("a_main.plt","w");
        
 fprintf(fp," reset\n"
            " set size ratio -1\n"
            " set polar\n" 
            " set grid polar lt 3\n\n"
            " plot [%0.3f:%0.3f] [%0.3f:%0.3f] [%0.3f:%0.3f]\\\n"                   
            " \"curvef\" with lines lt 7 lw 3,\\\n"  
            " \"curveg\" with lines lt 6 lw 3\n",
              t.min,t.max,  
              w.xmin,w.xmax,w.ymin,w.ymax);
  fclose(fp);


 fp = fopen("curvef","w");
 for(t.value=t.min; t.value<=t.max; t.value+=t.step)
     fprintf(fp," %6.3f   %6.3f\n",t.value,(*P_f)(t.value));
     
 fprintf(fp," %6.3f   %6.3f\n",t.max,(*P_f)(t.max));
 fclose(fp);


 fp = fopen("curveg","w");
 for(t.value=t.min; t.value<=t.max; t.value+=t.step)
     fprintf(fp," %6.3f   %6.3f\n",t.value,(*P_g)(t.value));
     
 fprintf(fp," %6.3f   %6.3f\n",t.max,(*P_g)(t.max));    
 fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */