/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N S M A T H E M A T I Q U E S G E N E R A L E S : */
/* */
/* */
/* Author of '$ximD/definit.1$DEF' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 19870000000000). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E F R A C T I O N " E N T I E R E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(SfractionI
/* Definition d'un fraction (introduite le 20081108094225) : */
,DEFV(Int,numerateur)
/* Numerateur entier, */
,DEFV(Int,denominateur)
/* Denominateur entier. */
,NOM_VIDE
);
Typedef(fractionI,STRU(SfractionI))
TypedefS(A___fractionI,fractionI)
TypedefS(E___fractionI,fractionI)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E F R A C T I O N " F L O T T A N T E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(SfractionF
/* Definition d'un fraction (introduite le 20081108094225) : */
,DEFV(Float,numerateur)
/* Numerateur flottant, */
,DEFV(Float,denominateur)
/* Denominateur flottant. */
,NOM_VIDE
);
Typedef(fractionF,STRU(SfractionF))
TypedefS(A___fractionF,fractionF)
TypedefS(E___fractionF,fractionF)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E F R A C T I O N " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(SfractionD
/* Definition d'un fraction (introduite le 20081108094225) : */
,DEFV(Double,numerateur)
/* Numerateur flottant, */
,DEFV(Double,denominateur)
/* Denominateur flottant. */
,NOM_VIDE
);
Typedef(fractionD,STRU(SfractionD))
TypedefS(A___fractionD,fractionD)
TypedefS(E___fractionD,fractionD)
/*************************************************************************************************************************************/
/* */
/* A C C E S A U N E F R A C T I O N : */
/* */
/*************************************************************************************************************************************/
#define gNumerateurFraction__(fraction,acces) \
acces(fraction,numerateur)
#define gDenominateurFraction(fraction,acces) \
acces(fraction,denominateur)
#define NumerateurFraction__(fraction) \
gNumerateurFraction__(fraction,ASD1)
#define DenominateurFraction(fraction) \
gDenominateurFraction(fraction,ASD1)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N E F R A C T I O N : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_FRACTION(fraction,numerateur_de_la_fraction,denominateur_de_la_fraction,acces) \
Bblock \
EGAL(gNumerateurFraction__(fraction,acces),numerateur_de_la_fraction); \
EGAL(gDenominateurFraction(fraction,acces),denominateur_de_la_fraction); \
Eblock
#define gTRANSFERT_FRACTION(fraction1,fraction2,acces1,acces2) \
Bblock \
gINITIALISATION_FRACTION(fraction1 \
,gNumerateurFraction__(fraction2,acces2) \
,gDenominateurFraction(fraction2,acces2) \
,acces1 \
); \
Eblock
#define INITIALISATION_FRACTION(fraction,numerateur_de_la_fraction,denominateur_de_la_fraction) \
Bblock \
gINITIALISATION_FRACTION(fraction,numerateur_de_la_fraction,denominateur_de_la_fraction,ASD1); \
Eblock
#define TRANSFERT_FRACTION(fraction1,fraction2) \
Bblock \
gTRANSFERT_FRACTION(fraction1,fraction2,ASD1,ASD1); \
Eblock
/*************************************************************************************************************************************/
/* */
/* A R I T H M E T I Q U E D E S F R A C T I O N S : */
/* */
/*************************************************************************************************************************************/
#define gSIMPLIFICATION_D_UNE_FRACTION(fractionR,fractionA,acces) \
Bblock \
DEFV(Int,INIT(PGCD_du_Numerateur_et_du_Denominateur,PGCD(gNumerateurFraction__(fractionA,acces) \
,gDenominateurFraction(fractionA,acces) \
) \
) \
); \
\
Test(IZNE(PGCD_du_Numerateur_et_du_Denominateur)) \
Bblock \
gINITIALISATION_FRACTION(fractionR \
,DIVI(gNumerateurFraction__(fractionA,acces) \
,PGCD_du_Numerateur_et_du_Denominateur \
) \
,DIVI(gDenominateurFraction(fractionA,acces) \
,PGCD_du_Numerateur_et_du_Denominateur \
) \
,acces \
); \
Eblock \
ATes \
Bblock \
gTRANSFERT_FRACTION(fractionR,fractionA,acces,acces); \
Eblock \
ETes \
Eblock \
/* Simplification "generale" de deux fractions (introduite le 20081116101239). */
#define SIMPLIFICATION_D_UNE_FRACTION(fractionR,fractionA) \
Bblock \
gSIMPLIFICATION_D_UNE_FRACTION(fractionR,fractionA,ASD1); \
Eblock
#define gSOMME_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,acces) \
Bblock \
gINITIALISATION_FRACTION(fractionR \
,ADD2(MUL2(gNumerateurFraction__(fractionA1,acces) \
,gDenominateurFraction(fractionA2,acces) \
) \
,MUL2(gNumerateurFraction__(fractionA2,acces) \
,gDenominateurFraction(fractionA1,acces) \
) \
) \
,MUL2(gDenominateurFraction(fractionA1,acces) \
,gDenominateurFraction(fractionA2,acces) \
) \
,acces \
); \
Eblock \
/* Somme "generale" de deux fractions. */ \
/* */ \
/* Je note le 20081110090835 qu'evidemment au lieu d'utiliser comme denominateur commun */ \
/* le produit D1xD2 des denominateur des deux fractions, il serait hautement preferable */ \
/* d'utiliser leur PPCM (soit PPCM(D1,D2))... */
#define gPRODUIT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,acces) \
Bblock \
gINITIALISATION_FRACTION(fractionR \
,MUL2(gNumerateurFraction__(fractionA1,acces) \
,gNumerateurFraction__(fractionA2,acces) \
) \
,MUL2(gDenominateurFraction(fractionA1,acces) \
,gDenominateurFraction(fractionA2,acces) \
) \
,acces \
); \
Eblock \
/* Produit "general" de deux fractions. */
#define gQUOTIENT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,acces) \
Bblock \
gINITIALISATION_FRACTION(fractionR \
,MUL2(gNumerateurFraction__(fractionA1,acces) \
,gDenominateurFraction(fractionA2,acces) \
) \
,MUL2(gDenominateurFraction(fractionA1,acces) \
,gNumerateurFraction__(fractionA2,acces) \
) \
,acces \
); \
Eblock \
/* Quotient "general" de deux fractions. */
#define gMOYENNE_MEDIANE_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,acces) \
Bblock \
gINITIALISATION_FRACTION(fractionR \
,ADD2(gNumerateurFraction__(fractionA1,acces) \
,gNumerateurFraction__(fractionA2,acces) \
) \
,ADD2(gDenominateurFraction(fractionA1,acces) \
,gDenominateurFraction(fractionA2,acces) \
) \
,acces \
); \
Eblock \
/* Moyenne mediane "generale" de deux fractions. Celle-ci est utilisee en particulier */
/* pour lister exhaustivement les rationnels ('v $xtc/EnumerationDesRationnels.01$vv$c')... */
#define SOMME_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2) \
Bblock \
gSOMME_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,ASD1); \
Eblock
#define PRODUIT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2) \
Bblock \
gPRODUIT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,ASD1); \
Eblock
#define QUOTIENT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2) \
Bblock \
gQUOTIENT_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,ASD1); \
Eblock
#define MOYENNE_MEDIANE_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2) \
Bblock \
gMOYENNE_MEDIANE_DE_DEUX_FRACTIONS(fractionR,fractionA1,fractionA2,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* A P P R O X I M A T I O N R A T I O N N E L L E D ' U N N O M B R E R E E L ( F L O T T A N T ) : */
/* */
/*************************************************************************************************************************************/
#define EDITION_EVENTUELLE_DE_LA_FRACTION_CONTINUE(valeur,mise_en_page,editer) \
Bblock \
Test(IL_FAUT(editer)) \
Bblock \
CAL2(Prin2("%s%.^^^",mise_en_page,valeur)); \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock
#define EDITION_EVENTUELLE_DES_RATIONNELS(numerateur,denominateur,mise_en_page,editer) \
Bblock \
Test(IL_FAUT(editer)) \
Bblock \
CAL2(Prin3("%d/%d%s",numerateur,denominateur,mise_en_page)); \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock
#define SIGNE_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel) \
COND(IZGT(nombre_reel),K_PLUS,K_MOINS)
#define EDITION_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel,editer,simplifier) \
Bblock \
Test(IL_FAUT(editer)) \
Bblock \
CAL2(Prin0("\n\n")); \
/* Cela est plus prudent et permet de resoudre le probleme de l'edition de l'approximation */ \
/* sur la meme ligne que sur la derniere ligne de la liste courante des rationnels lorsque */ \
/* celle-ci est incomplete c'est-a-dire dans le cas ou 'IFEQ(Numerateur__,UN)' est FAUX... */ \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
\
Test(IL_FAUT(simplifier)) \
Bblock \
CAL2(Prin3("%c%d/%d\n" \
,SIGNE_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel) \
,INTE(NumerateurFraction__(Fraction__)) \
,INTE(DenominateurFraction(Fraction__)) \
) \
); \
Eblock \
ATes \
Bblock \
CAL2(Prin6("%+.^^^ ~ %c%d/%d (=%c%.^^^)\n" \
,nombre_reel \
,SIGNE_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel) \
,INTE(NumerateurFraction__(Fraction__)) \
,INTE(DenominateurFraction(Fraction__)) \
,SIGNE_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel) \
,ApproximationCourante \
) \
); \
Eblock \
ETes \
Eblock
#define APPROXIMATION_RATIONNELLE_D_UN_REEL(nombre_reel,fractions_continues,epsilon,derniere_famille_rationnels,editer,simplifier) \
Bblock \
Test(EST_ENTIER(nombre_reel)) \
Bblock \
Test(IL_FAUT(simplifier)) \
Bblock \
CAL2(Prin1("%+d\n",INTE(nombre_reel))); \
Eblock \
ATes \
Bblock \
CAL2(Prin2("%+.^^^ = %+d\n",nombre_reel,INTE(nombre_reel))); \
Eblock \
ETes \
Eblock \
ATes \
Bblock \
DEFV(Float,INIT(valeur_absolue_du_nombre_reel,ABSO(nombre_reel))); \
\
Test(IL_FAUT(fractions_continues)) \
Bblock \
DEFV(Logical,INIT(iterer_la_decomposition_en_fraction_continue,VRAI)); \
\
DEFV(Int,INIT(compteur_des_parentheses,ZERO)); \
\
DEFV(fractionF,Fraction_0); \
DEFV(fractionF,Fraction_1); \
DEFV(fractionF,Fraction__); \
\
DEFV(Float,INIT(pseudo_reste,FLOT__UNDEF)); \
DEFV(Float,INIT(pseudo_partie_entiere,FLOT__UNDEF)); \
DEFV(Float,INIT(ApproximationCourante,FLOT__UNDEF)); \
\
INITIALISATION_FRACTION(Fraction_0,FU,FZERO); \
INITIALISATION_FRACTION(Fraction_1,AINT(valeur_absolue_du_nombre_reel),FU); \
INITIALISATION_FRACTION(Fraction__,FLOT__UNDEF,FLOT__UNDEF); \
\
EGAL(pseudo_reste,SOUS(valeur_absolue_du_nombre_reel,NumerateurFraction__(Fraction_1))); \
\
EDITION_EVENTUELLE_DE_LA_FRACTION_CONTINUE(NumerateurFraction__(Fraction_1),C_VIDE,editer); \
\
Tant(IL_FAUT(iterer_la_decomposition_en_fraction_continue)) \
Bblock \
EGAL(pseudo_partie_entiere,AINT(INVE(pseudo_reste))); \
EGAL(pseudo_reste,SOUS(INVE(pseudo_reste),pseudo_partie_entiere)); \
\
EDITION_EVENTUELLE_DE_LA_FRACTION_CONTINUE(pseudo_partie_entiere,"+1/(",editer); \
INCR(compteur_des_parentheses,I); \
\
EGAL(NumerateurFraction__(Fraction__) \
,AXPB(pseudo_partie_entiere,NumerateurFraction__(Fraction_1),NumerateurFraction__(Fraction_0)) \
); \
EGAL(DenominateurFraction(Fraction__) \
,AXPB(pseudo_partie_entiere,DenominateurFraction(Fraction_1),DenominateurFraction(Fraction_0)) \
); \
\
EGAL(ApproximationCourante,DIVI(NumerateurFraction__(Fraction__),DenominateurFraction(Fraction__))); \
\
Test(IFLT(SOUA(valeur_absolue_du_nombre_reel,ApproximationCourante),epsilon)) \
Bblock \
EGAL(iterer_la_decomposition_en_fraction_continue,FAUX); \
Eblock \
ATes \
Bblock \
EGAL(NumerateurFraction__(Fraction_0),NumerateurFraction__(Fraction_1)); \
EGAL(DenominateurFraction(Fraction_0),DenominateurFraction(Fraction_1)); \
\
EGAL(NumerateurFraction__(Fraction_1),NumerateurFraction__(Fraction__)); \
EGAL(DenominateurFraction(Fraction_1),DenominateurFraction(Fraction__)); \
Eblock \
ETes \
Eblock \
ETan \
\
Test(IL_FAUT(editer)) \
Bblock \
Repe(compteur_des_parentheses) \
Bblock \
CAL2(Prin0(")")); \
Eblock \
ERep \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
\
EDITION_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel,editer,simplifier); \
Eblock \
ATes \
Bblock \
DEFV(Int,INIT(SommeNumerateurDenominateur,UNDEF)); \
DEFV(Int,INIT(SommeNumerateurDenominateurMaximale,derniere_famille_rationnels)); \
DEFV(Logical,INIT(une_approximation_e_ete_trouvee,FAUX)); \
\
DoIn(SommeNumerateurDenominateur,ADD2(UN,UN),SommeNumerateurDenominateurMaximale,I) \
/* Ainsi, le premier rationnel teste sera 1/1... */ \
Bblock \
DEFV(fractionI,Fraction__); \
INITIALISATION_FRACTION(Fraction__ \
,PRED(SommeNumerateurDenominateur) \
,SOUS(SommeNumerateurDenominateur,NumerateurFraction__(Fraction__)) \
); \
/* En appelant 'S' la valeur courante de 'SommeNumerateurDenominateur-1', la famille */ \
/* courante de rationnels (definie par le fait que la somme numerateur plus denominateur */ \
/* est constante) a tester est : */ \
/* */ \
/* {S/1,(S-1)/2,(S-2)/3,...,2/(S-1),1/S} */ \
/* */ \
/* sachant qu'ainsi on tombera ainsi sur le plus petit denominateur possible, puisque */ \
/* l'on commence a 1... */ \
\
Repe(PRED(SommeNumerateurDenominateur)) \
Bblock \
DEFV(Float,INIT(ApproximationCourante \
,DIVI(FLOT(NumerateurFraction__(Fraction__)) \
,FLOT(DenominateurFraction(Fraction__)) \
) \
) \
); \
\
Test(EST_FAUX(une_approximation_e_ete_trouvee)) \
Bblock \
EDITION_EVENTUELLE_DES_RATIONNELS(NumerateurFraction__(Fraction__) \
,DenominateurFraction(Fraction__) \
,COND(IFEQ(NumerateurFraction__(Fraction__),UN),"\n"," ") \
,editer \
); \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
\
Test(IFLT(SOUA(valeur_absolue_du_nombre_reel,ApproximationCourante),epsilon)) \
Bblock \
Test(EST_FAUX(une_approximation_e_ete_trouvee)) \
Bblock \
EDITION_DE_L_APPROXIMATION_RATIONNELLE_DU_NOMBRE_REEL(nombre_reel,editer,simplifier); \
\
EGAL(une_approximation_e_ete_trouvee,VRAI); \
EGAL(SommeNumerateurDenominateurMaximale,MOINS_L_INFINI); \
/* Cette valeur negative pour 'SommeNumerateurDenominateurMaximale' est destinee en fait */ \
/* a interrompre la boucle 'DoIn(...)' ci-dessus et donc a optimiser le processus... */ \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
\
DECR(NumerateurFraction__(Fraction__),I); \
INCR(DenominateurFraction(Fraction__),I); \
Eblock \
ERep \
Eblock \
EDoI \
\
Test(EST_FAUX(une_approximation_e_ete_trouvee)) \
Bblock \
PRINT_ERREUR("aucune approximation n'a ete trouvee"); \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock \
ETes \
Eblock \
ETes \
Eblock \
/* Procedure introduite le 20180831093038... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 1 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(pointI1D
/* Definition d'un point de l'espace a 1 dimensions : */
,DEFV(Int,x)
/* Abscisse entiere, */
,NOM_VIDE
);
Typedef(pointI_1D,STRU(pointI1D))
TypedefS(A___pointI_1D,pointI_1D)
TypedefS(E___pointI_1D,pointI_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 1 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(pointF1D
/* Definition d'un point de l'espace a 1 dimensions : */
,DEFV(Float,x)
/* Abscisse flottante, */
,NOM_VIDE
);
Typedef(pointF_1D,STRU(pointF1D))
TypedefS(A___pointF_1D,pointF_1D)
TypedefS(E___pointF_1D,pointF_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 1 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(pointD1D
/* Definition d'un point de l'espace a 1 dimensions : */
,DEFV(Double,x)
/* Abscisse flottante, */
,NOM_VIDE
);
Typedef(pointD_1D,STRU(pointD1D))
TypedefS(A___pointD_1D,pointD_1D)
TypedefS(E___pointD_1D,pointD_1D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N P O I N T 1 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_POINT_1D(point,coordonnee1,acces) \
Bblock \
EGAL(acces(point,x),coordonnee1); \
Eblock
#define gTRANSFERT_POINT_1D(point1,point2,acces1,acces2) \
Bblock \
gINITIALISATION_POINT_1D(point1 \
,acces2(point2,x) \
,acces1 \
); \
Eblock
#define INITIALISATION_POINT_1D(point,coordonnee1) \
Bblock \
gINITIALISATION_POINT_1D(point,coordonnee1,ASD1); \
Eblock
#define TRANSFERT_POINT_1D(point1,point2) \
Bblock \
gTRANSFERT_POINT_1D(point1,point2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 2 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(pointI2D
/* Definition d'un point de l'espace a 2 dimensions : */
,DEFV(Int,x)
/* Abscisse entiere, */
,DEFV(Int,y)
/* Ordonnee entiere. */
,NOM_VIDE
);
Typedef(pointI_2D,STRU(pointI2D))
TypedefS(A___pointI_2D,pointI_2D)
TypedefS(E___pointI_2D,pointI_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 2 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(pointF2D
/* Definition d'un point de l'espace a 2 dimensions : */
,DEFV(Float,x)
/* Abscisse flottante, */
,DEFV(Float,y)
/* Ordonnee flottante. */
,NOM_VIDE
);
Typedef(pointF_2D,STRU(pointF2D))
TypedefS(A___pointF_2D,pointF_2D)
TypedefS(E___pointF_2D,pointF_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 2 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(pointD2D
/* Definition d'un point de l'espace a 2 dimensions : */
,DEFV(Double,x)
/* Abscisse flottante, */
,DEFV(Double,y)
/* Ordonnee flottante. */
,NOM_VIDE
);
Typedef(pointD_2D,STRU(pointD2D))
TypedefS(A___pointD_2D,pointD_2D)
TypedefS(E___pointD_2D,pointD_2D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N P O I N T 2 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_POINT_2D(point,coordonnee1,coordonnee2,acces) \
Bblock \
EGAL(acces(point,x),coordonnee1); \
EGAL(acces(point,y),coordonnee2); \
Eblock
#define gTRANSFERT_POINT_2D(point1,point2,acces1,acces2) \
Bblock \
gINITIALISATION_POINT_2D(point1 \
,acces2(point2,x) \
,acces2(point2,y) \
,acces1 \
); \
Eblock
#define INITIALISATION_POINT_2D(point,coordonnee1,coordonnee2) \
Bblock \
gINITIALISATION_POINT_2D(point,coordonnee1,coordonnee2,ASD1); \
Eblock
#define TRANSFERT_POINT_2D(point1,point2) \
Bblock \
gTRANSFERT_POINT_2D(point1,point2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 3 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(pointI3D
/* Definition d'un point de l'espace a 3 dimensions : */
,DEFV(Int,x)
/* Abscisse entiere, */
,DEFV(Int,y)
/* Ordonnee entiere, */
,DEFV(Int,z)
/* Cote entiere. */
,NOM_VIDE
);
Typedef(pointI_3D,STRU(pointI3D))
TypedefS(A___pointI_3D,pointI_3D)
TypedefS(E___pointI_3D,pointI_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 3 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(pointF3D
/* Definition d'un point de l'espace a 3 dimensions : */
,DEFV(Float,x)
/* Abscisse flottante, */
,DEFV(Float,y)
/* Ordonnee flottante, */
,DEFV(Float,z)
/* Cote flottante. */
,NOM_VIDE
);
Typedef(pointF_3D,STRU(pointF3D))
TypedefS(A___pointF_3D,pointF_3D)
TypedefS(E___pointF_3D,pointF_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P O I N T 3 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(pointD3D
/* Definition d'un point de l'espace a 3 dimensions : */
,DEFV(Double,x)
/* Abscisse flottante, */
,DEFV(Double,y)
/* Ordonnee flottante, */
,DEFV(Double,z)
/* Cote flottante. */
,NOM_VIDE
);
Typedef(pointD_3D,STRU(pointD3D))
TypedefS(A___pointD_3D,pointD_3D)
TypedefS(E___pointD_3D,pointD_3D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N P O I N T 3 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_POINT_3D(point,coordonnee1,coordonnee2,coordonnee3,acces) \
Bblock \
EGAL(acces(point,x),coordonnee1); \
EGAL(acces(point,y),coordonnee2); \
EGAL(acces(point,z),coordonnee3); \
Eblock
#define gTRANSFERT_POINT_3D(point1,point2,acces1,acces2) \
Bblock \
gINITIALISATION_POINT_3D(point1 \
,acces2(point2,x) \
,acces2(point2,y) \
,acces2(point2,z) \
,acces1 \
); \
Eblock
#define INITIALISATION_POINT_3D(point,coordonnee1,coordonnee2,coordonnee3) \
Bblock \
gINITIALISATION_POINT_3D(point,coordonnee1,coordonnee2,coordonnee3,ASD1); \
Eblock
#define TRANSFERT_POINT_3D(point1,point2) \
Bblock \
gTRANSFERT_POINT_3D(point1,point2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 1 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(deltaI1D
/* Definition d'un deplacement de l'espace a 1 dimensions : */
,DEFV(Int,dx)
/* Abscisse entiere, */
,NOM_VIDE
);
Typedef(deltaI_1D,STRU(deltaI1D))
TypedefS(A___deltaI_1D,deltaI_1D)
TypedefS(E___deltaI_1D,deltaI_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 1 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(deltaF1D
/* Definition d'un deplacement de l'espace a 1 dimensions : */
,DEFV(Float,dx)
/* Abscisse flottante, */
,NOM_VIDE
);
Typedef(deltaF_1D,STRU(deltaF1D))
TypedefS(A___deltaF_1D,deltaF_1D)
TypedefS(E___deltaF_1D,deltaF_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 1 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(deltaD1D
/* Definition d'un deplacement de l'espace a 1 dimensions : */
,DEFV(Double,dx)
/* Abscisse flottante, */
,NOM_VIDE
);
Typedef(deltaD_1D,STRU(deltaD1D))
TypedefS(A___deltaD_1D,deltaD_1D)
TypedefS(E___deltaD_1D,deltaD_1D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N A C C R O I S S E M E N T 1 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_ACCROISSEMENT_1D(delta,delta1,acces) \
Bblock \
EGAL(acces(delta,dx),delta1); \
Eblock
#define gTRANSFERT_ACCROISSEMENT_1D(delta1,delta2,acces1,acces2) \
Bblock \
gINITIALISATION_ACCROISSEMENT_1D(delta1 \
,acces2(delta2,dx) \
,acces1 \
); \
Eblock
#define INITIALISATION_ACCROISSEMENT_1D(delta,delta1) \
Bblock \
gINITIALISATION_ACCROISSEMENT_1D(delta,delta1,ASD1); \
Eblock
#define TRANSFERT_ACCROISSEMENT_1D(delta1,delta2) \
Bblock \
gTRANSFERT_ACCROISSEMENT_1D(delta1,delta2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 2 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(deltaI2D
/* Definition d'un deplacement de l'espace a 2 dimensions : */
,DEFV(Int,dx)
/* Abscisse entiere, */
,DEFV(Int,dy)
/* Ordonnee entiere. */
,NOM_VIDE
);
Typedef(deltaI_2D,STRU(deltaI2D))
TypedefS(A___deltaI_2D,deltaI_2D)
TypedefS(E___deltaI_2D,deltaI_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 2 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(deltaF2D
/* Definition d'un deplacement de l'espace a 2 dimensions : */
,DEFV(Float,dx)
/* Abscisse flottante, */
,DEFV(Float,dy)
/* Ordonnee flottante. */
,NOM_VIDE
);
Typedef(deltaF_2D,STRU(deltaF2D))
TypedefS(A___deltaF_2D,deltaF_2D)
TypedefS(E___deltaF_2D,deltaF_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 2 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(deltaD2D
/* Definition d'un deplacement de l'espace a 2 dimensions : */
,DEFV(Double,dx)
/* Abscisse flottante, */
,DEFV(Double,dy)
/* Ordonnee flottante. */
,NOM_VIDE
);
Typedef(deltaD_2D,STRU(deltaD2D))
TypedefS(A___deltaD_2D,deltaD_2D)
TypedefS(E___deltaD_2D,deltaD_2D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N A C C R O I S S E M E N T 2 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_ACCROISSEMENT_2D(delta,delta1,delta2,acces) \
Bblock \
EGAL(acces(delta,dx),delta1); \
EGAL(acces(delta,dy),delta2); \
Eblock
#define gTRANSFERT_ACCROISSEMENT_2D(delta1,delta2,acces1,acces2) \
Bblock \
gINITIALISATION_ACCROISSEMENT_2D(delta1 \
,acces2(delta2,dx) \
,acces2(delta2,dy) \
,acces1 \
); \
Eblock
#define INITIALISATION_ACCROISSEMENT_2D(delta,delta1,delta2) \
Bblock \
gINITIALISATION_ACCROISSEMENT_2D(delta,delta1,delta2,ASD1); \
Eblock
#define TRANSFERT_ACCROISSEMENT_2D(delta1,delta2) \
Bblock \
gTRANSFERT_ACCROISSEMENT_2D(delta1,delta2,ASD1,ASD1); \
Eblock
#define ECHELLE_DE_NORMALISATION \
FU \
/* Echelle de normalisation fondamentale (introduite le 20021007141157). */
#define gNORMALISATION_ACCROISSEMENT_2D(delta,echelle_de_normalisation) \
Bblock \
DEFV(Float,INIT(module_de_l_accroissement_delta,longF2D(delta))); \
/* Pour alleger le code genere... */ \
\
Test(IZNE(module_de_l_accroissement_delta)) \
Bblock \
INITIALISATION_ACCROISSEMENT_2D(delta \
,SCAL(ASD1(delta,dx),module_de_l_accroissement_delta,echelle_de_normalisation) \
,SCAL(ASD1(delta,dy),module_de_l_accroissement_delta,echelle_de_normalisation) \
) \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock
#define NORMALISATION_ACCROISSEMENT_2D(delta) \
Bblock \
gNORMALISATION_ACCROISSEMENT_2D(delta,ECHELLE_DE_NORMALISATION); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 3 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(deltaI3D
/* Definition d'un deplacement de l'espace a 3 dimensions : */
,DEFV(Int,dx)
/* Abscisse entiere, */
,DEFV(Int,dy)
/* Ordonnee entiere, */
,DEFV(Int,dz)
/* Cote entiere. */
,NOM_VIDE
);
Typedef(deltaI_3D,STRU(deltaI3D))
TypedefS(A___deltaI_3D,deltaI_3D)
TypedefS(E___deltaI_3D,deltaI_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 3 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(deltaF3D
/* Definition d'un deplacement de l'espace a 3 dimensions : */
,DEFV(Float,dx)
/* Abscisse flottante, */
,DEFV(Float,dy)
/* Ordonnee flottante, */
,DEFV(Float,dz)
/* Cote flottante. */
,NOM_VIDE
);
Typedef(deltaF_3D,STRU(deltaF3D))
TypedefS(A___deltaF_3D,deltaF_3D)
TypedefS(E___deltaF_3D,deltaF_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N A C C R O I S S E M E N T 3 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(deltaD3D
/* Definition d'un deplacement de l'espace a 3 dimensions : */
,DEFV(Double,dx)
/* Abscisse flottante, */
,DEFV(Double,dy)
/* Ordonnee flottante, */
,DEFV(Double,dz)
/* Cote flottante. */
,NOM_VIDE
);
Typedef(deltaD_3D,STRU(deltaD3D))
TypedefS(A___deltaD_3D,deltaD_3D)
TypedefS(E___deltaD_3D,deltaD_3D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N A C C R O I S S E M E N T 3 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_ACCROISSEMENT_3D(delta,delta1,delta2,delta3,acces) \
Bblock \
EGAL(acces(delta,dx),delta1); \
EGAL(acces(delta,dy),delta2); \
EGAL(acces(delta,dz),delta3); \
Eblock
#define gTRANSFERT_ACCROISSEMENT_3D(delta1,delta2,acces1,acces2) \
Bblock \
gINITIALISATION_ACCROISSEMENT_3D(delta1 \
,acces2(delta2,dx) \
,acces2(delta2,dy) \
,acces2(delta2,dz) \
,acces1 \
); \
Eblock
#define INITIALISATION_ACCROISSEMENT_3D(delta,delta1,delta2,delta3) \
Bblock \
gINITIALISATION_ACCROISSEMENT_3D(delta,delta1,delta2,delta3,ASD1); \
Eblock
#define TRANSFERT_ACCROISSEMENT_3D(delta1,delta2) \
Bblock \
gTRANSFERT_ACCROISSEMENT_3D(delta1,delta2,ASD1,ASD1); \
Eblock
#define gNORMALISATION_ACCROISSEMENT_3D(delta,echelle_de_normalisation) \
Bblock \
DEFV(Float,INIT(module_de_l_accroissement_delta,longF3D(delta))); \
/* Pour alleger le code genere... */ \
\
Test(IZNE(module_de_l_accroissement_delta)) \
Bblock \
INITIALISATION_ACCROISSEMENT_3D(delta \
,SCAL(ASD1(delta,dx),module_de_l_accroissement_delta,echelle_de_normalisation) \
,SCAL(ASD1(delta,dy),module_de_l_accroissement_delta,echelle_de_normalisation) \
,SCAL(ASD1(delta,dz),module_de_l_accroissement_delta,echelle_de_normalisation) \
) \
Eblock \
ATes \
Bblock \
Eblock \
ETes \
Eblock
#define NORMALISATION_ACCROISSEMENT_3D(delta) \
Bblock \
gNORMALISATION_ACCROISSEMENT_3D(delta,ECHELLE_DE_NORMALISATION); \
Eblock
/*************************************************************************************************************************************/
/* */
/* P R O D U I T V E C T O R I E L D E D E U X A C C R O I S S E M E N T S 3 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_VECTORIEL_ACCROISSEMENT_3D(deltaR,deltaA1,deltaA2) \
Bblock \
INITIALISATION_ACCROISSEMENT_3D(deltaR \
,PvectX(ASD1(deltaA1,dx) \
,ASD1(deltaA1,dy) \
,ASD1(deltaA1,dz) \
\
,ASD1(deltaA2,dx) \
,ASD1(deltaA2,dy) \
,ASD1(deltaA2,dz) \
) \
\
,PvectY(ASD1(deltaA1,dx) \
,ASD1(deltaA1,dy) \
,ASD1(deltaA1,dz) \
\
,ASD1(deltaA2,dx) \
,ASD1(deltaA2,dy) \
,ASD1(deltaA2,dz) \
) \
\
,PvectZ(ASD1(deltaA1,dx) \
,ASD1(deltaA1,dy) \
,ASD1(deltaA1,dz) \
\
,ASD1(deltaA2,dx) \
,ASD1(deltaA2,dy) \
,ASD1(deltaA2,dz) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 1 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorI1D
/* Definition d'un vecteur de l'espace a 1 dimensions : */
,DEFV(pointI_1D,origine)
/* Origine, */
,DEFV(pointI_1D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorI_1D,STRU(vectorI1D))
TypedefS(A___vectorI_1D,vectorI_1D)
TypedefS(E___vectorI_1D,vectorI_1D)
#define NOMBRE_DE_POINTS_DE_vectorI_1D \
DIVI(SIZE(vectorI_1D),SIZE(pointI_1D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 1 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorF1D
/* Definition d'un vecteur de l'espace a 1 dimensions : */
,DEFV(pointF_1D,origine)
/* Origine, */
,DEFV(pointF_1D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorF_1D,STRU(vectorF1D))
TypedefS(A___vectorF_1D,vectorF_1D)
TypedefS(E___vectorF_1D,vectorF_1D)
#define NOMBRE_DE_POINTS_DE_vectorF_1D \
DIVI(SIZE(vectorF_1D),SIZE(pointF_1D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 1 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorD1D
/* Definition d'un vecteur de l'espace a 1 dimensions : */
,DEFV(pointD_1D,origine)
/* Origine, */
,DEFV(pointD_1D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorD_1D,STRU(vectorD1D))
TypedefS(A___vectorD_1D,vectorD_1D)
TypedefS(E___vectorD_1D,vectorD_1D)
#define NOMBRE_DE_POINTS_DE_vectorD_1D \
DIVI(SIZE(vectorD_1D),SIZE(pointD_1D))
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R 1 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_VECTEUR_1D(vecteur,x1,x2,acces) \
Bblock \
EGAL(acces(vecteur,origine,x),x1); \
EGAL(acces(vecteur,extremite,x),x2); \
Eblock
#define gTRANSFERT_VECTEUR_1D(vecteur1,vecteur2,acces1,acces2) \
Bblock \
gINITIALISATION_VECTEUR_1D(vecteur1 \
,acces2(vecteur2,origine,x) \
,acces2(vecteur2,extremite,x) \
,acces1 \
); \
Eblock
#define INITIALISATION_VECTEUR_1D(vecteur,x1,x2) \
Bblock \
gINITIALISATION_VECTEUR_1D(vecteur,x1,x2,ASD2); \
Eblock
#define TRANSFERT_VECTEUR_1D(vecteur1,vecteur2) \
Bblock \
gTRANSFERT_VECTEUR_1D(vecteur1,vecteur2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 2 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorI2D
/* Definition d'un vecteur de l'espace a 2 dimensions : */
,DEFV(pointI_2D,origine)
/* Origine, */
,DEFV(pointI_2D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorI_2D,STRU(vectorI2D))
TypedefS(A___vectorI_2D,vectorI_2D)
TypedefS(E___vectorI_2D,vectorI_2D)
#define NOMBRE_DE_POINTS_DE_vectorI_2D \
DIVI(SIZE(vectorI_2D),SIZE(pointI_2D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 2 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorF2D
/* Definition d'un vecteur de l'espace a 2 dimensions : */
,DEFV(pointF_2D,origine)
/* Origine, */
,DEFV(pointF_2D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorF_2D,STRU(vectorF2D))
TypedefS(A___vectorF_2D,vectorF_2D)
TypedefS(E___vectorF_2D,vectorF_2D)
#define NOMBRE_DE_POINTS_DE_vectorF_2D \
DIVI(SIZE(vectorF_2D),SIZE(pointF_2D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 2 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorD2D
/* Definition d'un vecteur de l'espace a 2 dimensions : */
,DEFV(pointD_2D,origine)
/* Origine, */
,DEFV(pointD_2D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorD_2D,STRU(vectorD2D))
TypedefS(A___vectorD_2D,vectorD_2D)
TypedefS(E___vectorD_2D,vectorD_2D)
#define NOMBRE_DE_POINTS_DE_vectorD_2D \
DIVI(SIZE(vectorD_2D),SIZE(pointD_2D))
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R 2 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_VECTEUR_2D(vecteur,x1,y1,x2,y2,acces) \
Bblock \
EGAL(acces(vecteur,origine,x),x1); \
EGAL(acces(vecteur,origine,y),y1); \
EGAL(acces(vecteur,extremite,x),x2); \
EGAL(acces(vecteur,extremite,y),y2); \
Eblock
#define gTRANSFERT_VECTEUR_2D(vecteur1,vecteur2,acces1,acces2) \
Bblock \
gINITIALISATION_VECTEUR_2D(vecteur1 \
,acces2(vecteur2,origine,x) \
,acces2(vecteur2,origine,y) \
,acces2(vecteur2,extremite,x) \
,acces2(vecteur2,extremite,y) \
,acces1 \
); \
Eblock
#define INITIALISATION_VECTEUR_2D(vecteur,x1,y1,x2,y2) \
Bblock \
gINITIALISATION_VECTEUR_2D(vecteur,x1,y1,x2,y2,ASD2); \
Eblock
#define TRANSFERT_VECTEUR_2D(vecteur1,vecteur2) \
Bblock \
gTRANSFERT_VECTEUR_2D(vecteur1,vecteur2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 3 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorI3D
/* Definition d'un vecteur de l'espace a 3 dimensions : */
,DEFV(pointI_3D,origine)
/* Origine, */
,DEFV(pointI_3D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorI_3D,STRU(vectorI3D))
TypedefS(A___vectorI_3D,vectorI_3D)
TypedefS(E___vectorI_3D,vectorI_3D)
#define NOMBRE_DE_POINTS_DE_vectorI_3D \
DIVI(SIZE(vectorI_3D),SIZE(pointI_3D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 3 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorF3D
/* Definition d'un vecteur de l'espace a 3 dimensions : */
,DEFV(pointF_3D,origine)
/* Origine, */
,DEFV(pointF_3D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorF_3D,STRU(vectorF3D))
TypedefS(A___vectorF_3D,vectorF_3D)
TypedefS(E___vectorF_3D,vectorF_3D)
#define NOMBRE_DE_POINTS_DE_vectorF_3D \
DIVI(SIZE(vectorF_3D),SIZE(pointF_3D))
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R 3 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(vectorD3D
/* Definition d'un vecteur de l'espace a 3 dimensions : */
,DEFV(pointD_3D,origine)
/* Origine, */
,DEFV(pointD_3D,extremite)
/* Extremite. */
,NOM_VIDE
);
Typedef(vectorD_3D,STRU(vectorD3D))
TypedefS(A___vectorD_3D,vectorD_3D)
TypedefS(E___vectorD_3D,vectorD_3D)
#define NOMBRE_DE_POINTS_DE_vectorD_3D \
DIVI(SIZE(vectorD_3D),SIZE(pointD_3D))
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R 3 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_VECTEUR_3D(vecteur,x1,y1,z1,x2,y2,z2,acces) \
Bblock \
EGAL(acces(vecteur,origine,x),x1); \
EGAL(acces(vecteur,origine,y),y1); \
EGAL(acces(vecteur,origine,z),z1); \
EGAL(acces(vecteur,extremite,x),x2); \
EGAL(acces(vecteur,extremite,y),y2); \
EGAL(acces(vecteur,extremite,z),z2); \
Eblock
#define gTRANSFERT_VECTEUR_3D(vecteur1,vecteur2,acces1,acces2) \
Bblock \
gINITIALISATION_VECTEUR_3D(vecteur1 \
,acces2(vecteur2,origine,x) \
,acces2(vecteur2,origine,y) \
,acces2(vecteur2,origine,z) \
,acces2(vecteur2,extremite,x) \
,acces2(vecteur2,extremite,y) \
,acces2(vecteur2,extremite,z) \
,acces1 \
); \
Eblock
#define INITIALISATION_VECTEUR_3D(vecteur,x1,y1,z1,x2,y2,z2) \
Bblock \
gINITIALISATION_VECTEUR_3D(vecteur,x1,y1,z1,x2,y2,z2,ASD2); \
Eblock
#define TRANSFERT_VECTEUR_3D(vecteur1,vecteur2) \
Bblock \
gTRANSFERT_VECTEUR_3D(vecteur1,vecteur2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 1 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(coeffI1D
/* Definition d'un coeffcient de l'espace a 1 dimensions : */
,DEFV(Int,cx)
/* Premiere coefficient entiere, */
,NOM_VIDE
);
Typedef(coeffI_1D,STRU(coeffI1D))
TypedefS(A___coeffI_1D,coeffI_1D)
TypedefS(E___coeffI_1D,coeffI_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 1 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(coeffF1D
/* Definition d'un coeffcient de l'espace a 1 dimensions : */
,DEFV(Float,cx)
/* Premiere coefficient flottante, */
,NOM_VIDE
);
Typedef(coeffF_1D,STRU(coeffF1D))
TypedefS(A___coeffF_1D,coeffF_1D)
TypedefS(E___coeffF_1D,coeffF_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 1 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(coeffD1D
/* Definition d'un coeffcient de l'espace a 1 dimensions : */
,DEFV(Double,cx)
/* Premiere coefficient flottante, */
,NOM_VIDE
);
Typedef(coeffD_1D,STRU(coeffD1D))
TypedefS(A___coeffD_1D,coeffD_1D)
TypedefS(E___coeffD_1D,coeffD_1D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 1 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_COEFFICIENT_1D(coefficient,coefficient1,acces) \
Bblock \
EGAL(acces(coefficient,cx),coefficient1); \
Eblock
#define gTRANSFERT_COEFFICIENT_1D(coefficient1,coefficient2,acces1,acces2) \
Bblock \
gINITIALISATION_COEFFICIENT_1D(coefficient1 \
,acces2(coefficient2,cx) \
,acces1 \
); \
Eblock
#define INITIALISATION_COEFFICIENT_1D(coefficient,coefficient1) \
Bblock \
gINITIALISATION_COEFFICIENT_1D(coefficient,coefficient1,ASD1); \
Eblock
#define TRANSFERT_COEFFICIENT_1D(coefficient1,coefficient2) \
Bblock \
gTRANSFERT_COEFFICIENT_1D(coefficient1,coefficient2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 2 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(coeffI2D
/* Definition d'un coeffcient de l'espace a 2 dimensions : */
,DEFV(Int,cx)
/* Premiere coefficient entiere, */
,DEFV(Int,cy)
/* Deuxieme coefficient entiere. */
,NOM_VIDE
);
Typedef(coeffI_2D,STRU(coeffI2D))
TypedefS(A___coeffI_2D,coeffI_2D)
TypedefS(E___coeffI_2D,coeffI_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 2 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(coeffF2D
/* Definition d'un coeffcient de l'espace a 2 dimensions : */
,DEFV(Float,cx)
/* Premiere coefficient flottante, */
,DEFV(Float,cy)
/* Deuxieme coefficient flottante. */
,NOM_VIDE
);
Typedef(coeffF_2D,STRU(coeffF2D))
TypedefS(A___coeffF_2D,coeffF_2D)
TypedefS(E___coeffF_2D,coeffF_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 2 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(coeffD2D
/* Definition d'un coeffcient de l'espace a 2 dimensions : */
,DEFV(Double,cx)
/* Premiere coefficient flottante, */
,DEFV(Double,cy)
/* Deuxieme coefficient flottante. */
,NOM_VIDE
);
Typedef(coeffD_2D,STRU(coeffD2D))
TypedefS(A___coeffD_2D,coeffD_2D)
TypedefS(E___coeffD_2D,coeffD_2D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 2 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_COEFFICIENT_2D(coefficient,coefficient1,coefficient2,acces) \
Bblock \
EGAL(acces(coefficient,cx),coefficient1); \
EGAL(acces(coefficient,cy),coefficient2); \
Eblock
#define gTRANSFERT_COEFFICIENT_2D(coefficient1,coefficient2,acces1,acces2) \
Bblock \
gINITIALISATION_COEFFICIENT_2D(coefficient1 \
,acces2(coefficient2,cx) \
,acces2(coefficient2,cy) \
,acces1 \
); \
Eblock
#define INITIALISATION_COEFFICIENT_2D(coefficient,coefficient1,coefficient2) \
Bblock \
gINITIALISATION_COEFFICIENT_2D(coefficient,coefficient1,coefficient2,ASD1); \
Eblock
#define TRANSFERT_COEFFICIENT_2D(coefficient1,coefficient2) \
Bblock \
gTRANSFERT_COEFFICIENT_2D(coefficient1,coefficient2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 3 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(coeffI3D
/* Definition d'un coeffcient de l'espace a 3 dimensions : */
,DEFV(Int,cx)
/* Premiere coefficient entiere, */
,DEFV(Int,cy)
/* Deuxieme coefficient entiere, */
,DEFV(Int,cz)
/* Troisieme coefficient entiere. */
,NOM_VIDE
);
Typedef(coeffI_3D,STRU(coeffI3D))
TypedefS(A___coeffI_3D,coeffI_3D)
TypedefS(E___coeffI_3D,coeffI_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 3 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(coeffF3D
/* Definition d'un coeffcient de l'espace a 3 dimensions : */
,DEFV(Float,cx)
/* Premiere coefficient flottante, */
,DEFV(Float,cy)
/* Deuxieme coefficient flottante, */
,DEFV(Float,cz)
/* Troisieme coefficient flottante. */
,NOM_VIDE
);
Typedef(coeffF_3D,STRU(coeffF3D))
TypedefS(A___coeffF_3D,coeffF_3D)
TypedefS(E___coeffF_3D,coeffF_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 3 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(coeffD3D
/* Definition d'un coeffcient de l'espace a 3 dimensions : */
,DEFV(Double,cx)
/* Premiere coefficient flottante, */
,DEFV(Double,cy)
/* Deuxieme coefficient flottante, */
,DEFV(Double,cz)
/* Troisieme coefficient flottante. */
,NOM_VIDE
);
Typedef(coeffD_3D,STRU(coeffD3D))
TypedefS(A___coeffD_3D,coeffD_3D)
TypedefS(E___coeffD_3D,coeffD_3D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N V E C T E U R D E C O E F F I C I E N T S 3 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_COEFFICIENT_3D(coefficient,coefficient1,coefficient2,coefficient3,acces) \
Bblock \
EGAL(acces(coefficient,cx),coefficient1); \
EGAL(acces(coefficient,cy),coefficient2); \
EGAL(acces(coefficient,cz),coefficient3); \
Eblock
#define gTRANSFERT_COEFFICIENT_3D(coefficient1,coefficient2,acces1,acces2) \
Bblock \
gINITIALISATION_COEFFICIENT_3D(coefficient1 \
,acces2(coefficient2,cx) \
,acces2(coefficient2,cy) \
,acces2(coefficient2,cz) \
,acces1 \
); \
Eblock
#define INITIALISATION_COEFFICIENT_3D(coefficient,coefficient1,coefficient2,coefficient3) \
Bblock \
gINITIALISATION_COEFFICIENT_3D(coefficient,coefficient1,coefficient2,coefficient3,ASD1); \
Eblock
#define TRANSFERT_COEFFICIENT_3D(coefficient1,coefficient2) \
Bblock \
gTRANSFERT_COEFFICIENT_3D(coefficient1,coefficient2,ASD1,ASD1); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 1 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(matrixI1D
/* Definition d'une matrice de l'espace a 1 dimensions : */
,DEFV(coeffI_1D,cx)
/* Premiere ligne, */
,NOM_VIDE
);
Typedef(matrixI_1D,STRU(matrixI1D))
TypedefS(A___matrixI_1D,matrixI_1D)
TypedefS(E___matrixI_1D,matrixI_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 1 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(matrixF1D
/* Definition d'une matrice de l'espace a 1 dimensions : */
,DEFV(coeffF_1D,cx)
/* Premiere ligne, */
,NOM_VIDE
);
Typedef(matrixF_1D,STRU(matrixF1D))
TypedefS(A___matrixF_1D,matrixF_1D)
TypedefS(E___matrixF_1D,matrixF_1D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 1 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct01(matrixD1D
/* Definition d'une matrice de l'espace a 1 dimensions : */
,DEFV(coeffD_1D,cx)
/* Premiere ligne, */
,NOM_VIDE
);
Typedef(matrixD_1D,STRU(matrixD1D))
TypedefS(A___matrixD_1D,matrixD_1D)
TypedefS(E___matrixD_1D,matrixD_1D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N E M A T R I C E 1 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_MATRICE_1D(matrice,coeff11,acces) \
Bblock \
EGAL(acces(matrice,cx,cx),coeff11); \
Eblock
#define gTRANSFERT_MATRICE_1D(matrice1,matrice2,acces1,acces2) \
Bblock \
gINITIALISATION_MATRICE_1D(matrice1 \
,acces2(matrice2,cx,cx) \
,acces1 \
); \
Eblock
#define INITIALISATION_MATRICE_1D(matrice,coeff11) \
Bblock \
gINITIALISATION_MATRICE_1D(matrice,coeff11,ASD2); \
Eblock
#define TRANSFERT_MATRICE_1D(matrice1,matrice2) \
Bblock \
gTRANSFERT_MATRICE_1D(matrice1,matrice2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - V E C T E U R 1 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_ACCROISSEMENT_1D(vecteurR,matrice,vecteurA) \
Bblock \
INITIALISATION_ACCROISSEMENT_1D(vecteurR \
,LIZ1(ASD2(matrice,cx,cx) \
,ASD1(vecteurA,dx) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - M A T R I C E 1 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_MATRICE_1D(matriceR,matriceA1,matriceA2) \
/* Procedure introduite le 20051107142716... */ \
Bblock \
INITIALISATION_MATRICE_1D(matriceR \
,LIZ1(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cx) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 2 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(matrixI2D
/* Definition d'une matrice de l'espace a 2 dimensions : */
,DEFV(coeffI_2D,cx)
/* Premiere ligne, */
,DEFV(coeffI_2D,cy)
/* Deuxieme ligne. */
,NOM_VIDE
);
Typedef(matrixI_2D,STRU(matrixI2D))
TypedefS(A___matrixI_2D,matrixI_2D)
TypedefS(E___matrixI_2D,matrixI_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 2 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(matrixF2D
/* Definition d'une matrice de l'espace a 2 dimensions : */
,DEFV(coeffF_2D,cx)
/* Premiere ligne, */
,DEFV(coeffF_2D,cy)
/* Deuxieme ligne. */
,NOM_VIDE
);
Typedef(matrixF_2D,STRU(matrixF2D))
TypedefS(A___matrixF_2D,matrixF_2D)
TypedefS(E___matrixF_2D,matrixF_2D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 2 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct02(matrixD2D
/* Definition d'une matrice de l'espace a 2 dimensions : */
,DEFV(coeffD_2D,cx)
/* Premiere ligne, */
,DEFV(coeffD_2D,cy)
/* Deuxieme ligne. */
,NOM_VIDE
);
Typedef(matrixD_2D,STRU(matrixD2D))
TypedefS(A___matrixD_2D,matrixD_2D)
TypedefS(E___matrixD_2D,matrixD_2D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N E M A T R I C E 2 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_MATRICE_2D(matrice,coeff11,coeff12,coeff21,coeff22,acces) \
Bblock \
EGAL(acces(matrice,cx,cx),coeff11); \
EGAL(acces(matrice,cx,cy),coeff12); \
EGAL(acces(matrice,cy,cx),coeff21); \
EGAL(acces(matrice,cy,cy),coeff22); \
Eblock
#define gTRANSFERT_MATRICE_2D(matrice1,matrice2,acces1,acces2) \
Bblock \
gINITIALISATION_MATRICE_2D(matrice1 \
,acces2(matrice2,cx,cx) \
,acces2(matrice2,cx,cy) \
,acces2(matrice2,cy,cx) \
,acces2(matrice2,cy,cy) \
,acces1 \
); \
Eblock
#define INITIALISATION_MATRICE_2D(matrice,coeff11,coeff12,coeff21,coeff22) \
Bblock \
gINITIALISATION_MATRICE_2D(matrice,coeff11,coeff12,coeff21,coeff22,ASD2); \
Eblock
#define TRANSFERT_MATRICE_2D(matrice1,matrice2) \
Bblock \
gTRANSFERT_MATRICE_2D(matrice1,matrice2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - V E C T E U R 2 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_ACCROISSEMENT_2D(vecteurR,matrice,vecteurA) \
Bblock \
INITIALISATION_ACCROISSEMENT_2D(vecteurR \
,LIZ2(ASD2(matrice,cx,cx) \
,ASD1(vecteurA,dx) \
,ASD2(matrice,cx,cy) \
,ASD1(vecteurA,dy) \
) \
,LIZ2(ASD2(matrice,cy,cx) \
,ASD1(vecteurA,dx) \
,ASD2(matrice,cy,cy) \
,ASD1(vecteurA,dy) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - M A T R I C E 2 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_MATRICE_2D(matriceR,matriceA1,matriceA2) \
/* Procedure introduite le 20051107142716... */ \
Bblock \
INITIALISATION_MATRICE_2D(matriceR \
,LIZ2(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cx) \
,ASD2(matriceA1,cx,cy) \
,ASD2(matriceA2,cy,cx) \
) \
,LIZ2(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cy) \
,ASD2(matriceA1,cx,cy) \
,ASD2(matriceA2,cy,cy) \
) \
,LIZ2(ASD2(matriceA1,cy,cx) \
,ASD2(matriceA2,cx,cx) \
,ASD2(matriceA1,cy,cy) \
,ASD2(matriceA2,cy,cx) \
) \
,LIZ2(ASD2(matriceA1,cy,cx) \
,ASD2(matriceA2,cx,cy) \
,ASD2(matriceA1,cy,cy) \
,ASD2(matriceA2,cy,cy) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 3 D " E N T I E R " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(matrixI3D
/* Definition d'une matrice de l'espace a 3 dimensions : */
,DEFV(coeffI_3D,cx)
/* Premiere ligne, */
,DEFV(coeffI_3D,cy)
/* Deuxieme ligne, */
,DEFV(coeffI_3D,cz)
/* Troisieme ligne. */
,NOM_VIDE
);
Typedef(matrixI_3D,STRU(matrixI3D))
TypedefS(A___matrixI_3D,matrixI_3D)
TypedefS(E___matrixI_3D,matrixI_3D)
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 3 D " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(matrixF3D
/* Definition d'une matrice de l'espace a 3 dimensions : */
,DEFV(coeffF_3D,cx)
/* Premiere ligne, */
,DEFV(coeffF_3D,cy)
/* Deuxieme ligne, */
,DEFV(coeffF_3D,cz)
/* Troisieme ligne. */
,NOM_VIDE
);
Typedef(matrixF_3D,STRU(matrixF3D))
TypedefS(A___matrixF_3D,matrixF_3D)
TypedefS(E___matrixF_3D,matrixF_3D)
/* Ainsi, une matrice de l'espace a 3 dimensions sera indicee : */
/* */
/* (cx,cx) (cx,cy) (cx,cz) */
/* */
/* (cy,cx) (cy,cy) (cy,cz) */
/* */
/* (cz,cx) (cz,cy) (cz,cz) */
/* */
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N E M A T R I C E 3 D " D O U B L E " : */
/* */
/*************************************************************************************************************************************/
Dstruct03(matrixD3D
/* Definition d'une matrice de l'espace a 3 dimensions : */
,DEFV(coeffD_3D,cx)
/* Premiere ligne, */
,DEFV(coeffD_3D,cy)
/* Deuxieme ligne, */
,DEFV(coeffD_3D,cz)
/* Troisieme ligne. */
,NOM_VIDE
);
Typedef(matrixD_3D,STRU(matrixD3D))
TypedefS(A___matrixD_3D,matrixD_3D)
TypedefS(E___matrixD_3D,matrixD_3D)
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N E M A T R I C E 3 D : */
/* */
/*************************************************************************************************************************************/
#define gINITIALISATION_MATRICE_3D(matrice,coeff11,coeff12,coeff13,coeff21,coeff22,coeff23,coeff31,coeff32,coeff33,acces) \
Bblock \
EGAL(acces(matrice,cx,cx),coeff11); \
EGAL(acces(matrice,cx,cy),coeff12); \
EGAL(acces(matrice,cx,cz),coeff13); \
EGAL(acces(matrice,cy,cx),coeff21); \
EGAL(acces(matrice,cy,cy),coeff22); \
EGAL(acces(matrice,cy,cz),coeff23); \
EGAL(acces(matrice,cz,cx),coeff31); \
EGAL(acces(matrice,cz,cy),coeff32); \
EGAL(acces(matrice,cz,cz),coeff33); \
Eblock
#define gTRANSFERT_MATRICE_3D(matrice1,matrice2,acces1,acces2) \
Bblock \
gINITIALISATION_MATRICE_3D(matrice1 \
,acces2(matrice2,cx,cx) \
,acces2(matrice2,cx,cy) \
,acces2(matrice2,cx,cz) \
,acces2(matrice2,cy,cx) \
,acces2(matrice2,cy,cy) \
,acces2(matrice2,cy,cz) \
,acces2(matrice2,cz,cx) \
,acces2(matrice2,cz,cy) \
,acces2(matrice2,cz,cz) \
,acces1 \
); \
Eblock
#define INITIALISATION_MATRICE_3D(matrice,coeff11,coeff12,coeff13,coeff21,coeff22,coeff23,coeff31,coeff32,coeff33) \
Bblock \
gINITIALISATION_MATRICE_3D(matrice,coeff11,coeff12,coeff13,coeff21,coeff22,coeff23,coeff31,coeff32,coeff33,ASD2); \
Eblock
#define TRANSFERT_MATRICE_3D(matrice1,matrice2) \
Bblock \
gTRANSFERT_MATRICE_3D(matrice1,matrice2,ASD2,ASD2); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - V E C T E U R 3 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_ACCROISSEMENT_3D(deltaR,matrice,vecteurA) \
/* Le 20221213093951, l'argument 'deltaA' a ete rebaptise 'vecteurA' afin d'avoir des */ \
/* notations homogenes en 1D, 2D et 3D... */ \
Bblock \
INITIALISATION_ACCROISSEMENT_3D(deltaR \
,LIZ3(ASD2(matrice,cx,cx) \
,ASD1(vecteurA,dx) \
,ASD2(matrice,cx,cy) \
,ASD1(vecteurA,dy) \
,ASD2(matrice,cx,cz) \
,ASD1(vecteurA,dz) \
) \
,LIZ3(ASD2(matrice,cy,cx) \
,ASD1(vecteurA,dx) \
,ASD2(matrice,cy,cy) \
,ASD1(vecteurA,dy) \
,ASD2(matrice,cy,cz) \
,ASD1(vecteurA,dz) \
) \
,LIZ3(ASD2(matrice,cz,cx) \
,ASD1(vecteurA,dx) \
,ASD2(matrice,cz,cy) \
,ASD1(vecteurA,dy) \
,ASD2(matrice,cz,cz) \
,ASD1(vecteurA,dz) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M A T R I C E - M A T R I C E 3 D : */
/* */
/*************************************************************************************************************************************/
#define PRODUIT_MATRICE_MATRICE_3D(matriceR,matriceA1,matriceA2) \
/* Procedure introduite le 20051107142716 afin de valider les operations effectuees par */ \
/* 'v $xrv/Car_Euler.01$K PRODUIT_MATRICE_MATRICE_3D'... */ \
Bblock \
INITIALISATION_MATRICE_3D(matriceR \
,LIZ3(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cx) \
,ASD2(matriceA1,cx,cy) \
,ASD2(matriceA2,cy,cx) \
,ASD2(matriceA1,cx,cz) \
,ASD2(matriceA2,cz,cx) \
) \
,LIZ3(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cy) \
,ASD2(matriceA1,cx,cy) \
,ASD2(matriceA2,cy,cy) \
,ASD2(matriceA1,cx,cz) \
,ASD2(matriceA2,cz,cy) \
) \
,LIZ3(ASD2(matriceA1,cx,cx) \
,ASD2(matriceA2,cx,cz) \
,ASD2(matriceA1,cx,cy) \
,ASD2(matriceA2,cy,cz) \
,ASD2(matriceA1,cx,cz) \
,ASD2(matriceA2,cz,cz) \
) \
,LIZ3(ASD2(matriceA1,cy,cx) \
,ASD2(matriceA2,cx,cx) \
,ASD2(matriceA1,cy,cy) \
,ASD2(matriceA2,cy,cx) \
,ASD2(matriceA1,cy,cz) \
,ASD2(matriceA2,cz,cx) \
) \
,LIZ3(ASD2(matriceA1,cy,cx) \
,ASD2(matriceA2,cx,cy) \
,ASD2(matriceA1,cy,cy) \
,ASD2(matriceA2,cy,cy) \
,ASD2(matriceA1,cy,cz) \
,ASD2(matriceA2,cz,cy) \
) \
,LIZ3(ASD2(matriceA1,cy,cx) \
,ASD2(matriceA2,cx,cz) \
,ASD2(matriceA1,cy,cy) \
,ASD2(matriceA2,cy,cz) \
,ASD2(matriceA1,cy,cz) \
,ASD2(matriceA2,cz,cz) \
) \
,LIZ3(ASD2(matriceA1,cz,cx) \
,ASD2(matriceA2,cx,cx) \
,ASD2(matriceA1,cz,cy) \
,ASD2(matriceA2,cy,cx) \
,ASD2(matriceA1,cz,cz) \
,ASD2(matriceA2,cz,cx) \
) \
,LIZ3(ASD2(matriceA1,cz,cx) \
,ASD2(matriceA2,cx,cy) \
,ASD2(matriceA1,cz,cy) \
,ASD2(matriceA2,cy,cy) \
,ASD2(matriceA1,cz,cz) \
,ASD2(matriceA2,cz,cy) \
) \
,LIZ3(ASD2(matriceA1,cz,cx) \
,ASD2(matriceA2,cx,cz) \
,ASD2(matriceA1,cz,cy) \
,ASD2(matriceA2,cy,cz) \
,ASD2(matriceA1,cz,cz) \
,ASD2(matriceA2,cz,cz) \
) \
); \
Eblock
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N I T I A L I S A T I O N D ' U N E M A T R I C E 3 D D E R O T A T I O N */
/* U T I L I S A N T L E S T R O I S A N G L E S D ' E U L E R : */
/* */
/* */
/* ATTENTION : */
/* */
/* Le 20161220165744, j'ai note que l'on */
/* pouvait trouver des notations differentes */
/* de celles qui sont utilisees ci-apres et */
/* qui sont obtenues par permutation des noms */
/* 'psi' et 'phi' ('v https://en.wikipedia.org/wiki/Euler_angles' */
/* par exemple...). */
/* */
/* */
/* Definition : */
/* */
/* Etant donnes les trois angles */
/* d'Euler (theta,psi,phi), la matrice */
/* de rotation est definie par : */
/* */
/* */
/* | | */
/* | +cos(psi)cos(phi) - cos(tet)sin(psi)sin(phi) -cos(psi)sin(phi) - cos(tet)sin(psi)cos(phi) +sin(tet)sin(psi) | */
/* | | */
/* | +sin(psi)cos(phi) + cos(tet)cos(psi)sin(phi) -sin(psi)sin(phi) + cos(tet)cos(psi)cos(phi) -sin(tet)cos(psi) | */
/* | | */
/* | +sin(tet)sin(phi) +sin(tet)cos(phi) +cos(tet) | */
/* | | */
/* */
/* */
/* 'theta' etant note 'tet' ci-dessus */
/* afin d'ameliorer la tabulation, en */
/* rappelent la notation matricielle : */
/* */
/* | | */
/* | (cx,cx) (cx,cy) (cx,cz) | */
/* | | */
/* | (cy,cx) (cy,cy) (cy,cz) | */
/* | | */
/* | (cz,cx) (cz,cy) (cz,cz) | */
/* | | */
/* */
/* */
/* ATTENTION : */
/* */
/* Le 20030630122915, j'ai note que */
/* l'inverse de la rotation {+theta,+psi,+phi} */
/* N'ETAIT PAS {-theta,-psi,-phi} ainsi que cela */
/* est decrit dans 'v $xrv/Rot_Euler.01$K inverse' ! */
/* */
/* Cela se comprend finalement aisement en */
/* regardant le schema ci-apres. En effet, les */
/* angles 'psi' et 'phi' sont mesures dans des */
/* plans differents en ce qui concerne leurs */
/* versions "directe" et "inverse" : */
/* */
/* phi(direct) : plan {OA,OX2}, soit {OX2,OY2}, */
/* psi(direct) : plan {OX1,OA}, soit {OX1,OY1}, */
/* */
/* et : */
/* */
/* phi(inverse) : plan {OA,OX2}, soit {OX1,OY1}. */
/* psi(inverse) : plan {OX2,OA}, soit {OX2,OY2}, */
/* */
/* Ainsi donc, 'psi' direct et 'psi' inverse */
/* ne sont pas mesures dans le meme plan ; il */
/* n'y a donc pas de relations simples entre-eux ; */
/* Il en est de meme de 'phi'. Quid de 'theta' ? */
/* */
/* */
/*************************************************************************************************************************************/
#define MATRICE_DE_ROTATION_D_EULER_11(Euler1,Euler2,Euler3) \
NEUT(SOUS(MUL2(COSX(Euler2),COSX(Euler3)),MUL3(COSX(Euler1),SINX(Euler2),SINX(Euler3))))
#define MATRICE_DE_ROTATION_D_EULER_12(Euler1,Euler2,Euler3) \
NEGA(ADD2(MUL2(COSX(Euler2),SINX(Euler3)),MUL3(COSX(Euler1),SINX(Euler2),COSX(Euler3))))
#define MATRICE_DE_ROTATION_D_EULER_13(Euler1,Euler2,Euler3) \
NEUT(MUL2(SINX(Euler1),SINX(Euler2)))
#define MATRICE_DE_ROTATION_D_EULER_21(Euler1,Euler2,Euler3) \
NEUT(ADD2(MUL2(SINX(Euler2),COSX(Euler3)),MUL3(COSX(Euler1),COSX(Euler2),SINX(Euler3))))
#define MATRICE_DE_ROTATION_D_EULER_22(Euler1,Euler2,Euler3) \
NEGA(SOUS(MUL2(SINX(Euler2),SINX(Euler3)),MUL3(COSX(Euler1),COSX(Euler2),COSX(Euler3))))
#define MATRICE_DE_ROTATION_D_EULER_23(Euler1,Euler2,Euler3) \
NEGA(MUL2(SINX(Euler1),COSX(Euler2)))
#define MATRICE_DE_ROTATION_D_EULER_31(Euler1,Euler2,Euler3) \
NEUT(MUL2(SINX(Euler1),SINX(Euler3)))
#define MATRICE_DE_ROTATION_D_EULER_32(Euler1,Euler2,Euler3) \
NEUT(MUL2(SINX(Euler1),COSX(Euler3)))
#define MATRICE_DE_ROTATION_D_EULER_33(Euler1,Euler2,Euler3) \
NEUT(COSX(Euler1))
/* Definitions introduites le 20161226083036 pour 'v $xrs/helicoide.11$I _EULER_3'. */
#define INITIALISATION_D_UNE_MATRICE_DE_ROTATION_D_EULER(matrice_de_rotation,Euler1,Euler2,Euler3) \
Bblock \
/* Une rotation dans l'espace peut etre definie par les 3 angles d'Euler (voir page 324 */ \
/* de l'aide memoire de mathematiques) : */ \
/* */ \
/* Euler1 : angle de nutation 'theta,beta' entre les axes OZ1 et OZ2, autour de OA, */ \
/* */ \
/* Euler2 : angle de rotation pure 'psi,alpha' entre l'axe OX1 et OA. autour de OZ1. */ \
/* */ \
/* Euler3 : angle de precession 'phi,gamma' entre l'axe OX2 et OA, autour de OZ2, */ \
/* */ \
/* avec : */ \
/* */ \
/* OA est la droite d'intersection entre les plans {OX1,OY1} et {OX2,OY2} */ \
/* */ \
/* Euler1 (theta,beta) E [0,p] */ \
/* Euler2 (psi,alpha) E [0,2p] */ \
/* Euler3 (phi,gamma) E [0,2p] */ \
/* */ \
/* (ou 'p' designe 'pi'). */ \
/* */ \
/* */ \
/* Z1 * */ \
/* * */ \
/* * */ \
/* * */ \
/* * */ \
/* * */ \
/* * */ \
/* * Y2 */ \
/* * . */ \
/* * */ \
/* Z2 + * . */ \
/* +--theta--* */ \
/* + * . */ \
/* + * */ \
/* + * . . X2 */ \
/* + * . */ \
/* + * . . */ \
/* + * . */ \
/* + * . . */ \
/* + * . */ \
/* +* . | */ \
/* O* * *|* * * * * * * * * * * * * * * * * * Y1 */ \
/* * p */ \
/* * \ h */ \
/* * i */ \
/* * \ | */ \
/* * | */ \
/* *-------psi-------\ */ \
/* * */ \
/* * \ */ \
/* * */ \
/* * \ */ \
/* * */ \
/* X1 * \ A */ \
/* */ \
/* */ \
/* OA = {OX1,OY1} .INTER. {OX2,OY2} */ \
/* (ou "ligne des noeuds") */ \
/* */ \
/* */ \
/* Je note le 20161201123529 que cette matrice de rotation peut etre utilisee pour faire */ \
/* des rotation planes d'angle 'psi' autour de 'OZ1'. Il suffit pour ce faire de forcer : */ \
/* */ \
/* phi = 0 */ \
/* theta = 0 */ \
/* */ \
/* La matrice de rotation devient alors : */ \
/* */ \
/* */ \
/* | | */ \
/* | +cos(psi) -sin(psi) 0 | */ \
/* | | */ \
/* | +sin(psi) +cos(psi) 0 | */ \
/* | | */ \
/* | 0 0 1 | */ \
/* | | */ \
/* */ \
/* */ \
/* La rotation inverse s'obtient en changeant 'psi' en '-psi' evidemment... */ \
INITIALISATION_MATRICE_3D(matrice_de_rotation \
\
,MATRICE_DE_ROTATION_D_EULER_11(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_12(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_13(Euler1,Euler2,Euler3) \
\
,MATRICE_DE_ROTATION_D_EULER_21(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_22(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_23(Euler1,Euler2,Euler3) \
\
,MATRICE_DE_ROTATION_D_EULER_31(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_32(Euler1,Euler2,Euler3) \
,MATRICE_DE_ROTATION_D_EULER_33(Euler1,Euler2,Euler3) \
\
); \
/* Calcul de la matrice de rotation utilisant les angles d'Euler. */ \
/* */ \
/* ATTENTION : dans l'aide memoire on trouve : */ \
/* */ \
/* NEUT(ADD2(MUL2(sEuler2,cEuler3),MUL3(cEuler1,cEuler2,cEuler3))) */ \
/* ^ */ \
/* | */ \
/* */ \
/* pour l'element '(2,1)', mais, par raison de symetrie, je pense qu'il s'agit */ \
/* plutot de : */ \
/* */ \
/* NEUT(ADD2(MUL2(sEuler2,cEuler3),MUL3(cEuler1,cEuler2,sEuler3))) */ \
/* ^ */ \
/* | */ \
/* ou : */ \
/* */ \
/* cEuler1 = COSX(Euler1))); */ \
/* sEuler1 = SINX(Euler1))); */ \
/* cEuler2 = COSX(Euler2))); */ \
/* sEuler2 = SINX(Euler2))); */ \
/* cEuler3 = COSX(Euler3))); */ \
/* sEuler3 = SINX(Euler3))); */ \
/* */ \
/* sont les lignes trigonometriques des 3 angles d'Euler, ou 'c' designe le cosinus */ \
/* et 's' le sinus. */ \
Eblock \
/* Initialisation d'une matrice de rotation d'Euler... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D ' U N P L A N ( A . X + B . Y + C . Z + D = 0 ) : */
/* */
/*************************************************************************************************************************************/
Dstruct04(plan3D
/* Definition d'un plan de l'espace a 3 dimensions : */
,DEFV(Float,pA)
/* Coefficient 'A' de 'X', */
,DEFV(Float,pB)
/* Coefficient 'B' de 'Y', */
,DEFV(Float,pC)
/* Coefficient 'C' de 'Z', */
,DEFV(Float,pD)
/* Coefficient 'D'. */
,NOM_VIDE
);
Typedef(plan_3D,STRU(plan3D))
TypedefS(A___plan_3D,plan_3D)
TypedefS(E___plan_3D,plan_3D)
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S P O L A I R E S : */
/* */
/*************************************************************************************************************************************/
/* ATTENTION : il est preferable d'utiliser '$PASSE_1' et non pas '$PASSE_D' pour les */
/* definitions qui suivent afin de simplifier les choses ; en effet, il faudrait alors */
/* aussi modifier les definitions de 'Xorigine', 'Yorigine', 'Zorigine', 'RdisF2D(...)', */
/* et peut-etre d'autres encore... */
/* Les definitions suivantes sont obtenues a partir des definitions de */
/* {Xcartesienne_2D,Ycartesienne_2D} : */
/* */
/* x = rho*cos(theta) */
/* y = rho*sin(theta) */
/* */
/* d'ou : */
/* ________ */
/* / 2 2 */
/* rho = \/ x + y */
/* */
/* y */
/* tg(theta) = --- */
/* x */
/* */
/* avec : */
/* */
/* theta E [0,2.PI] */
/* */
#define gCModule_2D(O1,O2,X1,X2) \
disF2D(O1,O2 \
,X1,X2 \
)
#define CModule_2D(X1,X2) \
gCModule_2D(FX1origine,FX2origine,X1,X2)
#define gModule__2D(O1,O2,X1,X2) \
RACX(gCModule_2D(O1,O2,X1,X2))
#define Module__2D(X1,X2) \
gModule__2D(FX1origine,FX2origine,X1,X2)
#define gAngle1_2D(arc_tangente,O1,O2,X1,X2) \
arc_tangente(SOUS(X2,O2),SOUS(X1,O1))
#define gaAngle1_2D(O1,O2,X1,X2) \
gAngle1_2D(ATAN,O1,O2,X1,X2)
#define Angle1_2D(X1,X2) \
gaAngle1_2D(FX1origine,FX2origine,X1,X2)
/* Nouvelles definitions introduites le 20110809183726 destinees a "symetriser" les */
/* notations comme cela fut fait le 'v $ximD/definit.1$DEF 20110808105129', mais dans */
/* le sens inverse, en notant les correspondances : */
/* */
/* Angle1 -0-> theta */
/* */
#define gCRho_2D(x0,y0,x,y) \
gCModule_2D(x0,y0,x,y)
#define CRho_2D(x,y) \
CModule_2D(x,y)
/* Carre du rayon vecteur 'rho' des coordonnees 'x' et 'y' (coordonnees dans [0,1[) qui */
/* fut introduit le 20061209094806 pour 'v $ximcd/operator$FON CRho_2D'. */
#define gRho_2D(x0,y0,x,y) \
gModule__2D(x0,y0,x,y)
#define Rho_2D(x,y) \
Module__2D(x,y)
/* Rayon vecteur 'rho' des coordonnees 'x' et 'y' (coordonnees dans [0,1[), */
#define gTheta_2D(arc_tangente,x0,y0,x,y) \
gAngle1_2D(arc_tangente,x0,y0,x,y)
#define gaTheta_2D(x0,y0,x,y) \
gaAngle1_2D(x0,y0,x,y)
#define Theta_2D(x,y) \
Angle1_2D(x,y)
/* Angle polaire 'theta' des coordonnees 'x' et 'y' (coordonnees dans [0,1[). */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S S P H E R I Q U E S : */
/* */
/*************************************************************************************************************************************/
/* ATTENTION : il est preferable d'utiliser '$PASSE_1' et non pas '$PASSE_D' pour les */
/* definitions qui suivent afin de simplifier les choses ; en effet, il faudrait alors */
/* aussi modifier les definitions de 'Xorigine', 'Yorigine', 'Zorigine', 'RdisF2D(...)', */
/* et peut-etre d'autres encore... */
/* ATTENTION : on notera bien que c'est la longitude 'phi' qui joue le role de l'angle */
/* 'theta' des coordonnees cartesiennes bidimensionnelles, ceci afin d'assurer des notations */
/* compatibles, par exemple, avec l'Aide-Memoire de Mathematiques, page 321 et 322... */
/* Les definitions suivantes sont obtenues a partir des definitions de */
/* {Xcartesienne_3D,Ycartesienne_3D,Zcartesienne_3D} : */
/* */
/* x = rho*cos(phi)*sin(theta) */
/* y = rho*sin(phi)*sin(theta) */
/* z = rho*cos(theta) */
/* */
/* d'ou : */
/* _____________ */
/* / 2 2 2 */
/* rho = \/ x + y + z */
/* */
/* y */
/* tg(phi) = --- */
/* x */
/* ________ */
/* / 2 2 */
/* \/ x + y */
/* tg(theta) = ------------- */
/* z */
/* */
/* avec : */
/* */
/* theta E [0,PI] */
/* phi E [0,2.PI] */
/* */
#define gModule__3D(O1,O2,O3,X1,X2,X3) \
RdisF3D(O1,O2,O3 \
,X1,X2,X3 \
)
#define Module__3D(X1,X2,X3) \
gModule__3D(FX1origine,FX2origine,FX3origine,X1,X2,X3)
#define gAngle1_3D(arc_tangente,O1,O2,O3,X1,X2,X3) \
arc_tangente(gModule__2D(O1,O2,X1,X2),SOUS(X3,O3))
#define gaAngle1_3D(O1,O2,O3,X1,X2,X3) \
gAngle1_3D(ATAN,O1,O2,O3,X1,X2,X3)
#define Angle1_3D(X1,X2,X3) \
gaAngle1_3D(FX1origine,FX2origine,FX3origine,X1,X2,X3)
#define gAngle2_3D(arc_tangente,O1,O2,O3,X1,X2,X3) \
gAngle1_2D(arc_tangente,O1,O2,X1,X2)
#define gaAngle2_3D(O1,O2,O3,X1,X2,X3) \
gAngle2_3D(ATAN,O1,O2,O3,X1,X2,X3)
#define Angle2_3D(X1,X2,X3) \
gaAngle2_3D(FX1origine,FX2origine,FX3origine,X1,X2,X3)
/* Nouvelles definitions introduites le 20110809183726 destinees a "symetriser" les */
/* notations comme cela fut fait le 'v $ximD/definit.1$DEF 20110808105129', mais dans */
/* le sens inverse, en notant les correspondances : */
/* */
/* Angle1 -0-> theta */
/* Angle2 -0-> phi */
/* */
#define gRho_3D(x0,y0,z0,x,y,z) \
gModule__3D(x0,y0,z0,x,y,z) \
/* Rayon vecteur 'rho' des coordonnees 'x', 'y' et 'z' (dans [0,1[), */
#define gPhi_3D(arc_tangente,x0,y0,z0,x,y,z) \
gAngle2_3D(arc_tangente,x0,y0,z0,x,y,z) \
/* Longitude 'phi' dans le plan (OX,OY) des coordonnees 'x', 'y' et 'z' (dans [0,1[) : */ \
/* */ \
/* y */ \
/* phi = ArcTg(---) */ \
/* x */ \
/* */ \
/* grace a {Xcartesienne_3D,Ycartesienne_3D,Zcartesienne_3D}. */
#define gTheta_3D(arc_tangente,x0,y0,z0,x,y,z) \
gAngle1_3D(arc_tangente,x0,y0,z0,x,y,z) \
/* Distance polaire 'theta' des coordonnees 'x', 'y' et 'z' (dans [0,1[). A titre d'exemple, */ \
/* l'axe 'OZ' est a theta=0, alors que toute droite du plan (OX,OY) et a theta=PI/2 : */ \
/* */ \
/* ________ */ \
/* / 2 2 */ \
/* \/ x + y */ \
/* theta = ArcTg(-------------) */ \
/* z */ \
/* */ \
/* grace a {Xcartesienne_3D,Ycartesienne_3D,Zcartesienne_3D}. */
#define Rho_3D(x,y,z) \
Module__3D(x,y,z) \
/* Rayon vecteur 'rho' des coordonnees 'x', 'y' et 'z' (dans [0,1[), */
#define Phi_3D(x,y,z) \
Angle2_3D(x,y,z)
/* Longitude 'phi' dans le plan (OX,OY) des coordonnees 'x', 'y' et 'z' (dans [0,1[), */
#define Theta_3D(x,y,z) \
Angle1_3D(x,y,z) \
/* Distance polaire 'theta' des coordonnees 'x', 'y' et 'z' (dans [0,1[). A titre d'exemple, */ \
/* l'axe 'OZ' est a theta=0, alors que toute droite du plan (OX,OY) est a theta=PI/2. */
/* ATTENTION : on notera bien que c'est la longitude 'phi' qui joue le role de l'angle */
/* 'theta' des coordonnees cartesiennes bidimensionnelles, ceci afin d'assurer des notations */
/* compatibles, par exemple, avec l'Aide-Memoire de Mathematiques, page 321 et 322... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S " H Y P E R - S P H E R I Q U E S " : */
/* */
/*************************************************************************************************************************************/
/* ATTENTION : aux permutations de 'theta' et de 'phi' par rapport aux coordonnees */
/* tridimensionnelles {Rho_3D,Phi_3D,Theta_3D}. */
/* Les definitions suivantes sont obtenues a partir des definitions de */
/* {Xcartesienne_4D,Ycartesienne_4D,Zcartesienne_4D,Tcartesienne_4D} : */
/* */
/* x = rho*cos(theta)*sin(phi)* sin(alpha) */
/* y = rho*sin(theta)*sin(phi)* sin(alpha) */
/* z = rho*cos(phi)* sin(alpha) */
/* t = rho*cos(alpha) */
/* */
/* ou encore (afin de mettre en evidence l'ordre {y,x,z,t} -different de {x,y,z,t}- qui */
/* apparait dans les trois 'tg(...)'s ci-apres) : */
/* */
/* y = rho*sin(theta)*sin(phi)*sin(alpha) */
/* x = rho*cos(theta)*sin(phi)*sin(alpha) */
/* z = rho* cos(phi)*sin(alpha) */
/* t = rho* cos(alpha) */
/* */
/* d'ou : */
/* __________________ */
/* / 2 2 2 2 */
/* rho = \/ x + y + z + t */
/* */
/* ___ */
/* / 2 */
/* y \/ y */
/* tg(theta) = --- ressemble a : -------- */
/* x x */
/* */
/* | */
/* ---- */
/* . | */
/* . \|/ */
/* . . */
/* */
/* ________ ________ */
/* / 2 2 / 2 2 */
/* \/ x + y \/ y + x */
/* tg(phi) = ------------- ou encore : ------------- */
/* z z */
/* . . */
/* . | . */
/* . ------ */
/* . . | */
/* . . \|/ */
/* . . . */
/* */
/* _____________ _____________ */
/* / 2 2 2 / 2 2 2 */
/* \/ x + y + z \/ y + x + z */
/* tg(alpha) = ------------------ ou encore : ------------------ */
/* t t */
/* */
#define gCModule_4D(O1,O2,O3,O4,X1,X2,X3,X4) \
disF4D(O1,O2,O3,O4 \
,X1,X2,X3,X4 \
)
#define CModule_4D(X1,X2,X3,X4) \
gCModule_4D(FX1origine,FX2origine,FX3origine,FX4origine,X1,X2,X3,X4)
#define gModule__4D(O1,O2,O3,O4,X1,X2,X3,X4) \
RACX(gCModule_4D(O1,O2,O3,O4,X1,X2,X3,X4))
#define Module__4D(X1,X2,X3,X4) \
gModule__4D(FX1origine,FX2origine,FX3origine,FX4origine,X1,X2,X3,X4)
#define gAngle1_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4) \
arc_tangente(SOUS(X2,O2),SOUS(X1,O1))
#define Angle1_4D(X1,X2,X3,X4) \
gAngle1_4D(ATAN,FX1origine,FX2origine,FX3origine,FX4origine,X1,X2,X3,X4)
#define gAngle2_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4) \
arc_tangente(gModule__2D(O1,O2,X1,X2),SOUS(X3,O3))
#define Angle2_4D(X1,X2,X3,X4) \
gAngle2_4D(ATAN,FX1origine,FX2origine,FX3origine,FX4origine,X1,X2,X3,X4)
#define gAngle3_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4) \
arc_tangente(gModule__3D(O1,O2,O3,X1,X2,X3),SOUS(X4,O4))
#define Angle3_4D(X1,X2,X3,X4) \
gAngle3_4D(ATAN,FX1origine,FX2origine,FX3origine,FX4origine,X1,X2,X3,X4)
/* Nouvelles definitions introduites le 20110809183726 destinees a "symetriser" les */
/* notations comme cela fut fait le 'v $ximD/definit.1$DEF 20110808105129', mais dans */
/* le sens inverse, en notant les correspondances : */
/* */
/* Angle1 -0-> theta */
/* Angle2 -0-> phi */
/* Angle3 -0-> alpha */
/* */
/* Soit les formules suivantes le 20110811114539 : */
/* */
/* ---------------------- */
/* / 2 2 2 2 */
/* Rho = \/ X1 + X2 + X3 + X4 */
/* */
/* X2 */
/* A1 = ArcTg(----) */
/* X1 */
/* */
/* ---------- */
/* / 2 2 */
/* \/ X1 + X2 */
/* A2 = ArcTg(---------------) */
/* X3 */
/* */
/* ---------------- */
/* / 2 2 2 */
/* \/ X1 + X2 + X3 */
/* A3 = ArcTg(---------------------) */
/* X4 */
/* */
#define gCRho_4D(x0,y0,z0,t0,x,y,z,t) \
gCModule_4D(x0,y0,z0,t0,x,y,z,t)
#define CRho_4D(x,y,z,t) \
CModule_4D(x,y,z,t)
/* Carre du rayon vecteur 'rho' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) qui */
/* fut introduit le 20061209094806 pour 'v $ximcd/operator$FON CRho_2D'. */
#define gRho_4D(x0,y0,z0,t0,x,y,z,t) \
gModule__4D(x0,y0,z0,t0,x,y,z,t) \
/* Rayon vecteur 'rho' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[), */
#define gTheta_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
gAngle1_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
/* Longitude 'phi' dans le plan (OX,OY) des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */ \
/* */ \
/* y */ \
/* theta = ArcTg(---) */ \
/* x */ \
/* */ \
/* grace a {Xcartesienne_4D,Ycartesienne_4D,Zcartesienne_4D,Tcartesienne_4D}. */
#define gPhi_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
gAngle2_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
/* Distance polaire 'theta' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */ \
/* */ \
/* ________ */ \
/* / 2 2 */ \
/* \/ x + y */ \
/* phi = ArcTg(-------------) */ \
/* z */ \
/* */ \
/* grace a {Xcartesienne_4D,Ycartesienne_4D,Zcartesienne_4D,Tcartesienne_4D}. */
#define gAlpha_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
gAngle3_4D(arc_tangente,x0,y0,z0,t0,x,y,z,t) \
/* Troisieme angle 'alpha' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */ \
/* */ \
/* _____________ */ \
/* / 2 2 2 */ \
/* \/ x + y + z */ \
/* alpha = ArcTg(------------------) */ \
/* t */ \
/* */ \
/* grace a {Xcartesienne_4D,Ycartesienne_4D,Zcartesienne_4D,Tcartesienne_4D}. */
#define Rho_4D(x,y,z,t) \
Module__4D(x,y,z,t) \
/* Rayon vecteur 'rho' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[), */
#define Theta_4D(x,y,z,t) \
Angle1_4D(x,y,z,t) \
/* Longitude 'phi' dans le plan (OX,OY) des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */
#define Phi_4D(x,y,z,t) \
Angle2_4D(x,y,z,t) \
/* Distance polaire 'theta' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */
#define Alpha_4D(x,y,z,t) \
Angle3_4D(x,y,z,t) \
/* Troisieme angle 'alpha' des coordonnees 'x', 'y', 'z' et 't' (dans [0,1[) : */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S " H Y P E R - H Y P E R - S P H E R I Q U E S " : */
/* */
/*************************************************************************************************************************************/
#define CModule_5D(X1,X2,X3,X4,X5) \
disF5D(FX1origine,FX2origine,FX3origine,FX4origine,FX5origine \
,X1,X2,X3,X4,X5 \
)
#define Module__5D(X1,X2,X3,X4,X5) \
RACX(CModule_5D(X1,X2,X3,X4,X5))
#define gAngle1_5D(arc_tangente,O1,O2,O3,O4,O5,X1,X2,X3,X4,X5) \
gAngle1_2D(arc_tangente,O1,O2,X1,X2)
#define Angle1_5D(X1,X2,X3,X4,X5) \
gAngle1_5D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine \
,X1,X2,X3,X4,X5 \
)
#define gAngle2_5D(arc_tangente,O1,O2,O3,O4,O5,X1,X2,X3,X4,X5) \
gAngle1_3D(arc_tangente,O1,O2,O3,X1,X2,X3)
#define Angle2_5D(X1,X2,X3,X4,X5) \
gAngle2_5D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine \
,X1,X2,X3,X4,X5 \
)
#define gAngle3_5D(arc_tangente,O1,O2,O3,O4,O5,X1,X2,X3,X4,X5) \
gAngle3_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4)
#define Angle3_5D(X1,X2,X3,X4,X5) \
gAngle3_5D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine \
,X1,X2,X3,X4,X5 \
)
#define gAngle4_5D(arc_tangente,O1,O2,O3,O4,O5,X1,X2,X3,X4,X5) \
arc_tangente(Module__4D(X1,X2,X3,X4),SOUS(X5,O5))
#define Angle4_5D(X1,X2,X3,X4,X5) \
gAngle4_5D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine \
,X1,X2,X3,X4,X5 \
)
/* Nouvelles definitions 5D introduites le 20110810140810... */
#define CModule_6D(X1,X2,X3,X4,X5,X6) \
disF6D(FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
#define Module__6D(X1,X2,X3,X4,X5,X6) \
RACX(CModule_6D(X1,X2,X3,X4,X5,X6))
#define gAngle1_6D(arc_tangente,O1,O2,O3,O4,O5,O6,X1,X2,X3,X4,X5,X6) \
gAngle1_2D(arc_tangente,O1,O2,X1,X2)
#define Angle1_6D(X1,X2,X3,X4,X5,X6) \
gAngle1_6D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
#define gAngle2_6D(arc_tangente,O1,O2,O3,O4,O5,O6,X1,X2,X3,X4,X5,X6) \
gAngle1_3D(arc_tangente,O1,O2,O3,X1,X2,X3)
#define Angle2_6D(X1,X2,X3,X4,X5,X6) \
gAngle2_6D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
#define gAngle3_6D(arc_tangente,O1,O2,O3,O4,O5,O6,X1,X2,X3,X4,X5,X6) \
gAngle3_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4)
#define Angle3_6D(X1,X2,X3,X4,X5,X6) \
gAngle3_6D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
#define gAngle4_6D(arc_tangente,O1,O2,O3,O4,O5,O6,X1,X2,X3,X4,X5,X6) \
gAngle1_5D(arc_tangente \
,O1,O2,O3,O4,O5 \
,X1,X2,X3,X4,X5 \
)
#define Angle4_6D(X1,X2,X3,X4,X5,X6) \
gAngle4_6D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
#define gAngle5_6D(arc_tangente,O1,O2,O3,O4,O5,O6,X1,X2,X3,X4,X5,X6) \
arc_tangente(Module__5D(X1,X2,X3,X4,X5),SOUS(X6,O6))
#define Angle5_6D(X1,X2,X3,X4,X5,X6) \
gAngle5_6D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine \
,X1,X2,X3,X4,X5,X6 \
)
/* Nouvelles definitions 6D introduites le 20110810140810... */
#define CModule_7D(X1,X2,X3,X4,X5,X6,X7) \
disF7D(FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define Module__7D(X1,X2,X3,X4,X5,X6,X7) \
RACX(CModule_7D(X1,X2,X3,X4,X5,X6,X7))
#define gAngle1_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
gAngle1_2D(arc_tangente,O1,O2,X1,X2)
#define Angle1_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle1_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define gAngle2_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
gAngle1_3D(arc_tangente,O1,O2,O3,X1,X2,X3)
#define Angle2_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle2_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define gAngle3_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
gAngle3_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4)
#define Angle3_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle3_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define gAngle4_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
gAngle4_5D(arc_tangente \
,O1,O2,O3,O4,O5 \
,X1,X2,X3,X4,X5 \
)
#define Angle4_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle4_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define gAngle5_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
gAngle5_6D(arc_tangente \
,O1,O2,O3,O4,O5,O6 \
,X1,X2,X3,X4,X5,X6 \
)
#define Angle5_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle5_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define gAngle6_7D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,X1,X2,X3,X4,X5,X6,X7) \
arc_tangente(Module__6D(X1,X2,X3,X4,X5,X6),SOUS(X7,O7))
#define Angle6_7D(X1,X2,X3,X4,X5,X6,X7) \
gAngle6_7D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine \
,X1,X2,X3,X4,X5,X6,X7 \
)
/* Nouvelles definitions 7D introduites le 20110810140810... */
#define CModule_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
disF8D(FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define Module__8D(X1,X2,X3,X4,X5,X6,X7,X8) \
RACX(CModule_8D(X1,X2,X3,X4,X5,X6,X7,X8))
#define gAngle1_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle1_2D(arc_tangente,O1,O2,X1,X2)
#define Angle1_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle1_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle2_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle1_3D(arc_tangente,O1,O2,O3,X1,X2,X3)
#define Angle2_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle2_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle3_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle3_4D(arc_tangente,O1,O2,O3,O4,X1,X2,X3,X4)
#define Angle3_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle3_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle4_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle4_5D(arc_tangente \
,O1,O2,O3,O4,O5 \
,X1,X2,X3,X4,X5 \
)
#define Angle4_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle4_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle5_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle5_6D(arc_tangente \
,O1,O2,O3,O4,O5,O6 \
,X1,X2,X3,X4,X5,X6 \
)
#define Angle5_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle5_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle6_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle6_7D(arc_tangente \
,O1,O2,O3,O4,O5,O6,O7 \
,X1,X2,X3,X4,X5,X6,X7 \
)
#define Angle6_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle6_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
#define gAngle7_8D(arc_tangente,O1,O2,O3,O4,O5,O6,O7,O8,X1,X2,X3,X4,X5,X6,X7,X8) \
arc_tangente(Module__7D(X1,X2,X3,X4,X5,X6,X7),SOUS(X8,O8))
#define Angle7_8D(X1,X2,X3,X4,X5,X6,X7,X8) \
gAngle7_8D(ATAN \
,FX1origine,FX2origine,FX3origine,FX4origine,FX5origine,FX6origine,FX7origine,FX8origine \
,X1,X2,X3,X4,X5,X6,X7,X8 \
)
/* Nouvelles definitions 8D introduites le 20110810140810... */
/* */
/* Soit les formules suivantes le 20110811114539 : */
/* */
/* ---------------------------------------------- */
/* / 2 2 2 2 2 2 2 2 */
/* Rho = \/ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 */
/* */
/* X2 */
/* A1 = ArcTg(----) */
/* X1 */
/* */
/* ---------- */
/* / 2 2 */
/* \/ X1 + X2 */
/* A2 = ArcTg(---------------) */
/* X3 */
/* */
/* ---------------- */
/* / 2 2 2 */
/* \/ X1 + X2 + X3 */
/* A3 = ArcTg(---------------------) */
/* X4 */
/* */
/* ---------------------- */
/* / 2 2 2 2 */
/* \/ X1 + X2 + X3 + X4 */
/* A5 = ArcTg(---------------------------) */
/* X5 */
/* */
/* ---------------------------- */
/* / 2 2 2 2 2 */
/* \/ X1 + X2 + X3 + X4 + X5 */
/* A5 = ArcTg(---------------------------------) */
/* X6 */
/* */
/* ---------------------------------- */
/* / 2 2 2 2 2 2 */
/* \/ X1 + X2 + X3 + X4 + X5 + X6 */
/* A6 = ArcTg(---------------------------------------) */
/* X7 */
/* */
/* ---------------------------------------- */
/* / 2 2 2 2 2 2 2 */
/* \/ X1 + X2 + X3 + X4 + X5 + X6 + X7 */
/* A7 = ArcTg(---------------------------------------------) */
/* X8 */
/* */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S C A R T E S I E N N E S 1 D : */
/* */
/*************************************************************************************************************************************/
-define X1cartesienne_1D(module) \
-_-_-_- NEUT(module)
-define XKartesienne_1D(module) \
-_-_-_- X1cartesienne_1D(module)
/* Nouvelles definitions introduites le 20110808105129 afin de "symetriser" les notations */
/* et surtout permettre d'aller au-dela de la quatrieme dimension. Les coordonnees ne sont */
/* donc plus appelees {X,Y,Z,...} mais {X1,X2,X3,...} en notant bien que seule la derniere */
/* d'entre-elles, a partir de la dimension deux, fait reference directement a 'COSX(...)'. */
/* */
/* Soient donc les nouvelles formules : */
/* */
/* X = X1 = rho */
/* */
-define Xcartesienne_1D(rho) \
-_-_-_- XKartesienne_1D(rho)
/* Coordonnee 'X' (abscisse) : */
/* */
/* X = rho */
/* */
/* en notant qu'elle ne peut etre negative, ce qui est un peu "folklorique". Ceci fut */
/* introduit le 20110808103105... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S C A R T E S I E N N E S 2 D : */
/* */
/*************************************************************************************************************************************/
-define X1cartesienne_2D(module,angle1) \
-_-_-_- MUL2(X1cartesienne_1D(module),SINX(angle1))
-define X2cartesienne_2D(module,angle1) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle1))
-define XKartesienne_2D(module,angle1) \
-_-_-_- X2cartesienne_2D(module,angle1)
-define YKartesienne_2D(module,angle1) \
-_-_-_- X1cartesienne_2D(module,angle1)
/* Nouvelles definitions introduites le 20110808105129 afin de "symetriser" les notations */
/* et surtout permettre d'aller au-dela de la quatrieme dimension. Les coordonnees ne sont */
/* donc plus appelees {X,Y,Z,...} mais {X1,X2,X3,...} en notant bien que seule la derniere */
/* d'entre-elles, a partir de la dimension deux, fait reference directement a 'COSX(...)'. */
/* */
/* Soient donc les nouvelles formules (dans un ordre mettant en valeur l'ordonnancement */
/* des fonctions 'sin(...)' et 'cos(...)') : */
/* */
/* Y = X1 = rho*sin(a1) */
/* X = X2 = rho*cos(a1) */
/* */
/* ou 'a?' represente un angle, en notant les correspondances : */
/* */
/* angle1 -0-> theta */
/* */
-define Xcartesienne_2D(rho,theta) \
-_-_-_- XKartesienne_2D(rho,theta)
/* Coordonnee 'X' (abscisse) : */
/* */
/* X = rho*cos(theta) */
/* */
-define Ycartesienne_2D(rho,theta) \
-_-_-_- YKartesienne_2D(rho,theta)
/* Coordonnee 'Y' (ordonnee) : */
/* */
/* Y = rho*sin(theta) */
/* */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S C A R T E S I E N N E S 3 D : */
/* */
/*************************************************************************************************************************************/
-define X1cartesienne_3D(module,angle1,angle2) \
-_-_-_- MUL2(X2cartesienne_2D(module,angle1),SINX(angle2))
-define X2cartesienne_3D(module,angle1,angle2) \
-_-_-_- MUL2(X1cartesienne_2D(module,angle1),SINX(angle2))
-define X3cartesienne_3D(module,angle1,angle2) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle2))
-define XKartesienne_3D(module,angle2,angle1) \
-_-_-_- X1cartesienne_3D(module,angle2,angle1)
-define YKartesienne_3D(module,angle2,angle1) \
-_-_-_- X2cartesienne_3D(module,angle2,angle1)
-define ZKartesienne_3D(module,angle2,angle1) \
-_-_-_- X3cartesienne_3D(module,angle2,angle1)
/* Nouvelles definitions introduites le 20110808105129 afin de "symetriser" les notations */
/* et surtout permettre d'aller au-dela de la quatrieme dimension. Les coordonnees ne sont */
/* donc plus appelees {X,Y,Z,...} mais {X1,X2,X3,...} en notant bien que seule la derniere */
/* d'entre-elles, a partir de la dimension deux, fait reference directement a 'COSX(...)'. */
/* */
/* Soient donc les nouvelles formules (dans un ordre mettant en valeur l'ordonnancement */
/* des fonctions 'sin(...)' et 'cos(...)') : */
/* */
/* Y = X2 = rho*sin(a1)*sin(a2) */
/* X = X1 = rho*cos(a1)*sin(a2) */
/* Z = X3 = rho* cos(a2) */
/* */
/* ou 'a?' represente un angle, en notant les correspondances : */
/* */
/* angle1 -0-> theta */
/* angle2 -0-> phi */
/* */
/* ATTENTION : on notera bien que c'est la longitude 'phi' qui joue le role de l'angle */
/* 'theta' des coordonnees cartesiennes bidimensionnelles, ceci afin d'assurer des notations */
/* compatibles, par exemple, avec l'Aide-Memoire de Mathematiques, page 321 et 322... */
/* ATTENTION : l'angle 'theta' (ou "distance polaire") est mesure a partir de l'axe 'OZ', et */
/* non pas (comme le voudrait peut-etre la logique...) a partir du plan (OX,OY). C'est ainsi */
/* que, par exemple, pour definir une sphere, 'theta' variera dans [0,PI] et non pas dans */
/* [-PI/2,+PI/2]... */
-define Xcartesienne_3D(rho,phi,theta) \
-_-_-_- XKartesienne_3D(rho,phi,theta)
/* Coordonnee 'X' (abscisse) : */
/* */
/* X = rho*cos(phi)*sin(theta) */
/* */
-define Ycartesienne_3D(rho,phi,theta) \
-_-_-_- YKartesienne_3D(rho,phi,theta)
/* Coordonnee 'Y' (ordonnee) : */
/* */
/* Y = rho*sin(phi)*sin(theta) */
/* */
-define Zcartesienne_3D(rho,phi,theta) \
-_-_-_- ZKartesienne_3D(rho,phi,theta)
/* Coordonnee 'Z' (cote) : */
/* */
/* Z = rho*cos(theta) */
/* */
/* ATTENTION : on notera bien que c'est la longitude 'phi' qui joue le role de l'angle */
/* 'theta' des coordonnees cartesiennes bidimensionnelles, ceci afin d'assurer des notations */
/* compatibles, par exemple, avec l'Aide-Memoire de Mathematiques, page 321 et 322... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S C A R T E S I E N N E S 4 D : */
/* */
/*************************************************************************************************************************************/
-define X1cartesienne_4D(module,angle1,angle2,angle3) \
-_-_-_- MUL2(X2cartesienne_3D(module,angle1,angle2),SINX(angle3))
-define X2cartesienne_4D(module,angle1,angle2,angle3) \
-_-_-_- MUL2(X1cartesienne_3D(module,angle1,angle2),SINX(angle3))
-define X3cartesienne_4D(module,angle1,angle2,angle3) \
-_-_-_- MUL2(X3cartesienne_3D(module,angle1,angle2),SINX(angle3))
-define X4cartesienne_4D(module,angle1,angle2,angle3) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle3))
-define XKartesienne_4D(module,angle3,angle2,angle1) \
-_-_-_- X2cartesienne_4D(module,angle1,angle2,angle3)
-define YKartesienne_4D(module,angle3,angle2,angle1) \
-_-_-_- X1cartesienne_4D(module,angle1,angle2,angle3)
-define ZKartesienne_4D(module,angle3,angle2,angle1) \
-_-_-_- X3cartesienne_4D(module,angle1,angle2,angle3)
-define TKartesienne_4D(module,angle3,angle2,angle1) \
-_-_-_- X4cartesienne_4D(module,angle1,angle2,angle3)
/* Nouvelles definitions introduites le 20110808105129 afin de "symetriser" les notations */
/* et surtout permettre d'aller au-dela de la quatrieme dimension. Les coordonnees ne sont */
/* donc plus appelees {X,Y,Z,...} mais {X1,X2,X3,...} en notant bien que seule la derniere */
/* d'entre-elles, a partir de la dimension deux, fait reference directement a 'COSX(...)'. */
/* */
/* Soient donc les nouvelles formules (dans un ordre mettant en valeur l'ordonnancement */
/* des fonctions 'sin(...)' et 'cos(...)') : */
/* */
/* Y = X1 = rho*sin(a3)*sin(a2)*sin(a1) */
/* X = X2 = rho*cos(a3)*sin(a2)*sin(a1) */
/* Z = X3 = rho* cos(a2)*sin(a1) */
/* T = X4 = rho* cos(a1) */
/* */
/* ou 'a?' represente un angle, en notant les correspondances : */
/* */
/* angle1 -0-> theta */
/* angle2 -0-> phi */
/* angle3 -0-> alpha */
/* */
/* Soit les formules suivantes le 20110811114539 (en notant la numerotation "inverse" */
/* des 'a?'s et des 'A?'s -voir les definitions de 'X?cartesienne_4D(...)' et de */
/* '?Kartesienne_4D(...)'-) : */
/* */
/* X1 = Rho*sin(A1)*sin(A2)*sin(A3) */
/* X2 = Rho*cos(A1)*sin(A2)*sin(A3) */
/* X3 = Rho* cos(A2)*sin(A3) */
/* X4 = Rho* cos(A3) */
/* */
/* ATTENTION : aux permutations de 'theta' et de 'phi' par rapport aux coordonnees 3D... */
/* ATTENTION : je note le 20061206133437 que l'angle 'phi' varie dans [0,PI] et non pas dans */
/* [-PI/2,+PI/2] (car il s'agit de l'angle 'theta' des coordonnees 3D). Il semblerait qu'il */
/* en soit de meme de l'angle 'alpha' qui varie donc dans [0,PI] et non pas dans */
/* [-PI/2,+PI/2]. Cela a des consequences dans 'v $ximcd/operator$FON 20061206090308'... */
-define Xcartesienne_4D(rho,alpha,phi,theta) \
-_-_-_- XKartesienne_4D(rho,alpha,phi,theta)
/* Coordonnee 'X' (abscisse) : */
/* */
/* X = rho*cos(theta)*sin(phi)*sin(alpha) */
/* */
-define Ycartesienne_4D(rho,alpha,phi,theta) \
-_-_-_- YKartesienne_4D(rho,alpha,phi,theta)
/* Coordonnee 'Y' (ordonnee) : */
/* */
/* Y = rho*sin(theta)*sin(phi)*sin(alpha) */
/* */
-define Zcartesienne_4D(rho,alpha,phi,theta) \
-_-_-_- ZKartesienne_4D(rho,alpha,phi,theta)
/* Coordonnee 'Z' (cote) : */
/* */
/* Z = rho*cos(phi)*sin(alpha) */
/* */
-define Tcartesienne_4D(rho,alpha,phi,theta) \
-_-_-_- TKartesienne_4D(rho,alpha,phi,theta)
/* Coordonnee 'T' (sans nom...) : */
/* */
/* T = rho*cos(alpha) */
/* */
/* ATTENTION : aux permutations de 'theta' et de 'phi' par rapport aux coordonnees 3D... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N D E S C O O R D O N N E E S C A R T E S I E N N E S 8 D : */
/* */
/*************************************************************************************************************************************/
-define X1cartesienne_5D(module,angle1,angle2,angle3,angle4) \
-_-_-_- MUL2(X1cartesienne_4D(module,angle1,angle2,angle3),SINX(angle4))
-define X2cartesienne_5D(module,angle1,angle2,angle3,angle4) \
-_-_-_- MUL2(X2cartesienne_4D(module,angle1,angle2,angle3),SINX(angle4))
-define X3cartesienne_5D(module,angle1,angle2,angle3,angle4) \
-_-_-_- MUL2(X3cartesienne_4D(module,angle1,angle2,angle3),SINX(angle4))
-define X4cartesienne_5D(module,angle1,angle2,angle3,angle4) \
-_-_-_- MUL2(X4cartesienne_4D(module,angle1,angle2,angle3),SINX(angle4))
-define X5cartesienne_5D(module,angle1,angle2,angle3,angle4) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle4))
/* Nouvelles definitions 5D introduites le 20110810140810... */
-define X1cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X1cartesienne_5D(module,angle1,angle2,angle3,angle4),SINX(angle5))
-define X2cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X2cartesienne_5D(module,angle1,angle2,angle3,angle4),SINX(angle5))
-define X3cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X3cartesienne_5D(module,angle1,angle2,angle3,angle4),SINX(angle5))
-define X4cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X4cartesienne_5D(module,angle1,angle2,angle3,angle4),SINX(angle5))
-define X5cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X5cartesienne_5D(module,angle1,angle2,angle3,angle4),SINX(angle5))
-define X6cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle5))
/* Nouvelles definitions 6D introduites le 20110810140810... */
-define X1cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X1cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X2cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X2cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X3cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X3cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X4cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X4cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X5cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X5cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X6cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X6cartesienne_6D(module,angle1,angle2,angle3,angle4,angle5),SINX(angle6))
-define X7cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle6))
/* Nouvelles definitions 7D introduites le 20110810140810... */
-define X1cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X1cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X2cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X2cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X3cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X3cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X4cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X4cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X5cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X5cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X6cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X6cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X7cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X7cartesienne_7D(module,angle1,angle2,angle3,angle4,angle5,angle6),SINX(angle7))
-define X8cartesienne_8D(module,angle7,angle6,angle5,angle4,angle3,angle2,angle1) \
-_-_-_- MUL2(X1cartesienne_1D(module),COSX(angle7))
/* Nouvelles definitions 8D introduites le 20110810140810... */
/* */
/* Soit les formules suivantes le 20110811114539 : */
/* */
/* X1 = Rho*sin(A1)*sin(A2)*sin(A3)*sin(A4)*sin(A5)*sin(A6)*sin(A7) */
/* X2 = Rho*cos(A1)*sin(A2)*sin(A3)*sin(A4)*sin(A5)*sin(A6)*sin(A7) */
/* X3 = Rho* cos(A2)*sin(A3)*sin(A4)*sin(A5)*sin(A6)*sin(A7) */
/* X4 = Rho* cos(A3)*sin(A4)*sin(A5)*sin(A6)*sin(A7) */
/* X5 = Rho* cos(A4)*sin(A5)*sin(A6)*sin(A7) */
/* X6 = Rho* cos(A5)*sin(A6)*sin(A7) */
/* X7 = Rho* cos(A6)*sin(A7) */
/* X8 = Rho* cos(A7) */
/* */
/* On notera l'inversion {angle7,angle6,angle5,angle4,angle3,angle2,angle1} de */
/* {angle1,angle2,angle3,angle4,angle5,angle6,angle7} le 20110813120353 lors des */
/* definitions de 'X?cartesienne_8D(...)' (contrairement a 'X?cartesienne_7D(...)' par */
/* exemple...). */