Mathc initiation/a43
Apparence
Installer ce fichier dans votre répertoire de travail.
kg_3dc.h |
---|
/* --------------------------------- */
/* save as kg_3dc.h */
/* --------------------------------- */
void G_3d_contour(
CTRL_splot w,
char contour[],
int level,
char feq[]
)
{
FILE *fp = fopen("a_main.plt","w");
fprintf(fp,"reset\n");
fprintf(fp,"set samples 40\n");
fprintf(fp,"set isosamples 40\n");
fprintf(fp,"set hidden3d\n");
fprintf(fp,"set cntrparam levels %d\n",level);
fprintf(fp,"set %s\n",contour);
fprintf(fp,"set xlabel \"X axis\"\n");
fprintf(fp,"set ylabel \"Y axis\"\n");
fprintf(fp,"set zlabel \"Z axis\" offset 1, 0\n");
fprintf(fp,"set view %0.3f, %0.3f, %0.3f, %0.3f \n",
w.rot_x,w.rot_z,w.scale,w.scale_z);
fprintf(fp,"set xrange [%0.3f:%0.3f]\n",w.xmin,w.xmax);
fprintf(fp,"set yrange [%0.3f:%0.3f]\n",w.ymin,w.ymax);
fprintf(fp,"set zrange [%0.3f:%0.3f]\n",w.zmin,w.zmax);
fprintf(fp,"splot ");
fprintf(fp,"%s\n",feq);
fclose(fp);
printf(" ... load \"a_main.plt\" ... with gnuplot.\n\n");
stop();
}
/* --------------------------------- */
/* --------------------------------- */
Déclaration des fichiers h.