Sommaire


Installer ce fichier dans votre répertoire de travail.

kg_polar.h
/* --------------------------------- */
/* save as  kg_polar.h               */
/* --------------------------------- */
void G_polar_lp(
CTRL_splot w,
double (*P_r)(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"
             " \"curves\" with lines lt 7 lw 3",
               t.min,t.max, 
               w.xmin,w.xmax,w.ymin,w.ymax);
 fclose(fp);


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