/*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N S D ' U N R E F E R E N T I E L T R I D I M E N S I O N N E L */ /* E T D ' U N E E L L I P S E E N U N P O I N T D ' U N E C O U R B E : */ /* */ /* */ /* Author of '$xrs/referentiel3D.11$I' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20161229085315). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D E L ' I N I T I A L I S A T I O N */ /* D U V E C T E U R { X1 , X2 , X3 } : */ /* */ /*************************************************************************************************************************************/ #define DEFINITION_OX_a2 \ FU #define DEFINITION_OX_a3 \ FU DEFV(Local,DEFV(Float,INIT(Definition_OX_a2,DEFINITION_OX_a2))); DEFV(Local,DEFV(Float,INIT(Definition_OX_a3,DEFINITION_OX_a3))); /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D E S P O N D E R A T I O N S */ /* D E S E L E C T I O N D E S T R O I S D E R I V E E S : */ /* */ /*************************************************************************************************************************************/ /* Les ponderations qui suivent ont ete introduites a des fins de test... */ #define PONDERATION_Z1_dX \ FU #define PONDERATION_Z1_dY \ FZERO #define PONDERATION_Z1_dZ \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Z1_dX,PONDERATION_Z1_dX))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_dY,PONDERATION_Z1_dY))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_dZ,PONDERATION_Z1_dZ))); #define PONDERATION_Z2_dX \ FZERO #define PONDERATION_Z2_dY \ FU #define PONDERATION_Z2_dZ \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Z2_dX,PONDERATION_Z2_dX))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_dY,PONDERATION_Z2_dY))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_dZ,PONDERATION_Z2_dZ))); #define PONDERATION_Z3_dX \ FZERO #define PONDERATION_Z3_dY \ FZERO #define PONDERATION_Z3_dZ \ FU DEFV(Local,DEFV(Float,INIT(ponderation_Z3_dX,PONDERATION_Z3_dX))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_dY,PONDERATION_Z3_dY))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_dZ,PONDERATION_Z3_dZ))); /* Les ponderations qui precedent ont ete introduites a des fins de test... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D E S P O N D E R A T I O N S */ /* D E S E L E C T I O N D E S T R O I S A N G L E S : */ /* */ /*************************************************************************************************************************************/ /* Les ponderations qui suivent ont ete introduites a des fins de test... */ #define PONDERATION_X1_X1 \ FU #define PONDERATION_X1_X2 \ FZERO #define PONDERATION_X1_X3 \ FZERO #define PONDERATION_X1_Y1 \ FZERO #define PONDERATION_X1_Y2 \ FZERO #define PONDERATION_X1_Y3 \ FZERO #define PONDERATION_X1_Z1 \ FZERO #define PONDERATION_X1_Z2 \ FZERO #define PONDERATION_X1_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_X1_X1,PONDERATION_X1_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_X2,PONDERATION_X1_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_X3,PONDERATION_X1_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Y1,PONDERATION_X1_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Y2,PONDERATION_X1_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Y3,PONDERATION_X1_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Z1,PONDERATION_X1_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Z2,PONDERATION_X1_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_X1_Z3,PONDERATION_X1_Z3))); #define PONDERATION_X2_X1 \ FZERO #define PONDERATION_X2_X2 \ FU #define PONDERATION_X2_X3 \ FZERO #define PONDERATION_X2_Y1 \ FZERO #define PONDERATION_X2_Y2 \ FZERO #define PONDERATION_X2_Y3 \ FZERO #define PONDERATION_X2_Z1 \ FZERO #define PONDERATION_X2_Z2 \ FZERO #define PONDERATION_X2_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_X2_X1,PONDERATION_X2_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_X2,PONDERATION_X2_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_X3,PONDERATION_X2_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Y1,PONDERATION_X2_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Y2,PONDERATION_X2_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Y3,PONDERATION_X2_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Z1,PONDERATION_X2_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Z2,PONDERATION_X2_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_X2_Z3,PONDERATION_X2_Z3))); #define PONDERATION_X3_X1 \ FZERO #define PONDERATION_X3_X2 \ FZERO #define PONDERATION_X3_X3 \ FU #define PONDERATION_X3_Y1 \ FZERO #define PONDERATION_X3_Y2 \ FZERO #define PONDERATION_X3_Y3 \ FZERO #define PONDERATION_X3_Z1 \ FZERO #define PONDERATION_X3_Z2 \ FZERO #define PONDERATION_X3_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_X3_X1,PONDERATION_X3_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_X2,PONDERATION_X3_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_X3,PONDERATION_X3_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Y1,PONDERATION_X3_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Y2,PONDERATION_X3_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Y3,PONDERATION_X3_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Z1,PONDERATION_X3_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Z2,PONDERATION_X3_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_X3_Z3,PONDERATION_X3_Z3))); #define PONDERATION_Y1_X1 \ FZERO #define PONDERATION_Y1_X2 \ FZERO #define PONDERATION_Y1_X3 \ FZERO #define PONDERATION_Y1_Y1 \ FU #define PONDERATION_Y1_Y2 \ FZERO #define PONDERATION_Y1_Y3 \ FZERO #define PONDERATION_Y1_Z1 \ FZERO #define PONDERATION_Y1_Z2 \ FZERO #define PONDERATION_Y1_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Y1_X1,PONDERATION_Y1_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_X2,PONDERATION_Y1_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_X3,PONDERATION_Y1_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Y1,PONDERATION_Y1_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Y2,PONDERATION_Y1_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Y3,PONDERATION_Y1_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Z1,PONDERATION_Y1_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Z2,PONDERATION_Y1_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y1_Z3,PONDERATION_Y1_Z3))); #define PONDERATION_Y2_X1 \ FZERO #define PONDERATION_Y2_X2 \ FZERO #define PONDERATION_Y2_X3 \ FZERO #define PONDERATION_Y2_Y1 \ FZERO #define PONDERATION_Y2_Y2 \ FU #define PONDERATION_Y2_Y3 \ FZERO #define PONDERATION_Y2_Z1 \ FZERO #define PONDERATION_Y2_Z2 \ FZERO #define PONDERATION_Y2_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Y2_X1,PONDERATION_Y2_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_X2,PONDERATION_Y2_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_X3,PONDERATION_Y2_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Y1,PONDERATION_Y2_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Y2,PONDERATION_Y2_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Y3,PONDERATION_Y2_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Z1,PONDERATION_Y2_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Z2,PONDERATION_Y2_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y2_Z3,PONDERATION_Y2_Z3))); #define PONDERATION_Y3_X1 \ FZERO #define PONDERATION_Y3_X2 \ FZERO #define PONDERATION_Y3_X3 \ FZERO #define PONDERATION_Y3_Y1 \ FZERO #define PONDERATION_Y3_Y2 \ FZERO #define PONDERATION_Y3_Y3 \ FU #define PONDERATION_Y3_Z1 \ FZERO #define PONDERATION_Y3_Z2 \ FZERO #define PONDERATION_Y3_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Y3_X1,PONDERATION_Y3_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_X2,PONDERATION_Y3_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_X3,PONDERATION_Y3_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Y1,PONDERATION_Y3_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Y2,PONDERATION_Y3_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Y3,PONDERATION_Y3_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Z1,PONDERATION_Y3_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Z2,PONDERATION_Y3_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Y3_Z3,PONDERATION_Y3_Z3))); #define PONDERATION_Z1_X1 \ FZERO #define PONDERATION_Z1_X2 \ FZERO #define PONDERATION_Z1_X3 \ FZERO #define PONDERATION_Z1_Y1 \ FZERO #define PONDERATION_Z1_Y2 \ FZERO #define PONDERATION_Z1_Y3 \ FZERO #define PONDERATION_Z1_Z1 \ FU #define PONDERATION_Z1_Z2 \ FZERO #define PONDERATION_Z1_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Z1_X1,PONDERATION_Z1_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_X2,PONDERATION_Z1_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_X3,PONDERATION_Z1_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Y1,PONDERATION_Z1_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Y2,PONDERATION_Z1_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Y3,PONDERATION_Z1_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Z1,PONDERATION_Z1_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Z2,PONDERATION_Z1_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z1_Z3,PONDERATION_Z1_Z3))); #define PONDERATION_Z2_X1 \ FZERO #define PONDERATION_Z2_X2 \ FZERO #define PONDERATION_Z2_X3 \ FZERO #define PONDERATION_Z2_Y1 \ FZERO #define PONDERATION_Z2_Y2 \ FZERO #define PONDERATION_Z2_Y3 \ FZERO #define PONDERATION_Z2_Z1 \ FZERO #define PONDERATION_Z2_Z2 \ FU #define PONDERATION_Z2_Z3 \ FZERO DEFV(Local,DEFV(Float,INIT(ponderation_Z2_X1,PONDERATION_Z2_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_X2,PONDERATION_Z2_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_X3,PONDERATION_Z2_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Y1,PONDERATION_Z2_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Y2,PONDERATION_Z2_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Y3,PONDERATION_Z2_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Z1,PONDERATION_Z2_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Z2,PONDERATION_Z2_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z2_Z3,PONDERATION_Z2_Z3))); #define PONDERATION_Z3_X1 \ FZERO #define PONDERATION_Z3_X2 \ FZERO #define PONDERATION_Z3_X3 \ FZERO #define PONDERATION_Z3_Y1 \ FZERO #define PONDERATION_Z3_Y2 \ FZERO #define PONDERATION_Z3_Y3 \ FZERO #define PONDERATION_Z3_Z1 \ FZERO #define PONDERATION_Z3_Z2 \ FZERO #define PONDERATION_Z3_Z3 \ FU DEFV(Local,DEFV(Float,INIT(ponderation_Z3_X1,PONDERATION_Z3_X1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_X2,PONDERATION_Z3_X2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_X3,PONDERATION_Z3_X3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Y1,PONDERATION_Z3_Y1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Y2,PONDERATION_Z3_Y2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Y3,PONDERATION_Z3_Y3))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Z1,PONDERATION_Z3_Z1))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Z2,PONDERATION_Z3_Z2))); DEFV(Local,DEFV(Float,INIT(ponderation_Z3_Z3,PONDERATION_Z3_Z3))); /* Les ponderations qui precedent ont ete introduites a des fins de test... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D U R E F E R E N T I E L : */ /* */ /*************************************************************************************************************************************/ #define EPSILON_DE_TEST_DE_NULLITE_DES_COMPOSANTES_Z \ FZERO DEFV(Local,DEFV(Float,INIT(epsilon_de_test_de_nullite_des_composantes_Z,EPSILON_DE_TEST_DE_NULLITE_DES_COMPOSANTES_Z))); /* Introduit le 20170202110148 pour voir si cela peut aider a resoudre le probleme des */ /* discontinuites evoque par 'v $xrs/referentiel3D.11$I discontinuites'. Choisir une */ /* valeur nulle pour cet epsilon retablit les conditions anterieures... */ /* */ /* Effectivement cela ne sert a rien et le 20170202112711 la valeur nulle par defaut */ /* a ete forcee, mais ce parametre est conserve : on ne sait jamais... */ DenumeT04(CalculNouveauReferentiel_UNDEF ,CalculNouveauReferentiel_avec_Z1 ,CalculNouveauReferentiel_avec_Z2 ,CalculNouveauReferentiel_avec_Z3 ,types_de_CalculNouveauReferentiel ) DEFV(Local,DEFV(Int,INIT(type_de_CalculNouveauReferentiel_courant__,CalculNouveauReferentiel_UNDEF))); DEFV(Local,DEFV(Int,INIT(type_de_CalculNouveauReferentiel_precedent,CalculNouveauReferentiel_UNDEF))); #define Definition_OX(a1,a2,a3,c1,c2,c3) \ Bblock \ Test(IZNE(c1)) \ Bblock \ EGAL(a2,Definition_OX_a2); \ EGAL(a3,Definition_OX_a3); \ EGAL(a1,DIVI(NEGA(LIZ2(a2,c2,a3,c3)),c1)); \ /* Le vecteur {a1,a2,a3} est calcule "arbitrairement" tel qu'il soit orthogonal au */ \ /* vecteur {c1,c2,c3}. Leur produit scalaire est donc nul : */ \ /* */ \ /* a1.c1 + a2.c2 + a3.c3 = 0 */ \ /* */ \ /* en supposant que la coordonnee 'c1' n'est pas nulle (ce que l'on teste avant d'appeler */ \ /* 'Definition_OX(...)' et ce que l'on reverifie ici), on fixe arbitrairement (par defaut) : */ \ /* */ \ /* a2 = 1 */ \ /* a3 = 1 */ \ /* */ \ /* d'ou la valeur de 'a1'... */ \ Eblock \ ATes \ Bblock \ PRINT_ERREUR("Erreur de logique"); \ /* Et oui, puisqu'un tel test a ete deja fait juste avant l'appel a 'Definition_OX(...)'... */ \ Eblock \ ETes \ Eblock #define NormalisationVecteur(a1,a2,a3) \ Bblock \ DEFV(Float,INIT(norme,GpytF3D(a1,a2,a3))); \ \ EGAL(a1,DIVI(a1,norme)); \ EGAL(a2,DIVI(a2,norme)); \ EGAL(a3,DIVI(a3,norme)); \ Eblock #define CalculNouveauReferentiel(ComposanteACalculer,pX1,pX2,pX3,pY1,pY2,pY3,pZ1,pZ2,pZ3) \ Bblock \ DEFV(Float,INIT(d1_XEspace,d1_XEspace_Courbe(u,v))); \ DEFV(Float,INIT(d1_YEspace,d1_YEspace_Courbe(u,v))); \ DEFV(Float,INIT(d1_ZEspace,d1_ZEspace_Courbe(u,v))); \ \ DEFV(Logical,INIT(CalculerLesComposantes,VRAI)); \ \ DEFV(Float,INIT(X1,FLOT__UNDEF)); \ DEFV(Float,INIT(X2,FLOT__UNDEF)); \ DEFV(Float,INIT(X3,FLOT__UNDEF)); \ \ DEFV(Float,INIT(Y1,FLOT__UNDEF)); \ DEFV(Float,INIT(Y2,FLOT__UNDEF)); \ DEFV(Float,INIT(Y3,FLOT__UNDEF)); \ \ DEFV(Float,INIT(Z1,FLOT__UNDEF)); \ DEFV(Float,INIT(Z2,FLOT__UNDEF)); \ DEFV(Float,INIT(Z3,FLOT__UNDEF)); \ /* Definition d'un nouveau referentiel 'XYZ' par rapport a l'ancien 'xyz'... */ \ \ EGAL(Z1 \ ,LIZ3(ponderation_Z1_dX,d1_XEspace \ ,ponderation_Z1_dY,d1_YEspace \ ,ponderation_Z1_dZ,d1_ZEspace \ ) \ ); \ EGAL(Z2 \ ,LIZ3(ponderation_Z2_dX,d1_XEspace \ ,ponderation_Z2_dY,d1_YEspace \ ,ponderation_Z2_dZ,d1_ZEspace \ ) \ ); \ EGAL(Z3 \ ,LIZ3(ponderation_Z3_dX,d1_XEspace \ ,ponderation_Z3_dY,d1_YEspace \ ,ponderation_Z3_dZ,d1_ZEspace \ ) \ ); \ /* Definition de l'axe 'OZ' "autour" duquel on souhaite creer un referentiel {OX,OY,OZ} */ \ /* direct et orthornome... */ \ /* */ \ /* Cet axe 'OZ' est le vecteur tangent a la courbe... */ \ /* */ \ /* On notera le 20170308074314 que par defaut : */ \ /* */ \ /* Z1 = d1_XEspace */ \ /* Z2 = d1_YEspace */ \ /* Z3 = d1_ZEspace */ \ /* */ \ /* et que l'ensemble {Z1,Z2,Z3} ainsi defini est le meme pour les neuf appels consecutifs */ \ /* de 'CalculNouveauReferentiel(ComposanteACalculer,...)'... */ \ \ Test(IZNE_a_peu_pres(Z1,epsilon_de_test_de_nullite_des_composantes_Z)) \ Bblock \ Definition_OX(X1,X2,X3,Z1,Z2,Z3); \ EGAL(type_de_CalculNouveauReferentiel_courant__,CalculNouveauReferentiel_avec_Z1); \ Eblock \ ATes \ Bblock \ Test(IZNE_a_peu_pres(Z2,epsilon_de_test_de_nullite_des_composantes_Z)) \ Bblock \ Definition_OX(X2,X3,X1,Z2,Z3,Z1); \ EGAL(type_de_CalculNouveauReferentiel_courant__,CalculNouveauReferentiel_avec_Z2); \ Eblock \ ATes \ Bblock \ Test(IZNE_a_peu_pres(Z3,epsilon_de_test_de_nullite_des_composantes_Z)) \ Bblock \ Definition_OX(X3,X1,X2,Z3,Z1,Z2); \ EGAL(type_de_CalculNouveauReferentiel_courant__,CalculNouveauReferentiel_avec_Z3); \ /* Definition de l'axe 'OX' tel qu'il soit orthogonal a l'axe 'OZ' (mais de facon */ \ /* arbitraire...). */ \ /* */ \ /* Il semblerait le 20170130112212 que ce dispositif introduise finalement des */ \ /* discontinuites dans la coordonnee 'u' (celle qui en particulier permet de definir */ \ /* l'ellipse orthogonale a la courbe) comme cela s'est vu a cette date en essayant */ \ /* de construire une helice sur la surface 'v $xiirs/HELI.11'. A condition de bien */ \ /* respecter la definition de la droite dans le plan {u,v} tel que cela est indique dans */ \ /* 'v $xrs/surfaces.13$I 20170130111050, on obtient bien une helice, mais elle est */ \ /* constituee de plusieurs morceaux qui ne se raccordent pas. Cela fut verifie en jouant */ \ /* sur les parametres arbitraires 'Definition_OX_a2' et 'Definition_OX_a3' qui, avec des */ \ /* valeurs differentes modifiaient la localisation des differents morceaux sur la surface... */ \ /* */ \ /* Le probleme des discontinuites semble se confirmer le 20170202095641 grace au programme */ \ /* 'v $xtc/helicoide.11.01$c .xrs.helicoide.11.I'... */ \ /* */ \ /* Cela a ete visualise le 20170202104934 avec 'v $xiirs/HELI.11.DiscontinuitesParalleles' */ \ /* en utilisant un nombre impair de paralleles... */ \ /* */ \ /* Cela a ete ensuite confirme avec 'v $xiirs/CYLI.31' qui ne presente pas de discontinuites */ \ /* etant donnee la geometrie du cylindre, puis avec 'v $xiirs/HELI.21' le 20170203145344 */ \ /* qui presente cinq zones de discontinuites : deux a gauche et trois a droite, au niveau */ \ /* des extrema a gauche et a droite de l'helicoide... */ \ /* */ \ /* La possibilite de corriger cette anomalie a ete introduite et controlee grace a */ \ /* l'indicateur 'tester_les_discontinuites_d_orientation_du_referentiel' le 20170305080850. */ \ Eblock \ ATes \ Bblock \ PRINT_ERREUR("Le vecteur (Z1,Z2,Z3) est le vecteur nul, le calcul est donc impossible"); \ EGAL(CalculerLesComposantes,FAUX); \ Eblock \ ETes \ Eblock \ ETes \ Eblock \ ETes \ \ Test(IL_FAUT(CalculerLesComposantes)) \ Bblock \ EGAL(Y1,PvectX(Z1,Z2,Z3,X1,X2,X3)); \ EGAL(Y2,PvectY(Z1,Z2,Z3,X1,X2,X3)); \ EGAL(Y3,PvectZ(Z1,Z2,Z3,X1,X2,X3)); \ /* Definition de l'axe 'OY' tel qu'il soit orthogonal au plan {OX,OZ} et en faisant que */ \ /* le referentiel {OX,OY,OZ} ainsi cree soit direct (et de plus orthornome, ce qui est */ \ /* fait ci-apres avec 'NormalisationVecteur(...)'). */ \ \ NormalisationVecteur(X1,X2,X3); \ NormalisationVecteur(Y1,Y2,Y3); \ NormalisationVecteur(Z1,Z2,Z3); \ /* Nouveau referentiel {OX,OY,OZ}... */ \ /* */ \ /* ATTENTION : il est essentiel que la normalisation des vecteurs {X1,X2,X3}, {Y1,Y2,Y3} */ \ /* et {Z1,Z2,Z3} ait lieu APRES le calcul du produit vectoriel precedent... */ \ \ EGAL(ComposanteACalculer \ ,LIZ9(pX1,X1 \ ,pX2,X2 \ ,pX3,X3 \ ,pY1,Y1 \ ,pY2,Y2 \ ,pY3,Y3 \ ,pZ1,Z1 \ ,pZ2,Z2 \ ,pZ3,Z3 \ ) \ ); \ Eblock \ ATes \ Bblock \ EGAL(ComposanteACalculer,FZERO); \ Eblock \ ETes \ Eblock \ /* Calcul final d'une composante parmi neuf... */ #define TESTER_LES_DISCONTINUITES_D_ORIENTATION_DU_REFERENTIEL \ VRAI DEFV(Local,DEFV(Logical,INIT(tester_les_discontinuites_d_orientation_du_referentiel ,TESTER_LES_DISCONTINUITES_D_ORIENTATION_DU_REFERENTIEL ) ) ); /* Indicateur de controle du test d'orientation du referentiel... */ DEFV(Local,DEFV(Int,INIT(numero_du_point_courant,PREMIER_POINT))); #define PREMIER_TEST \ UN #define DERNIER_TEST \ EXP2(TRI_DIMENSIONNEL) DEFV(Local,DEFV(Int,INIT(numero_du_test_courant_d_orientation_du_referentiel,PREMIER_TEST))); DEFV(Local,DEFV(Float,INIT(Coordonnee_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X1_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X2_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X3_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y1_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y2_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y3_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z1_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z2_u_v__precedente,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z3_u_v__precedente,FLOT__UNDEF))); #define CALCUL_DES_COMPOSANTES_PRECEDENTES \ Bblock \ EGAL(Composante_X1_u_v__precedente,Composante_X1_u_v__courante__); \ EGAL(Composante_X2_u_v__precedente,Composante_X2_u_v__courante__); \ EGAL(Composante_X3_u_v__precedente,Composante_X3_u_v__courante__); \ EGAL(Composante_Y1_u_v__precedente,Composante_Y1_u_v__courante__); \ EGAL(Composante_Y2_u_v__precedente,Composante_Y2_u_v__courante__); \ EGAL(Composante_Y3_u_v__precedente,Composante_Y3_u_v__courante__); \ EGAL(Composante_Z1_u_v__precedente,Composante_Z1_u_v__courante__); \ EGAL(Composante_Z2_u_v__precedente,Composante_Z2_u_v__courante__); \ EGAL(Composante_Z3_u_v__precedente,Composante_Z3_u_v__courante__); \ Eblock \ /* Calcul des composantes precedentes... */ DEFV(Local,DEFV(Float,INIT(Coordonnee_u__courante__,FLOT__UNDEF))); /* A priori, ne sert a rien mais est definie par symetrie avec 'Coordonnee_v__courante__'... */ DEFV(Local,DEFV(Float,INIT(Coordonnee_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X1_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X2_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_X3_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y1_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y2_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Y3_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z1_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z2_u_v__courante__,FLOT__UNDEF))); DEFV(Local,DEFV(Float,INIT(Composante_Z3_u_v__courante__,FLOT__UNDEF))); #define CALCUL_DES_COMPOSANTES_COURANTES \ Bblock \ CalculNouveauReferentiel(Composante_X1_u_v__courante__ \ ,ponderation_X1_X1,ponderation_X1_X2,ponderation_X1_X3 \ ,ponderation_X1_Y1,ponderation_X1_Y2,ponderation_X1_Y3 \ ,ponderation_X1_Z1,ponderation_X1_Z2,ponderation_X1_Z3 \ ); \ CalculNouveauReferentiel(Composante_X2_u_v__courante__ \ ,ponderation_X2_X1,ponderation_X2_X2,ponderation_X2_X3 \ ,ponderation_X2_Y1,ponderation_X2_Y2,ponderation_X2_Y3 \ ,ponderation_X2_Z1,ponderation_X2_Z2,ponderation_X2_Z3 \ ); \ CalculNouveauReferentiel(Composante_X3_u_v__courante__ \ ,ponderation_X3_X1,ponderation_X3_X2,ponderation_X3_X3 \ ,ponderation_X3_Y1,ponderation_X3_Y2,ponderation_X3_Y3 \ ,ponderation_X3_Z1,ponderation_X3_Z2,ponderation_X3_Z3 \ ); \ CalculNouveauReferentiel(Composante_Y1_u_v__courante__ \ ,ponderation_Y1_X1,ponderation_Y1_X2,ponderation_Y1_X3 \ ,ponderation_Y1_Y1,ponderation_Y1_Y2,ponderation_Y1_Y3 \ ,ponderation_Y1_Z1,ponderation_Y1_Z2,ponderation_Y1_Z3 \ ); \ CalculNouveauReferentiel(Composante_Y2_u_v__courante__ \ ,ponderation_Y2_X1,ponderation_Y2_X2,ponderation_Y2_X3 \ ,ponderation_Y2_Y1,ponderation_Y2_Y2,ponderation_Y2_Y3 \ ,ponderation_Y2_Z1,ponderation_Y2_Z2,ponderation_Y2_Z3 \ ); \ CalculNouveauReferentiel(Composante_Y3_u_v__courante__ \ ,ponderation_Y3_X1,ponderation_Y3_X2,ponderation_Y3_X3 \ ,ponderation_Y3_Y1,ponderation_Y3_Y2,ponderation_Y3_Y3 \ ,ponderation_Y3_Z1,ponderation_Y3_Z2,ponderation_Y3_Z3 \ ); \ CalculNouveauReferentiel(Composante_Z1_u_v__courante__ \ ,ponderation_Z1_X1,ponderation_Z1_X2,ponderation_Z1_X3 \ ,ponderation_Z1_Y1,ponderation_Z1_Y2,ponderation_Z1_Y3 \ ,ponderation_Z1_Z1,ponderation_Z1_Z2,ponderation_Z1_Z3 \ ); \ CalculNouveauReferentiel(Composante_Z2_u_v__courante__ \ ,ponderation_Z2_X1,ponderation_Z2_X2,ponderation_Z2_X3 \ ,ponderation_Z2_Y1,ponderation_Z2_Y2,ponderation_Z2_Y3 \ ,ponderation_Z2_Z1,ponderation_Z2_Z2,ponderation_Z2_Z3 \ ); \ CalculNouveauReferentiel(Composante_Z3_u_v__courante__ \ ,ponderation_Z3_X1,ponderation_Z3_X2,ponderation_Z3_X3 \ ,ponderation_Z3_Y1,ponderation_Z3_Y2,ponderation_Z3_Y3 \ ,ponderation_Z3_Z1,ponderation_Z3_Z2,ponderation_Z3_Z3 \ ); \ Eblock \ /* Calcul des composantes courantes... */ #define Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(composante__precedente,composante__courante__) \ IFNE_a_peu_pres_absolu(composante__precedente \ ,composante__courante__ \ ,epsilon_de_test_de_changement_d_orientation_du_referentiel \ ) \ /* On notera que le 20170306090317, j'ai essaye : */ \ /* */ \ /* IFNE(SIGZ(composante__precedente),SIGZ(composante__courante__)) */ \ /* */ \ /* mais cela donne de tres mauvais resultats... */ #define IL_Y_A_CHANGEMENT_D_ORIENTATION_DU_REFERENTIEL \ I3OU(I3OU(Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_X1_u_v__precedente \ ,Composante_X1_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_X2_u_v__precedente \ ,Composante_X2_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_X3_u_v__precedente \ ,Composante_X3_u_v__courante__ \ ) \ ) \ ,I3OU(Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Y1_u_v__precedente \ ,Composante_Y1_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Y2_u_v__precedente \ ,Composante_Y2_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Y3_u_v__precedente \ ,Composante_Y3_u_v__courante__ \ ) \ ) \ ,I3OU(Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Z1_u_v__precedente \ ,Composante_Z1_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Z2_u_v__precedente \ ,Composante_Z2_u_v__courante__ \ ) \ ,Y_A_T_IL_CHANGEMENT_D_ORIENTATION_D_UNE_COMPOSANTE(Composante_Z3_u_v__precedente \ ,Composante_Z3_u_v__courante__ \ ) \ ) \ ) \ /* On notera que le 20170306090317, j'ai essaye de remplacer tous les 'I3OU(...)'s par */ \ /* des 'I3ET(...)'s, mais cela donne de tres mauvais resultats... */ #define PERMUTER_L_ORDRE_DE_PARCOURS_DES_COORDONNEES_u_v /* Introduit le 20170307111551 a cause de 'v $xrs/referentiel3D.11$I 20170307094803'... */ #define NE_PAS_CHANGER_L_ORIENTATION_DU_REFERENTIEL \ FU #define CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(composante) \ MUL2(orientation_du_referentiel,composante) DEFV(Local,DEFV(Float,INIT(orientation_du_referentiel,NE_PAS_CHANGER_L_ORIENTATION_DU_REFERENTIEL))); /* Facteur permettant de changer ou pas l'orientation du referentiel... */ #define EPSILON_DE_TEST_DE_CHANGEMENT_D_ORIENTATION_DU_REFERENTIEL \ FRA2(FRA10(GRO3(GRO10(FU)))) DEFV(Local,DEFV(Float,INIT(epsilon_de_test_de_changement_d_orientation_du_referentiel ,EPSILON_DE_TEST_DE_CHANGEMENT_D_ORIENTATION_DU_REFERENTIEL ) ) ); /* La valeur par defaut a ete determinee de maniere heuristique... */ #define EDITER_LE_REFERENTIEL \ FAUX DEFV(Local,DEFV(Logical,INIT(editer_le_referentiel,EDITER_LE_REFERENTIEL))); /* Indicateur introduit le 20170308174525... */ BFonctionV DEFV(FonctionV,test_de_l_orientation_du_referentiel(u,v)) DEFV(Argument,DEFV(Float,u)); DEFV(Argument,DEFV(Float,v)); /* Definition des coordonnees parametriques. */ /* */ /* On notera le 20170307121634 que dans le cas du trace d'une helice sur une surface, en */ /* fait, les coordonnees {u,v}, lorsqu'on arrive ici ne "balaye" pas tout l'espace de */ /* parametrage [mu,Mu]x[mv,Mv] (comme v $xrs/surfaces.12$I DEFINITION_DE__FDoIn_uv' le */ /* definit, mais uniquement les coordonnees {u,v} qui sont sur l'helice qui est elle-meme */ /* definie, par exemple, par 'image_Droite_UV_Definition'... */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ Test(IL_FAUT(tester_les_discontinuites_d_orientation_du_referentiel)) Bblock Test(EST_VRAI(c_est_le_calcul_de__cx__cy__cz)) /* Introduit le 20170308102415 afin de ne pas appeler cette fonction lors du calcul */ /* des differentielles... */ Bblock Test(IFEQ(numero_du_test_courant_d_orientation_du_referentiel,PREMIER_TEST)) /* La premiere des neuf fonctions 'Composante_[XYZ][123](...)' appelee pour le point */ /* courant doit effectuer ce qui suit : */ Bblock EGAL(Coordonnee_u__courante__,u); EGAL(Coordonnee_v__courante__,v); Test(IFEQ(numero_du_point_courant,PREMIER_POINT)) Bblock EGAL(orientation_du_referentiel,NEUT(orientation_du_referentiel)); /* A priori, on ne changera pas l'orientation... */ EGAL(Coordonnee_v__precedente,SOUS(Coordonnee_v__courante__,tgEPSILON)); /* Initialisation arbitraire mais telle que les deux valeurs soient differentes... */ Eblock ATes Bblock Eblock ETes Test(IFNE(Coordonnee_v__courante__,Coordonnee_v__precedente)) /* Cas ou la coordonnee 'v' qui assure le parcours de la courbe vient de changer : on va */ /* donc determiner le premier point de l'ellipse orthogonale a cette courbe... */ /* */ /* ATTENTION : je note le 20170307094803 que cela fait l'hypothese implicite que la */ /* coordonnee 'v' est parcourue dans une boucle "exterieure" a celle de la coordonnee 'u', */ /* alors que c'est le contraire ('v $xrs/surfaces.12$I FDoIn.u.minimum_de_u_effectif')... */ /* */ /* Grace a 'v $xrs/surfaces.12$I PERMUTER_L_ORDRE_DE_PARCOURS_DES_COORDONNEES_u_v', cela */ /* fut corrige le 20170307103744... */ Bblock CALCUL_DES_COMPOSANTES_COURANTES; Test(IFEQ(numero_du_point_courant,PREMIER_POINT)) Bblock /* Dans le cas du premier point de la courbe, on ne peut evidemment pas tester si le */ /* refentiel a change d'orientation... */ Eblock ATes Bblock Test(IFOU(SE22(IFNE(type_de_CalculNouveauReferentiel_courant__ ,type_de_CalculNouveauReferentiel_precedent ) ,TOUJOURS_FAUX ) ,EST_VRAI(IL_Y_A_CHANGEMENT_D_ORIENTATION_DU_REFERENTIEL) ) ) /* Lors du calcul de 'v $xiirs/EPIC.45', j'ai note que le changement de type de calcul du */ /* referentiel provoquait lui-aussi une discontinuite dans la suite des referentiels. Or */ /* cela n'est pas corrigeable (apparemment) par changement d'orientation, mais l'est */ /* en rendant non nulle (et par exemple, strictement positive) la coordonnee 'v'. C'est */ /* donc ce qui fut fait ('v $xiirs/$Fnota 20170308115859'... */ /* */ /* Le 20170310124146, je remarque donc que le test 'IFNE(...)' ci-dessus pourrait peut-etre */ /* etre supprime, ce que je tente le 20170310125912 avec le 'SE22' et le 'TOUJOURS_FAUX'... */ Bblock EGAL(orientation_du_referentiel,NEGA(orientation_du_referentiel)); /* Dans le cas ou l'un des axes a change d'orientation, alors il faut changer l'orientation */ /* du referentiel... */ Eblock ATes Bblock Eblock ETes Eblock ETes Eblock ATes Bblock Eblock ETes Eblock ATes Bblock Eblock ETes Test(IFEQ(numero_du_test_courant_d_orientation_du_referentiel,DERNIER_TEST)) /* La derniere des neuf fonctions 'Composante_[XYZ][123](...)' appelee pour le point */ /* courant doit effectuer ce qui suit : */ Bblock Test(IFNE(Coordonnee_v__courante__,Coordonnee_v__precedente)) Bblock EGAL(type_de_CalculNouveauReferentiel_precedent,type_de_CalculNouveauReferentiel_courant__); CALCUL_DES_COMPOSANTES_PRECEDENTES; /* Lors du dernier test, il faut memoriser comment fut calcule le referentiel precedent... */ Eblock ATes Bblock Eblock ETes Test(IL_FAUT(editer_le_referentiel)) /* Test introduit le 20170308174525... */ Bblock CAL3(Prme2("point=%0*d" ,NOMBRE_DE_CHIFFRES_DECIMAUX(nombre_maximal_de_points_visualisables) ,numero_du_point_courant ) ); CAL3(Prme2(" {u,v}={%+.^^^,%+.^^^}",Coordonnee_u__courante__,Coordonnee_v__courante__)); CAL3(Prme2(" referentiel(type=%d,orientation=%+g)={" ,type_de_CalculNouveauReferentiel_courant__ ,orientation_du_referentiel ) ); /* Le format "%+g" est destine a editer 'orientation_du_referentiel' comme un entier (qu'il */ /* est d'ailleurs, meme s'il est declare 'Float'). */ CALS(FPrme0("X={")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_X1_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_X2_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_X3_u_v__courante__))); CALS(FPrme0("},")); CALS(FPrme0("Y={")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Y1_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Y2_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Y3_u_v__courante__))); CALS(FPrme0("},")); CALS(FPrme0("Z={")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Z1_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Z2_u_v__courante__))); CALS(FPrme0(",")); CAL3(Prme1("%+.^^^",CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante_Z3_u_v__courante__))); CALS(FPrme0("}")); CALS(FPrme0("}\n")); Eblock ATes Bblock Eblock ETes EGAL(Coordonnee_v__precedente,Coordonnee_v__courante__); INCR(numero_du_point_courant,I); EGAL(numero_du_test_courant_d_orientation_du_referentiel,PREMIER_TEST); Eblock ATes Bblock INCR(numero_du_test_courant_d_orientation_du_referentiel,I); Eblock ETes Eblock ATes Bblock Eblock ETes Eblock ATes Bblock INCR(numero_du_point_courant,I); /* Cela ne sert a rien, mais c'est malgre tout plus correct... */ Eblock ETes RETU_VIDE; Eblock EFonctionV #define GENERE__FonctionF_Composante_XYZ(nom_et_arguments_de_la_fonction,p11,p12,p13,p21,p22,p23,p31,p32,p33) \ DEFV(FonctionF,nom_et_arguments_de_la_fonction) \ /* Introduit sous forme de fonction et non pas de 'define' afin de garantir une compilation */ \ /* sans probleme... */ \ DEFV(Argument,DEFV(Float,u)); \ DEFV(Argument,DEFV(Float,v)); \ /* Definition des coordonnees parametriques. */ \ /*-----------------------------------------------------------------------------------------------------------------------------------*/ \ Bblock \ DEFV(Float,INIT(Composante,FLOT__UNDEF)); \ /*..............................................................................................................................*/ \ CALS(test_de_l_orientation_du_referentiel(u,v)); \ /* Faut-il inverser le referentiel ? */ \ \ CalculNouveauReferentiel(Composante \ ,p11,p12,p13 \ ,p21,p22,p23 \ ,p31,p32,p33 \ ); \ \ RETU(CHANGER_EVENTUELLEMENT_L_ORIENTATION_DU_REFERENTIEL(Composante)); \ /* Definition de la composante courante avec inversion eventuelle (celle-ci fut introduite */ \ /* le 20170305080908...). */ \ Eblock BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_X1(u,v) ,ponderation_X1_X1,ponderation_X1_X2,ponderation_X1_X3 ,ponderation_X1_Y1,ponderation_X1_Y2,ponderation_X1_Y3 ,ponderation_X1_Z1,ponderation_X1_Z2,ponderation_X1_Z3 ) ) /* Definition de la composante 'X1'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_X2(u,v) ,ponderation_X2_X1,ponderation_X2_X2,ponderation_X2_X3 ,ponderation_X2_Y1,ponderation_X2_Y2,ponderation_X2_Y3 ,ponderation_X2_Z1,ponderation_X2_Z2,ponderation_X2_Z3 ) ) /* Definition de la composante 'X2'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_X3(u,v) ,ponderation_X3_X1,ponderation_X3_X2,ponderation_X3_X3 ,ponderation_X3_Y1,ponderation_X3_Y2,ponderation_X3_Y3 ,ponderation_X3_Z1,ponderation_X3_Z2,ponderation_X3_Z3 ) ) /* Definition de la composante 'X3'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Y1(u,v) ,ponderation_Y1_X1,ponderation_Y1_X2,ponderation_Y1_X3 ,ponderation_Y1_Y1,ponderation_Y1_Y2,ponderation_Y1_Y3 ,ponderation_Y1_Z1,ponderation_Y1_Z2,ponderation_Y1_Z3 ) ) /* Definition de la composante 'Y1'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Y2(u,v) ,ponderation_Y2_X1,ponderation_Y2_X2,ponderation_Y2_X3 ,ponderation_Y2_Y1,ponderation_Y2_Y2,ponderation_Y2_Y3 ,ponderation_Y2_Z1,ponderation_Y2_Z2,ponderation_Y2_Z3 ) ) /* Definition de la composante 'Y2'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Y3(u,v) ,ponderation_Y3_X1,ponderation_Y3_X2,ponderation_Y3_X3 ,ponderation_Y3_Y1,ponderation_Y3_Y2,ponderation_Y3_Y3 ,ponderation_Y3_Z1,ponderation_Y3_Z2,ponderation_Y3_Z3 ) ) /* Definition de la composante 'Y3'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Z1(u,v) ,ponderation_Z1_X1,ponderation_Z1_X2,ponderation_Z1_X3 ,ponderation_Z1_Y1,ponderation_Z1_Y2,ponderation_Z1_Y3 ,ponderation_Z1_Z1,ponderation_Z1_Z2,ponderation_Z1_Z3 ) ) /* Definition de la composante 'Z1'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Z2(u,v) ,ponderation_Z2_X1,ponderation_Z2_X2,ponderation_Z2_X3 ,ponderation_Z2_Y1,ponderation_Z2_Y2,ponderation_Z2_Y3 ,ponderation_Z2_Z1,ponderation_Z2_Z2,ponderation_Z2_Z3 ) ) /* Definition de la composante 'Z2'. */ EFonctionF BFonctionF DEFV(Local,GENERE__FonctionF_Composante_XYZ(Composante_Z3(u,v) ,ponderation_Z3_X1,ponderation_Z3_X2,ponderation_Z3_X3 ,ponderation_Z3_Y1,ponderation_Z3_Y2,ponderation_Z3_Y3 ,ponderation_Z3_Z1,ponderation_Z3_Z2,ponderation_Z3_Z3 ) ) /* Definition de la composante 'Z3'. */ EFonctionF #define d_Composante_X1(u,v) \ d_FCONSTANTES #define d_Composante_X2(u,v) \ d_FCONSTANTES #define d_Composante_X3(u,v) \ d_FCONSTANTES #define d_Composante_Y1(u,v) \ d_FCONSTANTES #define d_Composante_Y2(u,v) \ d_FCONSTANTES #define d_Composante_Y3(u,v) \ d_FCONSTANTES #define d_Composante_Z1(u,v) \ d_FCONSTANTES #define d_Composante_Z2(u,v) \ d_FCONSTANTES #define d_Composante_Z3(u,v) \ d_FCONSTANTES /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D E L ' E L L I P S E : */ /* */ /*************************************************************************************************************************************/ -define Xellipse(u,v) \ -_-_-_- MUL2(parametre_Ra,COSX(u)) -define Yellipse(u,v) \ -_-_-_- MUL2(parametre_Rb,SINX(u)) -define Zellipse(u,v) \ -_-_-_- FZERO /* Definition d'une ellipse dans le plan {OX,OZ} que l'on va ensuite amener dans le plan */ /* orthogonal a la tangente a la courbe, soit {{X1,X2,X3},{Y1,Y2,Y3},{Z1,Z2,Z3}}. */