« Mathc gnuplot/Animation : Tangente d'une courbe » : différence entre les versions

Contenu supprimé Contenu ajouté
Page créée avec « Catégorie:Mathc gnuplot (livre) <noinclude>{{Mathc gnuplot}} </noinclude> == Préambule == * La tangente dans http://fr.wikipedia.org/wiki/Tangente_%28g%C3%A9om... »
 
Aucun résumé des modifications
Ligne 9 :
* La tangente dans [[http://fr.wikipedia.org/wiki/Tangente_%28g%C3%A9om%C3%A9trie%29 wikipédia]].
* Dans Wikiversité [[http://fr.wikiversity.org/wiki/Mathc_Home_Edition_c13 Mathc Home Edition c13]], une approche empirique.
 
 
== Présentation ==
 
* Un exemple à tester (n'oubliez pas les fichiers *.h)
* '''N'oubliez pas les fichiers *.h partagés et ceux de ce chapitre.'''
 
 
=== Animer la tangente ===
Ligne 35 ⟶ 38 :
 
G_NormalA( i_WGnuplot(-10.,10.,-5.,5.),
i_Cvaluei_time( .1,2.*PI,.05),
i_Tvaluei_time(0.0,2.*PI,.05),
f,
g,
Ligne 110 ⟶ 113 :
|}
 
== Les fichiers h partagésde ce chapitre ==
 
=== Appel des fichiers standards ===
Ligne 125 ⟶ 128 :
#include <string.h>
/* ------------------------------------ */
#include "xa_defxdef.h"
#include "xa_strctxplt.h"
/* ------------------------------------ */
#include "kg_tan.h"
</source>
 
=== Les defines ===
 
<source lang="c">
/* ------------------------------------ */
/* Save as : xa_def.h */
/* ------------------------------------ */
#ifndef PI
#define PI 3.14159265359
#endif
/* ------------------------------------ */
void clrscrn(void)
{
printf("\n\n\n\n\n\n\n\n\n\n\n"
"\n\n\n\n\n\n\n\n\n\n\n"
"\n\n\n\n\n\n\n\n\n\n\n");
}
</source>
 
=== Déclaration et initialisation des structures ===
 
<source lang="c">
/* ------------------------------------ */
/* Save as : xa_strct.h */
/* ------------------------------------ */
typedef struct
{
double xmini;
double xmaxi;
double ymini;
double ymaxi;
 
}W_Ctrl, *PW_Ctrl;
/* ------------------------------------ */
W_Ctrl i_WGnuplot(
double xmini,
double xmaxi,
double ymini,
double ymaxi
)
{
W_Ctrl w = {xmini,xmaxi,ymini,ymaxi};
 
return (w);
}
/* ------------------------------------ */
typedef struct
{
double mini;
double maxi;
double step;
 
}V_Ctrl, *PV_Ctrl;
/* ------------------------------------ */
V_Ctrl i_Tvalue(
double mini,
double maxi,
double step
)
{
V_Ctrl v = {mini,maxi,step};
 
return (v);
}
/* ------------------------------------ */
V_Ctrl i_Cvalue(
double mini,
double maxi,
double step
)
{
V_Ctrl v = {mini,maxi,step};
 
return (v);
}
</source>
 
=== La fonction à dessiner ===
Ligne 265 ⟶ 194 :
void G_NormalA(
W_Ctrl W,
V_Ctrlt_Ctrl C,
V_Ctrlt_Ctrl T,
double (*P_f) (double t),
double (*P_g) (double t),