Sommaire


Installer ce fichier dans votre répertoire de travail.


kg_tan3d.h
/* --------------------------------- */
/* save as kg_tan3d.h                */
/* --------------------------------- */
void G_Curve_tang_3d(
double (*P_f)(double t),
double (*P_g)(double t),
double (*P_h)(double t),
tvalue t,
tvalue L_tan
)
{
FILE   *fp = fopen("a_main.plt","w");

  fprintf(fp,
             "set xlabel   \"<x>\" \n"
             "set ylabel   \"<y>\"\n"
             "set zlabel   \"<z>\"\n\n"
             " splot \"draw_axe\" with line lt 9,\\\n"
             " \"a_curve\"  with linespoints lt 6,\\\n" 
             " \"a_vector\" with linespoints lt 8 lw 3,\\\n" 
             " \"a_tan\"    with lines       lt 7 lw 3");
   fclose(fp);

 fp = fopen("a_vector","w");
      fprintf(fp,"  0  0  0 \n %6.5f  %6.5f  %6.5f\n",
             (*P_f)(t.value),(*P_g)(t.value),(*P_h)(t.value));
      fclose(fp);

 fp = fopen("a_tan","w");
      for( L_tan.value=L_tan.min; 
           L_tan.value<=L_tan.max+L_tan.step; 
           L_tan.value+=L_tan.step)
           
          fprintf(fp," %6.3f  %6.3f  %6.3f\n",
                (*P_f)(t.value)+fx_x((*P_f),t.value,H)*L_tan.value,
                (*P_g)(t.value)+fx_x((*P_g),t.value,H)*L_tan.value,
                (*P_h)(t.value)+fx_x((*P_h),t.value,H)*L_tan.value);
      fclose(fp);
            
 fp = fopen("a_curve","w");
      for(t.value=t.min; t.value<=t.max+t.step; t.value+=t.step)
          fprintf(fp," %6.5f  %6.5f  %6.5f\n",
                  (*P_f)(t.value),(*P_g)(t.value),(*P_h)(t.value));
      fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */