/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T R A C E   D U   S P E C T R E  :                                                                                         */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*                    Definition du polygone "Spectre" (en notant une                                                                */
/*                  symetrie d'axe OY par rapport a 'v $xrd/spectre.01$K') :                                                         */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*                                                     C                                                                             */
/*                                                     #---------.                                                                   */
/*                                                    /    08    |                                                                   */
/*                                                   /           |                                                                   */
/*                                                  / 09      07 |                                                                   */
/*                                                 /             |                                                                   */
/*                                                .              .                                                                   */
/*                                               /                \                                                                  */
/*                                              /                  \                                                                 */
/*                                             / 10              06 \                                                                */
/*                                            /                      \                                                               */
/*                                           .                        .                                                              */
/*                                            \                      /                                                               */
/*                                             \ 11              05 /                                                                */
/*                                              \                  /                                                                 */
/*                                               \                /                                                                  */
/*                                                .              .                                                                   */
/*                                              /                 \                                                                  */
/*                                            /                 04 \                                                                 */
/*                                          /  12                   \                                                                */
/*                                      D /                          .                                                               */
/*                                      #               /\      03 /                                                                 */
/*                                      |              /  \ 02   /                                                                   */
/*                                      | 13       01 /    \   /                                                                     */
/*                                      |            /      \#                                                                       */
/*                                      |           /        B                                                                       */
/*                                      |    00    /                                                                                 */
/*                                       ---------#                                                                                  */
/*                                                A                                                                                  */
/*                                                                                                                                   */
/*                                                     .---------.                                                                   */
/*                                                    /    28    |                                                                   */
/*                                                   /           |                                                                   */
/*                                                  / 29      27 |                                                                   */
/*                                                 /             |                                                                   */
/*                                                .              .                                                                   */
/*                                               /                \                                                                  */
/*                                              /                  \                                                                 */
/*                                             / 30              26 \                                                                */
/*                                            /                      \                                                               */
/*                                           .                        .                                                              */
/*                                            \                      /                                                               */
/*                                             \ 31              25 /                                                                */
/*                                              \                  /                                                                 */
/*                                               \                /                                                                  */
/*                                                .              .                                                                   */
/*                                              /                 \                                                                  */
/*                                            /                 24 \                                                                 */
/*                                          /  32                   \                                                                */
/*                                        /                          .                                                               */
/*                                      .               /\      23 /                                                                 */
/*                                      |              /  \ 22   /                                                                   */
/*                                      | 33       21 /    \   /                                                                     */
/*                                      |            /      \/                                                                       */
/*                                      |           /                                                                                */
/*                                      |    20    /                                                                                 */
/*                                       ---------                                                                                   */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*                  Les numeros correspondent aux numeros des Contextes Graphiques                                                   */
/*                  contenant l'ORIGINE de chaque segment definissant a un cote                                                      */
/*                  et les lettres {A,B,C,D,A} au "squelette" du "Spectre"...                                                        */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xrd/spectre.14$K' :                                                                                            */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, 20230927100133).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        I N T E R F A C E   ' listG '  :                                                                                           */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        :Debut_listG:                                                                                                              */
/*        :Fin_listG:                                                                                                                */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D I R E C T I V E S   S P E C I F I Q U E S   D E   C O M P I L A T I O N  :                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        F I C H I E R S   D ' I N C L U D E S  :                                                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   NO_DEFINE_____premiers_entiers_naturels
                                        /* Et ce a cause des collisions avec 'nom_des_CONTEXTES_0' ci-apres...                       */

#include  INCLUDES_BASE
#include  image_image_CONTOURS_EXT
#include  image_image_ALPHABET_0_EXT
#include  image_image_ALPHABET_1_EXT
#include  image_image_ALPHABET_2_EXT
#include  image_image_ALPHABET_3_EXT
#include  image_image_ALPHABET_4_EXT
#include  image_image_ALPHABET_5_EXT
#include  image_image_ALPHABETS_EXT

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N S   D E S   C O N T E X T E S   G R A P H I Q U E S   D E F I N I S S A N T                            */
/*        L ' O R I G I N E   D E   C H A Q U E   S E G M E N T / C O T E   D E S   " S P E C T R E S "  ;                           */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   SOMMET_DE_REFERENCE                                                                                                           \
                    00

                                        /* Notations :                                                                               */
                                        /*                                                                                           */
                                        /*        _NM       Numeros des 14 sommets d'un spectre,                                     */
                                        /*        _s1_NM    Numeros des 4 points-clefs d'un spectre,                                 */
                                        /*        _s2_NM    Numeros des 4 points-clefs d'un cluster de niveau-1 de spectres.         */
                                        /*        _s3_NM    Numeros des 4 points-clefs d'un cluster de niveau-2 de spectres.         */
                                        /*        _s4_NM    Numeros des 4 points-clefs d'un cluster de niveau-3 de spectres.         */
                                        /*                                                                                           */
                                        /*                                                                                           */

Denumer18(INIS(_00,INDEX0)
              ,_01
              ,_02
              ,_03
              ,_04
              ,_05
              ,_06
              ,_07
              ,_08
              ,_09
              ,_10
              ,_11
              ,_12
              ,_13
              ,_s1_14
              ,_s1_15
              ,_s1_16
              ,_s1_17
         ,nom_des_CONTEXTES_0
          );
                                        /* Nota : un nombre entier decimal ne peut commencer par un "0" sous peine d'etre traite     */
                                        /* comme un nombre octal avec donc un probleme pour "08" et "09". Dans ce cas, les           */
                                        /* contextes {01,02,...,12,13} sont donc definis sur un chiffre pour {01,02,...,08,09}       */
                                        /* et sur deux chiffres pour {10,11,12,13} et ce via 'Denumer14(....)'...                    */

Denumer18(INIS(_20,20)
              ,_21
              ,_22
              ,_23
              ,_24
              ,_25
              ,_26
              ,_27
              ,_28
              ,_29
              ,_30
              ,_31
              ,_32
              ,_33
              ,_s1_34
              ,_s1_35
              ,_s1_36
              ,_s1_37
         ,nom_des_CONTEXTES_2
          );
                                        /* Pour les contextes {20,21,...,32,33} il n'y a pas de differences entre l'acces direct     */
                                        /* et l'acces indexe en ce qui concerne les numeros qui sont sur deux chiffres et qui de     */
                                        /* de plus ne peuvent pas commencer par un "0"...                                            */

Denumer12(INIS(_s2_40,40)
              ,_s2_41
              ,_s2_42
              ,_s2_43
              ,_s3_44
              ,_s3_45
              ,_s3_46
              ,_s3_47
              ,_s4_48
              ,_s4_49
              ,_s4_50
              ,_s4_51
         ,nom_des_CONTEXTES_3
          );

#define   ACCES_CONTEXTE_D(numero)                                                                                                      \
                    vecteurs_____Gcon`numero

#define   ACCES_CONTEXTE_I(numero)                                                                                                      \
                    ITb0(INDIRECT(liste_des_____vecteurs_____Gcon),numero)                                                              \
                                        /* Cas de l'acces indexe aux differents contextes graphiques...                              */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N S   D E S   T Y P E S  :                                                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

Denumer02(INIS(_Type_1,UN)
              ,_Type_2
         ,nom_des_TYPES
          );

DEFV(Local,DEFV(Int,INIT(type_courant,_Type_2)));

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N S   D E S   A N G L E S  :                                                                             */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   ROTATION_PLANE(angle)                                                                                                         \
                    NEGA(angle)

DEFV(Local,DEFV(Float,INIT(pi_sur_2,PI_SUR_2)));
DEFV(Local,DEFV(Float,INIT(pi_sur_3,PI_SUR_3)));
DEFV(Local,DEFV(Float,INIT(pi_sur_6,PI_SUR_6)));

#define   _Rzero                                                                                                                        \
                    T_ROTATION_Z(ROTATION_PLANE(FZERO))

#define   PRpis2                                                                                                                        \
                    T_ROTATION_Z(ROTATION_PLANE(NEUT(pi_sur_2)))
#define   MRpis2                                                                                                                        \
                    T_ROTATION_Z(ROTATION_PLANE(NEGA(pi_sur_2)))

#define   PRpis3                                                                                                                        \
                    T_ROTATION_Z(ROTATION_PLANE(NEUT(pi_sur_3)))
#define   MRpis3                                                                                                                        \
                    T_ROTATION_Z(ROTATION_PLANE(NEGA(pi_sur_3)))
                                        /* Rotations du type 'Trotation'...                                                          */

#define   P0pis6                                                                                                                        \
                    NEUT(GRO0(UN))
#define   M0pis6                                                                                                                        \
                    NEGA(GRO0(UN))

#define   P1pis6                                                                                                                        \
                    NEUT(GRO1(UN))
#define   M1pis6                                                                                                                        \
                    NEGA(GRO1(UN))

#define   P2pis6                                                                                                                        \
                    NEUT(GRO2(UN))
#define   M2pis6                                                                                                                        \
                    NEGA(GRO2(UN))

#define   P3pis6                                                                                                                        \
                    NEUT(GRO3(UN))
#define   M3pis6                                                                                                                        \
                    NEGA(GRO3(UN))

#define   P4pis6                                                                                                                        \
                    NEUT(GRO4(UN))
#define   M4pis6                                                                                                                        \
                    NEGA(GRO4(UN))

#define   P5pis6                                                                                                                        \
                    NEUT(GRO5(UN))
#define   M5pis6                                                                                                                        \
                    NEGA(GRO5(UN))

#define   P6pis6                                                                                                                        \
                    NEUT(GRO6(UN))
#define   M6pis6                                                                                                                        \
                    NEGA(GRO6(UN))
                                        /* Rotations du type 'Irotation'...                                                          */

#define   MINIMUM_pis6                                                                                                                  \
                    INTE(M6pis6)
#define   MAXIMUM_pis6                                                                                                                  \
                    INTE(P6pis6)

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        P O U R   F A C I L I T E R   L A   D E T E R M I N A T I O N   D E S   A N G L E S   E T   D E S   C O N T E X T E S  :   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   NUMEROTER_LES_COTES                                                                                                           \
                    VRAI
#define   NE_PAS_NUMEROTER_LES_COTES                                                                                                    \
                    NOTL(NUMEROTER_LES_COTES)
DEFV(Local,DEFV(Logical,INIT(numeroter_les_cotes,NE_PAS_NUMEROTER_LES_COTES)));

DEFV(Local,DEFV(Int,INIT(nombre_de_chiffres_des_numeros_des_cotes,DEUX)));
DEFV(Local,DEFV(Int,INIT(taille_des_caracteres_des_numeros_des_cotes,UN)));
                                        /* Pour numeroter les cotes des spectres utiles...                                           */

#define   ANGLE_DE_ROTATION(Irotation)                                                                                                  \
                    ROTATION_PLANE(MUL2(FLOT(Irotation),pi_sur_6))
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_2,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_3,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_4,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_5,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_6,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_7,P0pis6)));
DEFV(Local,DEFV(Int,INIT(angle_d_inclinaison_8,P0pis6)));
                                        /* Pour trouver experimentalement l'inclinaison d'un spectre. Il s'agit de l'argument        */
                                        /* 'Irotation' de la procedure 'NOUVEAU_SPECTRE_2(...)' en multiple de pi/6...               */
DEFV(Local,DEFV(Int,INIT(contexte_0_2,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_2,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_3,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_3,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_4,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_4,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_5,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_5,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_6,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_6,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_7,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_7,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_0_8,_s3_44)));
DEFV(Local,DEFV(Int,INIT(contexte_2_8,_s3_44)));

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N S   D E S   T R A C E S   G R A P H I Q U E S  :                                                       */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   Zcentre_normalise                                                                                                             \
                    _____cNORMALISE_OZ(Zcentre)

#define   COTE                                                                                                                          \
                    QUATRE                                                                                                              \
                                        /* Definition du nombre d'unites sur un cote.                                                */
#define   G3                                                                                                                            \
                    Bblock                                                                                                              \
                    DO(COTE                                                                                                             \
                      ,BLOC(g3;)                                                                                                        \
                       );                                                                                                               \
                    Eblock

#define   ECHELLES                                                                                                                      \
                    UN

#define   NUMEROTER_SEGMENT(numeroter,numero,numero_minimal,numero_maximal,niveau_numeros_cotes,inverser_les_numeros)                   \
                    Bblock                                                                                                              \
                    Test(IL_FAUT(numeroter))                                                                                            \
                         Bblock                                                                                                         \
                         DEFV(Int,INIT(numero_1,PRED(numero)));                                                                         \
                         DEFV(Int,INIT(numero_2,MODU(numero,numero_minimal,numero_maximal)));                                           \
                         DEFV(Int,INIT(numero_effectif                                                                                  \
                                      ,COND(IL_FAUT(inverser_les_numeros)                                                               \
                                           ,COND(IFGE(numero,_20)                                                                       \
                                                ,SOUS(numero,_20)                                                                       \
                                                ,ADD2(numero,_20)                                                                       \
                                                 )                                                                                      \
                                           ,numero                                                                                      \
                                            )                                                                                           \
                                       )                                                                                                \
                              );                                                                                                        \
                                                                                                                                        \
                         CALS(FgMIC());                                                                                                 \
                                                                                                                                        \
                         SET_CURSOR(NEUT(MOYE(ASD2(ACCES_CONTEXTE_I(numero_1),vecteurs_____cursor_3D,x)                                 \
                                             ,ASD2(ACCES_CONTEXTE_I(numero_2),vecteurs_____cursor_3D,x)                                 \
                                              )                                                                                         \
                                         )                                                                                              \
                                   ,NEUT(MOYE(ASD2(ACCES_CONTEXTE_I(numero_1),vecteurs_____cursor_3D,y)                                 \
                                             ,ASD2(ACCES_CONTEXTE_I(numero_2),vecteurs_____cursor_3D,y)                                 \
                                              )                                                                                         \
                                         )                                                                                              \
                                   ,ADD2(MOYE(ASD2(ACCES_CONTEXTE_I(numero_1),vecteurs_____cursor_3D,z)                                 \
                                             ,ASD2(ACCES_CONTEXTE_I(numero_2),vecteurs_____cursor_3D,z)                                 \
                                              )                                                                                         \
                                        ,tgEPSILON                                                                                      \
                                         )                                                                                              \
                                    );                                                                                                  \
                                        /* Le decalage de la coordonnee 'Z' est destine a garantir que les numeros apparaitront      */ \
                                        /* bien au premier plan. On notera au passage que les "Spectres" sont traces deux fois       */ \
                                        /* (voir 'fGENERE_SPECTRE_2(...)' appele deux fois dans 'NOUVEAU_SPECTRE_2(...)').           */ \
                                        /*                                                                                           */ \
                                        /* On notera de plus que ce decalage rapprochant les chiffres de l'observateur a pour effet  */ \
                                        /* un tres leger zoom sur ces derniers...                                                    */ \
                                                                                                                                        \
                         EGAL(Imessage_____facteur_scale_globale,GRO2(FRA4(FU)));                                                       \
                         CALS(Imessage(chain_numero(PRED(numero_effectif),nombre_de_chiffres_des_numeros_des_cotes)                     \
                                      ,Inoir_____NOIR                                                                                   \
                                      ,niveau_numeros_cotes                                                                             \
                                      ,taille_des_caracteres_des_numeros_des_cotes                                                      \
                                      ,FAUX                                                                                             \
                                       )                                                                                                \
                              );                                                                                                        \
                                                                                                                                        \
                         CALS(FgMOC());                                                                                                 \
                                                                                                                                        \
                         gA;                                                                                                            \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

#define   MEMORISER_LE_CONTEXTE                                                                                                         \
                    VRAI
#define   NE_PAS_MEMORISER_LE_CONTEXTE                                                                                                  \
                    NOTL(MEMORISER_LE_CONTEXTE)

#define   MARQUER_LE_CENTRE_DE_GRAVITE                                                                                                  \
                    VRAI
#define   NE_PAS_MARQUER_LE_CENTRE_DE_GRAVITE                                                                                           \
                    NOTL(MARQUER_LE_CENTRE_DE_GRAVITE)
DEFV(Local,DEFV(Logical,INIT(marquer_le_centre_de_gravite,NE_PAS_MARQUER_LE_CENTRE_DE_GRAVITE)));
DEFV(Local,DEFV(Int,INIT(nombre_de_segments,ZERO)));
DEFV(Local,DEFV(pointF_3D,centre_de_gravite));

#define   GENERE_SEGMENT(memoriser,numero,numero_minimal,numero_maximal,Trotation,numeroter,niveau_numeros_cotes,inverser_les_numeros)  \
                                        /* L'argument 'memoriser' permet de tracer le "Spectre" avec ou sans memorisation (via       */ \
                                        /* 'WCG(...)') de la definition...                                                           */ \
                    Bblock                                                                                                              \
                    Trotation;                                                                                                          \
                                                                                                                                        \
                    Test(IL_FAUT(memoriser))                                                                                            \
                         Bblock                                                                                                         \
                         WCG(ACCES_CONTEXTE_I(numero));                                                                                 \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    G3;gB;                                                                                                              \
                                                                                                                                        \
                    Test(IL_FAUT(marquer_le_centre_de_gravite))                                                                         \
                         Bblock                                                                                                         \
                         INCR(ASD1(centre_de_gravite,x),ASD2(ACCES_CONTEXTE_I(numero),vecteurs_____cursor_3D,x));                       \
                         INCR(ASD1(centre_de_gravite,y),ASD2(ACCES_CONTEXTE_I(numero),vecteurs_____cursor_3D,y));                       \
                         INCR(ASD1(centre_de_gravite,z),ASD2(ACCES_CONTEXTE_I(numero),vecteurs_____cursor_3D,z));                       \
                         INCR(nombre_de_segments,I);                                                                                    \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    NUMEROTER_SEGMENT(numeroter,numero,numero_minimal,numero_maximal,niveau_numeros_cotes,inverser_les_numeros);        \
                    Eblock

#define   MARQUER_LES_SQUELETTES_NIVEAU_0                                                                                               \
                    VRAI
#define   NE_PAS_MARQUER_LES_SQUELETTES_NIVEAU_0_NIVEAU_0                                                                               \
                    NOTL(MARQUER_LES_SQUELETTES_NIVEAU_0)
DEFV(Local,DEFV(Logical,INIT(marquer_les_squelettes_niveau_0,NE_PAS_MARQUER_LES_SQUELETTES_NIVEAU_0_NIVEAU_0)));
#define   MARQUER_LE_PREMIER_SQUELETTE_NIVEAU_0                                                                                         \
                    VRAI
#define   NE_PAS_MARQUER_LE_PREMIER_SQUELETTE_NIVEAU_0                                                                                  \
                    NOTL(MARQUER_LE_PREMIER_SQUELETTE_NIVEAU_0)
DEFV(Local,DEFV(Logical,INIT(marquer_le_premier_squelette_niveau_0,NE_PAS_MARQUER_LE_PREMIER_SQUELETTE_NIVEAU_0)));
#define   NIVEAU_DE_TRACE_DES_SQUELETTES_NIVEAU_0                                                                                       \
                    GRIS_2
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_des_squelettes_niveau_0,NIVEAU_DE_TRACE_DES_SQUELETTES_NIVEAU_0)));

#define   MARQUER_LE_SQUELETTE_NIVEAU_1                                                                                                 \
                    VRAI
#define   NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_1                                                                                          \
                    NOTL(MARQUER_LE_SQUELETTE_NIVEAU_1)
DEFV(Local,DEFV(Logical,INIT(marquer_le_squelette_niveau_1,NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_1)));
#define   NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_1                                                                                         \
                    GRIS_4
#define   INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_1                                                                            \
                    SE12(ZERO,TRENTE)
#define   NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_1(nombre)                                                                        \
                    ADD2(niveau_de_trace_du_squelette_niveau_1,MUL2(nombre,INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_1))
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_du_squelette_niveau_1,NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_1)));

#define   DEFINITION_SQUELETTE_NIVEAU_1(contexteD,contexteA)                                                                            \
                    Bblock                                                                                                              \
                    CALS(FgMIC());                                                                                                      \
                    RCG(ACCES_CONTEXTE_I(contexteD));                                                                                   \
                    WCG(ACCES_CONTEXTE_I(contexteA));                                                                                   \
                    CALS(FgMOC());                                                                                                      \
                    Eblock

#define   MARQUER_LE_SQUELETTE_NIVEAU_2                                                                                                 \
                    VRAI
#define   NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_2                                                                                          \
                    NOTL(MARQUER_LE_SQUELETTE_NIVEAU_2)
DEFV(Local,DEFV(Logical,INIT(marquer_le_squelette_niveau_2,NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_2)));
#define   NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_2                                                                                         \
                    GRIS_5
#define   INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_2                                                                            \
                    SE12(ZERO,TRENTE)
#define   NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_2(nombre)                                                                        \
                    ADD2(niveau_de_trace_du_squelette_niveau_2,MUL2(nombre,INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_2))
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_du_squelette_niveau_2,NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_2)));

#define   DEFINITION_SQUELETTE_NIVEAU_2(contexteD,contexteA)                                                                            \
                    Bblock                                                                                                              \
                    CALS(FgMIC());                                                                                                      \
                    RCG(ACCES_CONTEXTE_I(contexteD));                                                                                   \
                    WCG(ACCES_CONTEXTE_I(contexteA));                                                                                   \
                    CALS(FgMOC());                                                                                                      \
                    Eblock

#define   MARQUER_LE_SQUELETTE_NIVEAU_3                                                                                                 \
                    VRAI
#define   NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_3                                                                                          \
                    NOTL(MARQUER_LE_SQUELETTE_NIVEAU_3)
DEFV(Local,DEFV(Logical,INIT(marquer_le_squelette_niveau_3,NE_PAS_MARQUER_LE_SQUELETTE_NIVEAU_3)));
#define   NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_3                                                                                         \
                    GRIS_6
#define   INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_3                                                                            \
                    SE12(ZERO,TRENTE)
#define   NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_3(nombre)                                                                        \
                    ADD2(niveau_de_trace_du_squelette_niveau_3                                                                          \
                        ,MUL2(nombre,INCREMENT_DU_NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_3)                                                \
                         )
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_du_squelette_niveau_3,NIVEAU_DE_TRACE_DU_SQUELETTE_NIVEAU_3)));

#define   DEFINITION_SQUELETTE_NIVEAU_3(contexteD,contexteA)                                                                            \
                    Bblock                                                                                                              \
                    CALS(FgMIC());                                                                                                      \
                    RCG(ACCES_CONTEXTE_I(contexteD));                                                                                   \
                    WCG(ACCES_CONTEXTE_I(contexteA));                                                                                   \
                    CALS(FgMOC());                                                                                                      \
                    Eblock

#define   MARQUAGE_D_UN_SQUELETTE(marquer,NIVEAU_EFFECTIF,contexte0,contexte1,contexte2,contexte3)                                      \
                    Bblock                                                                                                              \
                    Test(EST_AUTORISE(vecteurs_____etat_trace))                                                                         \
                         Bblock                                                                                                         \
                         Test(IL_FAUT(marquer))                                                                                         \
                              Bblock                                                                                                    \
                              CALS(FgMIC());                                                                                            \
                              CALS(FgMIN());                                                                                            \
                                                                                                                                        \
                              RCG(ACCES_CONTEXTE_I(contexte0));                                                                         \
                              gA;                                                                                                       \
                              RCG(ACCES_CONTEXTE_I(contexte1));                                                                         \
                              SET_COULEURS(NOIR,NIVEAU_EFFECTIF(ZERO));                                                                 \
                              gB;                                                                                                       \
                              RCG(ACCES_CONTEXTE_I(contexte2));                                                                         \
                              SET_COULEURS(NOIR,NIVEAU_EFFECTIF(UN));                                                                   \
                              gB;                                                                                                       \
                              RCG(ACCES_CONTEXTE_I(contexte3));                                                                         \
                              SET_COULEURS(NOIR,NIVEAU_EFFECTIF(DEUX));                                                                 \
                              gB;                                                                                                       \
                              RCG(ACCES_CONTEXTE_I(contexte0));                                                                         \
                              SET_COULEURS(NOIR,NIVEAU_EFFECTIF(TROIS));                                                                \
                              gB;                                                                                                       \
                                                                                                                                        \
                              CALS(FgMON());                                                                                            \
                              CALS(FgMOC());                                                                                            \
                              Eblock                                                                                                    \
                         ATes                                                                                                           \
                              Bblock                                                                                                    \
                              Eblock                                                                                                    \
                         ETes                                                                                                           \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

#define   GENERE_SPECTRE_n(memoriser                                                                                                    \
                          ,co_00,co_01,co_02,co_03,co_04,co_05,co_06,co_07,co_08,co_09,co_10,co_11,co_12,co_13                          \
                          ,co_s1_14,co_s1_15,co_s1_16,co_s1_17                                                                          \
                          ,numeroter                                                                                                    \
                          ,niv,inverser_les_numeros                                                                                     \
                          ,Rotation_depart                                                                                              \
                          ,NombreMaximalSpectres                                                                                        \
                           )                                                                                                            \
                    Bblock                                                                                                              \
                    gA;                                                                                                                 \
                                        /* Debut de la definition du "Spectre" general.                                              */ \
                                                                                                                                        \
                    Test(I3ET(EST_AUTORISE(vecteurs_____etat_trace)                                                                     \
                             ,EST_FAUX(niveau_de_trace_incremental)                                                                     \
                             ,EST_VRAI(niveau_de_trace_visualisant_la_rotation)                                                         \
                              )                                                                                                         \
                         )                                                                                                              \
                         Bblock                                                                                                         \
                         DEFV(Int,INIT(niveau_visualisant_la_rotation                                                                   \
                                      ,MODU(COND(EST_FAUX(niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation)                 \
                                                ,AXPB(facteur_____du_niveau_de_trace_visualisant_la_rotation                            \
                                                     ,NEUT(Irotation_definissant_eventuellement_le_niveau)                              \
                                                     ,translation_du_niveau_de_trace_visualisant_la_rotation                            \
                                                      )                                                                                 \
                                                ,AXPB(facteur_____du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation       \
                                                     ,ABSO(Irotation_definissant_eventuellement_le_niveau)                              \
                                                     ,translation_du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation       \
                                                      )                                                                                 \
                                                 )                                                                                      \
                                           ,NOIR_PLANCHER                                                                               \
                                           ,BLANC                                                                                       \
                                            )                                                                                           \
                                       )                                                                                                \
                              );                                                                                                        \
                         EGAL(niveau_de_trace,GENP(niveau_visualisant_la_rotation));                                                    \
                                                                                                                                        \
                         SET_COULEURS(NOIR,niveau_de_trace);                                                                            \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    Test(IL_FAUT(marquer_le_centre_de_gravite))                                                                         \
                         Bblock                                                                                                         \
                         CLIR(nombre_de_segments);                                                                                      \
                         INITIALISATION_POINT_3D(centre_de_gravite,FZERO,FZERO,FZERO);                                                  \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    GENERE_SEGMENT(memoriser                                                                                            \
                                  ,co_00,co_00,co_13                                                                                    \
                                  ,_Rzero                                                                                               \
                                  ,NE_PAS_NUMEROTER_LES_COTES,niveau_numeros_cotes,inverser_les_numeros                                 \
                                   );                                                                                                   \
                                        /* Le premier numero ('co_00') ne peut apparaitre que lors de la definition du second        */ \
                                        /* segment...                                                                                */ \
                    WCG(ACCES_CONTEXTE_I(co_s1_14));                                                                                    \
                    GENERE_SEGMENT(memoriser,co_01,co_00,co_13,PRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_02,co_00,co_13,MRpis2,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    WCG(ACCES_CONTEXTE_I(co_s1_15));                                                                                    \
                    GENERE_SEGMENT(memoriser,co_03,co_00,co_13,PRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_04,co_00,co_13,PRpis2,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_05,co_00,co_13,MRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_06,co_00,co_13,PRpis2,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_07,co_00,co_13,MRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_08,co_00,co_13,PRpis2,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    WCG(ACCES_CONTEXTE_I(co_s1_16));                                                                                    \
                    GENERE_SEGMENT(memoriser,co_09,co_00,co_13,PRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_10,co_00,co_13,_Rzero,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_11,co_00,co_13,PRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    GENERE_SEGMENT(memoriser,co_12,co_00,co_13,MRpis2,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                    WCG(ACCES_CONTEXTE_I(co_s1_17));                                                                                    \
                    GENERE_SEGMENT(memoriser,co_13,co_00,co_13,PRpis3,numeroter,niveau_numeros_cotes,inverser_les_numeros);             \
                                        /* Fin de la definition du "Spectre" general.                                                */ \
                                        /*                                                                                           */ \
                                        /* On notera l'inversion des signes des rotations par rapport a 'v $xrd/spectre.01$K'...     */ \
                                                                                                                                        \
                    NUMEROTER_SEGMENT(numeroter,SUCC(co_13),co_00,co_13,niveau_numeros_cotes,inverser_les_numeros);                     \
                                        /* L'eventuel dernier numerotage est particulier puisque le sommet 'SUCC(co_13)' n'existe    */ \
                                        /* pas (c'est en fait 'co_00'...).                                                           */ \
                                                                                                                                        \
                    Test(EST_AUTORISE(vecteurs_____etat_trace))                                                                         \
                         Bblock                                                                                                         \
                         Test(IL_FAUT(marquer_les_squelettes_niveau_0))                                                                 \
                              Bblock                                                                                                    \
                              Test(IFOU(IL_FAUT(marquer_le_premier_squelette_niveau_0)                                                  \
                                       ,IFET(IL_NE_FAUT_PAS(marquer_le_premier_squelette_niveau_0)                                      \
                                            ,IZGT(nombre_de_spectres_traces)                                                            \
                                             )                                                                                          \
                                        )                                                                                               \
                                   )                                                                                                    \
                                   Bblock                                                                                               \
                                   CALS(FgMIC());                                                                                       \
                                   CALS(FgMIN());                                                                                       \
                                                                                                                                        \
                                   RCG(ACCES_CONTEXTE_I(co_s1_14));                                                                     \
                                   gA;                                                                                                  \
                                   RCG(ACCES_CONTEXTE_I(co_s1_15));                                                                     \
                                   SET_COULEURS(NOIR,niveau_de_trace_des_squelettes_niveau_0);                                          \
                                   gB;                                                                                                  \
                                   RCG(ACCES_CONTEXTE_I(co_s1_16));                                                                     \
                                   SET_COULEURS(NOIR,niveau_de_trace_des_squelettes_niveau_0);                                          \
                                   gB;                                                                                                  \
                                   RCG(ACCES_CONTEXTE_I(co_s1_17));                                                                     \
                                   SET_COULEURS(NOIR,niveau_de_trace_des_squelettes_niveau_0);                                          \
                                   gB;                                                                                                  \
                                   RCG(ACCES_CONTEXTE_I(co_s1_14));                                                                     \
                                   SET_COULEURS(NOIR,niveau_de_trace_des_squelettes_niveau_0);                                          \
                                   gB;                                                                                                  \
                                                                                                                                        \
                                   CALS(FgMON());                                                                                       \
                                   CALS(FgMOC());                                                                                       \
                                   Eblock                                                                                               \
                              ATes                                                                                                      \
                                   Bblock                                                                                               \
                                   Eblock                                                                                               \
                              ETes                                                                                                      \
                              Eblock                                                                                                    \
                         ATes                                                                                                           \
                              Bblock                                                                                                    \
                              Eblock                                                                                                    \
                         ETes                                                                                                           \
                                                                                                                                        \
                         Test(IL_FAUT(marquer_le_centre_de_gravite))                                                                    \
                              Bblock                                                                                                    \
                              EGAL(ASD1(centre_de_gravite,x),DIVI(ASD1(centre_de_gravite,x),FLOT(nombre_de_segments)));                 \
                              EGAL(ASD1(centre_de_gravite,y),DIVI(ASD1(centre_de_gravite,y),FLOT(nombre_de_segments)));                 \
                              EGAL(ASD1(centre_de_gravite,z),DIVI(ASD1(centre_de_gravite,z),FLOT(nombre_de_segments)));                 \
                                                                                                                                        \
                              CALS(FgMIC());                                                                                            \
                                                                                                                                        \
                              SET_CURSOR(ASD1(centre_de_gravite,x)                                                                      \
                                        ,ASD1(centre_de_gravite,y)                                                                      \
                                        ,ASD1(centre_de_gravite,z)                                                                      \
                                         );                                                                                             \
                                                                                                                                        \
                              gA;                                                                                                       \
                              gB;                                                                                                       \
                                                                                                                                        \
                              CALS(FgMOC());                                                                                            \
                              Eblock                                                                                                    \
                         ATes                                                                                                           \
                              Bblock                                                                                                    \
                              Eblock                                                                                                    \
                         ETes                                                                                                           \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    Test(I3ET(EST_AUTORISE(vecteurs_____etat_trace)                                                                     \
                             ,EST_VRAI(niveau_de_trace_incremental)                                                                     \
                             ,EST_FAUX(niveau_de_trace_visualisant_la_rotation)                                                         \
                              )                                                                                                         \
                         )                                                                                                              \
                         Bblock                                                                                                         \
                         DEFV(Int,INIT(niveau_incremente,MODU(ADD2(INTE(niveau_de_trace),PAS_COULEURS),NOIR_PLANCHER,BLANC)));          \
                         EGAL(niveau_de_trace,GENP(niveau_incremente));                                                                 \
                                                                                                                                        \
                         SET_COULEURS(NOIR,niveau_de_trace);                                                                            \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

#define   ROTATION_INITIALE(Rotation_depart);                                                                                           \
                    Bblock                                                                                                              \
                    INITIALISATION_SYSTEMATIQUE_TRANSFORMATION;                                                                         \
                                                                                                                                        \
                    TRZ(SOUS(PI,Rotation_depart));                                                                                      \
                    Eblock

#define   GENERE_SPECTRE_0(memoriser,niveau,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres)  \
                    Bblock                                                                                                              \
                    SET_COULEURS(NOIR,niveau);                                                                                          \
                    GENERE_SPECTRE_n(memoriser                                                                                          \
                                    ,_00,_01,_02,_03,_04,_05,_06,_07,_08,_09,_10,_11,_12,_13,_s1_14,_s1_15,_s1_16,_s1_17                \
                                    ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                                \
                                    ,Rotation_depart                                                                                    \
                                    ,NombreMaximalSpectres                                                                              \
                                     );                                                                                                 \
                                        /* Definition du "Spectre" 0.                                                                */ \
                                                                                                                                        \
                    INCR(nombre_de_spectres_traces,I);                                                                                  \
                                        /* On notera que 'GENERE_SPECTRE_0(...)' est toujours execute (ce qui fait qu'on trace       */ \
                                        /* toujours au moins un "Spectre", le "Spectre" 0...), contrairement aux suivants via        */ \
                                        /* 'NOUVEAU_SPECTRE_2(...)' qui permet de n'en tracer que 1,2,3,...                          */ \
                    Eblock
#define   GENERE_SPECTRE_2(memoriser,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres)         \
                    Bblock                                                                                                              \
                    GENERE_SPECTRE_n(memoriser                                                                                          \
                                    ,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_s1_34,_s1_35,_s1_36,_s1_37                \
                                    ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                                \
                                    ,Rotation_depart                                                                                    \
                                    ,NombreMaximalSpectres                                                                              \
                                     );                                                                                                 \
                                        /* Definition du "Spectre" 2.                                                                */ \
                    Eblock

#define   TRANSLATION_CURSOR(contexteD,contexteA)                                                                                       \
                    Bblock                                                                                                              \
                    SET_CURSOR(ADD2(ASD1(vecteurs_____cursor_3D,x)                                                                      \
                                   ,SOUS(ASD2(ACCES_CONTEXTE_I(contexteA),vecteurs_____cursor_3D,x)                                     \
                                        ,ASD2(ACCES_CONTEXTE_I(contexteD),vecteurs_____cursor_3D,x)                                     \
                                         )                                                                                              \
                                    )                                                                                                   \
                              ,ADD2(ASD1(vecteurs_____cursor_3D,y)                                                                      \
                                   ,SOUS(ASD2(ACCES_CONTEXTE_I(contexteA),vecteurs_____cursor_3D,y)                                     \
                                        ,ASD2(ACCES_CONTEXTE_I(contexteD),vecteurs_____cursor_3D,y)                                     \
                                         )                                                                                              \
                                    )                                                                                                   \
                              ,Zcentre_normalise                                                                                        \
                               );                                                                                                       \
                    Eblock

#define   NOUVEAU_SPECTRE_2_1(Irotation,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres)      \
                    Bblock                                                                                                              \
                    RCG(ACCES_CONTEXTE_D(SOMMET_DE_REFERENCE));                                                                         \
                    ROTATION_INITIALE(Rotation_depart);                                                                                 \
                    TRZ(ANGLE_DE_ROTATION(Irotation));                                                                                  \
                                                                                                                                        \
                    SET_TRACE(INTERDIT);                                                                                                \
                    CALS(fGENERE_SPECTRE_2(MEMORISER_LE_CONTEXTE                                                                        \
                                          ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                          \
                                          ,Rotation_depart                                                                              \
                                          ,NombreMaximalSpectres                                                                        \
                                           )                                                                                            \
                         );                                                                                                             \
                                                                                                                                        \
                    RCG(ACCES_CONTEXTE_D(SOMMET_DE_REFERENCE));                                                                         \
                    ROTATION_INITIALE(Rotation_depart);                                                                                 \
                    TRZ(ANGLE_DE_ROTATION(Irotation));                                                                                  \
                    Eblock
#define   NOUVEAU_SPECTRE_2_2(niveau,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres)         \
                    Bblock                                                                                                              \
                    SET_TRACE(AUTORISE);                                                                                                \
                    SET_COULEURS(NOIR,niveau);                                                                                          \
                    CALS(fGENERE_SPECTRE_2(MEMORISER_LE_CONTEXTE                                                                        \
                                          ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                          \
                                          ,Rotation_depart                                                                              \
                                          ,NombreMaximalSpectres                                                                        \
                                           )                                                                                            \
                         );                                                                                                             \
                    Eblock

DEFV(Local,DEFV(Int,INIT(Irotation_definissant_eventuellement_le_niveau,P0pis6)));
                                        /* Initialisation a priori sur le premier spectre 'GENERE_SPECTRE_0(...)'.                   */

#define   DEPLACER__0_2                                                                                                                 \
                    VRAI
#define   NE_PAS_DEPLACER__0_2                                                                                                          \
                    NOTL(DEPLACER__0_2)
#define   NOUVEAU_SPECTRE_2(deplacer__0_2                                                                                               \
                           ,niveau                                                                                                      \
                           ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                                         \
                           ,Irotation                                                                                                   \
                           ,contexteA,contexteD                                                                                         \
                           ,Rotation_depart                                                                                             \
                           ,NombreMaximalSpectres                                                                                       \
                            )                                                                                                           \
                    Bblock                                                                                                              \
                    Test(IFLT(nombre_de_spectres_traces,NombreMaximalSpectres))                                                         \
                                        /* Contrairement a 'GENERE_SPECTRE_0(...)' qui est inconditionnel, 'NOUVEAU_SPECTRE_2(...)'  */ \
                                        /* est conditionnel ce qui permet de ne tracer que 1,2,3,... "Spectre"s...                   */ \
                         Bblock                                                                                                         \
                         EGAL(Irotation_definissant_eventuellement_le_niveau,Irotation);                                                \
                                        /* Au cas ou...                                                                              */ \
                                                                                                                                        \
                         Test(IL_FAUT(deplacer__0_2))                                                                                   \
                              Bblock                                                                                                    \
                              CALS(fMOVE_SPECTRE_0_2());                                                                                \
                              Eblock                                                                                                    \
                         ATes                                                                                                           \
                              Bblock                                                                                                    \
                              Eblock                                                                                                    \
                         ETes                                                                                                           \
                                                                                                                                        \
                         CALS(fNOUVEAU_SPECTRE_2_1(Irotation                                                                            \
                                                  ,NE_PAS_NUMEROTER_LES_COTES,niveau_numeros_cotes,inverser_les_numeros                 \
                                                  ,Rotation_depart                                                                      \
                                                  ,NombreMaximalSpectres                                                                \
                                                   )                                                                                    \
                              );                                                                                                        \
                                                                                                                                        \
                         TRANSLATION_CURSOR(contexteD,contexteA);                                                                       \
                                                                                                                                        \
                         CALS(fNOUVEAU_SPECTRE_2_2(niveau                                                                               \
                                                  ,numeroter,niveau_numeros_cotes,inverser_les_numeros                                  \
                                                  ,Rotation_depart                                                                      \
                                                  ,NombreMaximalSpectres                                                                \
                                                   )                                                                                    \
                              );                                                                                                        \
                                                                                                                                        \
                         INCR(nombre_de_spectres_traces,I);                                                                             \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

#define   MOVE_SPECTRE_0_2                                                                                                              \
                    Bblock                                                                                                              \
                    MCG(vecteurs_____Gcon_00,vecteurs_____Gcon_20);                                                                     \
                    MCG(vecteurs_____Gcon_01,vecteurs_____Gcon_21);                                                                     \
                    MCG(vecteurs_____Gcon_02,vecteurs_____Gcon_22);                                                                     \
                    MCG(vecteurs_____Gcon_03,vecteurs_____Gcon_23);                                                                     \
                    MCG(vecteurs_____Gcon_04,vecteurs_____Gcon_24);                                                                     \
                    MCG(vecteurs_____Gcon_05,vecteurs_____Gcon_25);                                                                     \
                    MCG(vecteurs_____Gcon_06,vecteurs_____Gcon_26);                                                                     \
                    MCG(vecteurs_____Gcon_07,vecteurs_____Gcon_27);                                                                     \
                    MCG(vecteurs_____Gcon_08,vecteurs_____Gcon_28);                                                                     \
                    MCG(vecteurs_____Gcon_09,vecteurs_____Gcon_29);                                                                     \
                    MCG(vecteurs_____Gcon_10,vecteurs_____Gcon_30);                                                                     \
                    MCG(vecteurs_____Gcon_11,vecteurs_____Gcon_31);                                                                     \
                    MCG(vecteurs_____Gcon_12,vecteurs_____Gcon_32);                                                                     \
                    MCG(vecteurs_____Gcon_13,vecteurs_____Gcon_33);                                                                     \
                    Eblock

#define   AIDES_DIVERSES_APRES_LE_TRACE                                                                                                 \
                    Bblock                                                                                                              \
                    Test(IL_FAUT(editer_les_mises_a_jour_a_effectuer))                                                                  \
                         Bblock                                                                                                         \
                         CAL3(Prme0("Pas de mise a jour\n"));                                                                           \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    Test(IL_FAUT(trace_un_cadre_carre))                                                                                 \
                         Bblock                                                                                                         \
                         DEFV(Float,INIT(moyenne_des_extrema_Z                                                                          \
                                        ,MOYE(DRAW_____minimum_Z__trace_AUTORISE,DRAW_____maximum_Z__trace_AUTORISE)                    \
                                         )                                                                                              \
                              );                                                                                                        \
                                                                                                                                        \
                         Test(IFNE_a_peu_pres_absolu(moyenne_des_extrema_Z,Zcentre_normalise,tgEPSILON))                                \
                              Bblock                                                                                                    \
                              PRINT_ATTENTION("il y a un probleme avec la coordonnee 'Z'");                                             \
                              CAL1(Prer2("(la moyenne des extrema vaut %+.^^^ alors qu'elle devrait valoir %+.^^^)\n"                   \
                                        ,moyenne_des_extrema_Z                                                                          \
                                        ,Zcentre_normalise                                                                              \
                                         )                                                                                              \
                                   );                                                                                                   \
                              Eblock                                                                                                    \
                         ATes                                                                                                           \
                              Bblock                                                                                                    \
                              Eblock                                                                                                    \
                         ETes                                                                                                           \
                                                                                                                                        \
                         SET_COULEURS(NOIR,niveau_du_cadre);                                                                            \
                                                                                                                                        \
                         SET_CURSOR(DRAW_____minimum_X__trace_AUTORISE                                                                  \
                                   ,DRAW_____minimum_Y__trace_AUTORISE                                                                  \
                                   ,moyenne_des_extrema_Z                                                                               \
                                    );                                                                                                  \
                         gA;                                                                                                            \
                                                                                                                                        \
                         SET_CURSOR(DRAW_____maximum_X__trace_AUTORISE                                                                  \
                                   ,DRAW_____minimum_Y__trace_AUTORISE                                                                  \
                                   ,moyenne_des_extrema_Z                                                                               \
                                    );                                                                                                  \
                         gB;                                                                                                            \
                                                                                                                                        \
                         SET_CURSOR(DRAW_____maximum_X__trace_AUTORISE                                                                  \
                                   ,DRAW_____maximum_Y__trace_AUTORISE                                                                  \
                                   ,moyenne_des_extrema_Z                                                                               \
                                    );                                                                                                  \
                         gB;                                                                                                            \
                                                                                                                                        \
                         SET_CURSOR(DRAW_____minimum_X__trace_AUTORISE                                                                  \
                                   ,DRAW_____maximum_Y__trace_AUTORISE                                                                  \
                                   ,moyenne_des_extrema_Z                                                                               \
                                    );                                                                                                  \
                         gB;                                                                                                            \
                                                                                                                                        \
                         SET_CURSOR(DRAW_____minimum_X__trace_AUTORISE                                                                  \
                                   ,DRAW_____minimum_Y__trace_AUTORISE                                                                  \
                                   ,moyenne_des_extrema_Z                                                                               \
                                    );                                                                                                  \
                         gB;                                                                                                            \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        P A R A M E T R E S  :                                                                                                     */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   X_CENTRE_DU_PAVAGE                                                                                                            \
                    DIVI(FLOT(230),FLOT(dimX_BASE))
#define   Y_CENTRE_DU_PAVAGE                                                                                                            \
                    DIVI(FLOT(256),FLOT(dimY_BASE))
                                        /* Centre du pavage...                                                                       */

#define   EDITER_LES_MISES_A_JOUR_A_EFFECTUER                                                                                           \
                    FAUX                                                                                                                \
                                        /* Faut-il editer les mises a jour a effectuer dans ce '$K' ?                                */

#define   ECHELLE_GLOBALE                                                                                                               \
                    GRO5(FRA2(FU))                                                                                                      \
                                        /* Echelle globale...                                                                        */

#define   NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES                                                                                          \
                    GRIS_1
                                        /* Niveau general de trace...                                                                */

#define   NIVEAU_DE_TRACE_INCREMENTAL                                                                                                   \
                    VRAI
#define   NIVEAU_DE_TRACE_FIXE                                                                                                          \
                    NOTL(NIVEAU_DE_TRACE_INCREMENTAL)
                                        /* Gestion du niveau general de trace incremental...                                         */

#define   NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION                                                                                       \
                    VRAI
#define   NIVEAU_DE_TRACE_NE_VISUALISANT_PAS_LA_ROTATION                                                                                \
                    NOTL(NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION)

#define   FACTEUR_____DU_NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION                                                                        \
                    SEIZE
#define   TRANSLATION_DU_NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION                                                                        \
                    ADD2(GRIS_0,MOIT(COULEURS))
                                        /* On notera qu'il y 13 angles possibles {-6,-5,-4,-3,-2,-1,0,+1,+2,+3,+4,+5,+6}. La         */
                                        /* symetrie par rapport a 0 implique que la translation des niveaux soient situees au        */
                                        /* milieu de {NOIR,BLANC}. Enfin, le facteur doit etre inferieur ou egal a la translation    */
                                        /* divisee par 7 (=6+1, soit le cardinal de {0,+1,+2,+3,+4,+5,+6}) qui est egal a 18.28 ;    */
                                        /* on prend donc 16...                                                                       */

#define   NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION                                                                  \
                    VRAI
#define   NIVEAU_DE_TRACE_NE_VISUALISANT_PAS_LA_VALEUR_ABSOLUE_DE_LA_ROTATION                                                           \
                    NOTL(NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION)

#define   FACTEUR_____DU_NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION                                                   \
                    ADD2(GRO2(FACTEUR_____DU_NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION),CINQ)
#define   TRANSLATION_DU_NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION                                                   \
                    ADD2(GRIS_1,DEUX)
                                        /* Gestion du niveau general de trace visualisant la rotation. En fait il y a en "gros"      */
                                        /* un facteur 2 (a cause de la valeur absolue qui nous ramene a {0,+1,+2,+3,+4,+5,+6})       */
                                        /* avec la parametrage du cas sans valeur absolue. Les parametres par defaut placent         */
                                        /* les niveaux de remplissage dans [$GRIS_1,$GRIS_8]...                                      */

#define   NIVEAU_DU_CADRE                                                                                                               \
                    GRIS_4                                                                                                              \
                                        /* Niveau du cadre...                                                                        */

#define   ANTI_ALIASING                                                                                                                 \
                    FAUX                                                                                                                \
                                        /* Etat de l'anti-aliasing...                                                                */

#define   TRACE_UN_CADRE_CARRE                                                                                                          \
                    FAUX                                                                                                                \
                                        /* Afin de pouvoir tracer un cadre carre englobant l'ensemble des spectres...                */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        F O N C T I O N S   D E S T I N E E S   A   O P T I M I S E R   L E   C O D E  :                                           */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
DEFV(Local,DEFV(Int,INIT(nombre_de_spectres_traces,UNDEF)));

DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace,NIVEAU_UNDEF)));

DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_1,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_2,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_3,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_4,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_5,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_6,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_7,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
DEFV(Local,DEFV(genere_p,INIT(niveau_de_trace_8,NIVEAU_DE_TRACE_DE_TOUS_LES_SPECTRES)));
                                        /* Niveaux generaux de trace...                                                              */
DEFV(Local,DEFV(Logical,INIT(niveau_de_trace_incremental,NIVEAU_DE_TRACE_FIXE)));

DEFV(Local,DEFV(Logical,INIT(niveau_de_trace_visualisant_la_rotation,NIVEAU_DE_TRACE_NE_VISUALISANT_PAS_LA_ROTATION)));
DEFV(Local,DEFV(Int,INIT(facteur_____du_niveau_de_trace_visualisant_la_rotation
                        ,FACTEUR_____DU_NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION
                         )
                )
     );
DEFV(Local,DEFV(Int,INIT(translation_du_niveau_de_trace_visualisant_la_rotation
                        ,TRANSLATION_DU_NIVEAU_DE_TRACE_VISUALISANT_LA_ROTATION
                         )
                )
     );
DEFV(Local,DEFV(Logical,INIT(niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                            ,NIVEAU_DE_TRACE_NE_VISUALISANT_PAS_LA_VALEUR_ABSOLUE_DE_LA_ROTATION
                             )
                )
     );
DEFV(Local,DEFV(Int,INIT(facteur_____du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                        ,FACTEUR_____DU_NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION
                         )
                )
     );
DEFV(Local,DEFV(Int,INIT(translation_du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                        ,TRANSLATION_DU_NIVEAU_DE_TRACE_VISUALISANT_LA_VALEUR_ABSOLUE_DE_LA_ROTATION
                         )
                )
     );

BFonctionV

DEFV(Local,DEFV(FonctionV,fGENERE_SPECTRE_0(memoriser
                                           ,niveau,numeroter,niveau_numeros_cotes,inverser_les_numeros
                                           ,Rotation_depart
                                           ,NombreMaximalSpectres
                                            )
                )
     )
DEFV(Argument,DEFV(Logical,memoriser));
DEFV(Argument,DEFV(genere_p,niveau));
DEFV(Argument,DEFV(Logical,numeroter));
DEFV(Argument,DEFV(genere_p,niveau_numeros_cotes));
DEFV(Argument,DEFV(Logical,inverser_les_numeros));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(Int,NombreMaximalSpectres));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     GENERE_SPECTRE_0(memoriser,niveau,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres);

     RETU_VIDE
     Eblock

EFonctionV

BFonctionV

DEFV(Local,DEFV(FonctionV,fGENERE_SPECTRE_2(memoriser
                                           ,numeroter,niveau_numeros_cotes,inverser_les_numeros
                                           ,Rotation_depart
                                           ,NombreMaximalSpectres
                                            )
                )
     )
DEFV(Argument,DEFV(Logical,memoriser));
DEFV(Argument,DEFV(Logical,numeroter));
DEFV(Argument,DEFV(genere_p,niveau_numeros_cotes));
DEFV(Argument,DEFV(Logical,inverser_les_numeros));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(Int,NombreMaximalSpectres));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     GENERE_SPECTRE_2(memoriser,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres);

     RETU_VIDE
     Eblock

EFonctionV

BFonctionV

DEFV(Local,DEFV(FonctionV,fNOUVEAU_SPECTRE_2_1(Irotation
                                              ,numeroter,niveau_numeros_cotes,inverser_les_numeros
                                              ,Rotation_depart
                                              ,NombreMaximalSpectres
                                               )
                )
     )
DEFV(Argument,DEFV(Int,Irotation));
DEFV(Argument,DEFV(Logical,numeroter));
DEFV(Argument,DEFV(genere_p,niveau_numeros_cotes));
DEFV(Argument,DEFV(Logical,inverser_les_numeros));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(Int,NombreMaximalSpectres));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     NOUVEAU_SPECTRE_2_1(Irotation,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres);

     RETU_VIDE
     Eblock

EFonctionV

BFonctionV

DEFV(Local,DEFV(FonctionV,fNOUVEAU_SPECTRE_2_2(niveau
                                              ,numeroter,niveau_numeros_cotes,inverser_les_numeros
                                              ,Rotation_depart
                                              ,NombreMaximalSpectres
                                               )
                )
     )
DEFV(Argument,DEFV(genere_p,niveau));
DEFV(Argument,DEFV(Logical,numeroter));
DEFV(Argument,DEFV(genere_p,niveau_numeros_cotes));
DEFV(Argument,DEFV(Logical,inverser_les_numeros));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(Int,NombreMaximalSpectres));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     NOUVEAU_SPECTRE_2_2(niveau,numeroter,niveau_numeros_cotes,inverser_les_numeros,Rotation_depart,NombreMaximalSpectres);

     RETU_VIDE
     Eblock

EFonctionV

BFonctionV

DEFV(Local,DEFV(FonctionV,fMOVE_SPECTRE_0_2()))
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     MOVE_SPECTRE_0_2;

     RETU_VIDE
     Eblock

EFonctionV

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N   D E S   C L U S T E R S   D E   N I V E A U   1  :                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   GENERER_LE_CLUSTER_NIVEAU_1                                                                                                   \
                    VRAI
#define   NE_PAS_GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_1                                                                                   \
                    NOTL(GENERER_LE_CLUSTER_NIVEAU_1)

DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_1,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_2,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_3,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_4,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_5,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_6,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_7,GENERER_LE_CLUSTER_NIVEAU_1)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_1_8,GENERER_LE_CLUSTER_NIVEAU_1)));

#define   GENERATION_D_UN_CLUSTER_NIVEAU_1_1(Irotation,niveau,nombre_de_spectres,message)                                               \
                    Bblock                                                                                                              \
                    CALS(generation_d_un_cluster_niveau_1_1(ASD1(PointDepart__vecteurs_____cursor_3D,x)                                 \
                                                           ,ASD1(PointDepart__vecteurs_____cursor_3D,y)                                 \
                                                           ,ANGLE_DE_ROTATION(Irotation)                                                \
                                                           ,niveau                                                                      \
                                                           ,nombre_de_spectres                                                          \
                                                           ,message                                                                     \
                                                            )                                                                           \
                         );                                                                                                             \
                    Eblock

#define   GENERATION_D_UN_CLUSTER_NIVEAU_1_n(Irotation,niveau,nombre_de_spectres,message,contexte0,contexte2)                           \
                    Bblock                                                                                                              \
                    DEFV(pointF_3D,contexte_0__vecteurs_____cursor_3D);                                                                 \
                    DEFV(pointF_3D,contexte_2__vecteurs_____cursor_3D);                                                                 \
                                                                                                                                        \
                    DEFV(Float,INIT(translation_X,FLOT__UNDEF));                                                                        \
                    DEFV(Float,INIT(translation_Y,FLOT__UNDEF));                                                                        \
                                                                                                                                        \
                    CALS(Imove(ImageA1,ImageG));                                                                                        \
                                        /* Afin de pouvoir effacer la generation suivante qui sera en effet mal placee...            */ \
                                                                                                                                        \
                    RCG(ACCES_CONTEXTE_I(contexte0));                                                                                   \
                    TRANSFERT_POINT_3D(contexte_0__vecteurs_____cursor_3D,vecteurs_____cursor_3D);                                      \
                                                                                                                                        \
                    BSaveModifyVariable(Logical,IFsegment_____editer_le_vecteur_bidimensionnel,FAUX);                                   \
                                        /* Evidemment il ne faut pas editer les vecteurs si cela a ete demande...                    */ \
                                                                                                                                        \
                    GENERATION_D_UN_CLUSTER_NIVEAU_1_1(Irotation,niveau,nombre_de_spectres,message);                                    \
                                        /* Mise en place "invisible" du cluster sans translation a partir du point de depart         */ \
                                        /* courant 'PointDepart__vecteurs_____cursor_3D'. On calcule donc ainsi 'contexte2'...       */ \
                    ESaveModifyVariable(Logical,IFsegment_____editer_le_vecteur_bidimensionnel);                                        \
                                                                                                                                        \
                    CALS(Imove(ImageG,ImageA1));                                                                                        \
                                        /* Afin d'effacer la generation precedente qui est en effet mal placee...                    */ \
                                                                                                                                        \
                    RCG(ACCES_CONTEXTE_I(contexte2));                                                                                   \
                    TRANSFERT_POINT_3D(contexte_2__vecteurs_____cursor_3D,vecteurs_____cursor_3D);                                      \
                                                                                                                                        \
                    EGAL(translation_X,SOUS(ASD1(contexte_0__vecteurs_____cursor_3D,x),ASD1(contexte_2__vecteurs_____cursor_3D,x)));    \
                    EGAL(translation_Y,SOUS(ASD1(contexte_0__vecteurs_____cursor_3D,y),ASD1(contexte_2__vecteurs_____cursor_3D,y)));    \
                                                                                                                                        \
                    INITIALISATION_POINT_3D(PointDepart__vecteurs_____cursor_3D                                                         \
                                           ,ADD2(ASD1(PointDepart__vecteurs_____cursor_3D,x),translation_X)                             \
                                           ,ADD2(ASD1(PointDepart__vecteurs_____cursor_3D,y),translation_Y)                             \
                                           ,Zcentre_normalise                                                                           \
                                            );                                                                                          \
                                        /* Translation du point de depart courant 'PointDepart__vecteurs_____cursor_3D' qui devient  */ \
                                        /* donc le nouveau point de depart...                                                        */ \
                                                                                                                                        \
                    GENERATION_D_UN_CLUSTER_NIVEAU_1_1(Irotation,niveau,nombre_de_spectres,message);                                    \
                                        /* Mise en place "visible" du cluster avec donc translation...                               */ \
                    Eblock

#define   GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster,GENERATION_D_UN_CLUSTER)                                   \
                    Bblock                                                                                                              \
                    Test(IL_NE_FAUT_PAS(generer_le_cluster))                                                                            \
                         Bblock                                                                                                         \
                         CALS(Imove(ImageA2,ImageG));                                                                                   \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    BSaveModifyVariable(Logical                                                                                         \
                                       ,IFsegment_____editer_le_vecteur_bidimensionnel                                                  \
                                       ,COND(IL_NE_FAUT_PAS(generer_le_cluster),FAUX,IFsegment_____editer_le_vecteur_bidimensionnel)    \
                                        );                                                                                              \
                                                                                                                                        \
                    BLOC(GENERATION_D_UN_CLUSTER);                                                                                      \
                                        /* Definition du cluster...                                                                  */ \
                                                                                                                                        \
                    ESaveModifyVariable(Logical                                                                                         \
                                       ,IFsegment_____editer_le_vecteur_bidimensionnel                                                  \
                                        );                                                                                              \
                                                                                                                                        \
                    Test(IL_NE_FAUT_PAS(generer_le_cluster))                                                                            \
                         Bblock                                                                                                         \
                         CALS(Imove(ImageG,ImageA2));                                                                                   \
                                        /* Effacement du cluster...                                                                  */ \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

BFonctionV

DEFV(Local,DEFV(FonctionV,generation_d_un_cluster_niveau_1_1(X_depart,Y_depart
                                                            ,Rotation_depart
                                                            ,niveau
                                                            ,NombreMaximalSpectres
                                                            ,MessageOrigine
                                                             )
                )
     )
DEFV(Argument,DEFV(Float,X_depart));
DEFV(Argument,DEFV(Float,Y_depart));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(genere_p,niveau));
DEFV(Argument,DEFV(Int,NombreMaximalSpectres));
DEFV(Argument,DEFV(CHAR,DTb0(MessageOrigine)));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     EGAL(nombre_de_spectres_traces,ZERO);

     SET_CURSOR(X_depart
               ,Y_depart
               ,Zcentre_normalise
                );

     Test(IZGT(chain_Xtaille(MessageOrigine)))
          Bblock
          EGAL(Imessage_____facteur_scale_globale,GRO2(FRA4(FU)));
          CALS(Imessage(MessageOrigine
                       ,Inoir_____NOIR
                       ,GRIS_8
                       ,UN
                       ,FAUX
                        )
               );
          Eblock
     ATes
          Bblock
          Eblock
     ETes

     ROTATION_INITIALE(Rotation_depart);

     CALS(fGENERE_SPECTRE_0(MEMORISER_LE_CONTEXTE,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,FAUX
                           ,Rotation_depart
                           ,NombreMaximalSpectres
                            )
          );
                                        /* Definition et generation du "Spectre" central (de base)...                                */

     NOUVEAU_SPECTRE_2(NE_PAS_DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,FAUX
                      ,P3pis6,_00,_28
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     NOUVEAU_SPECTRE_2(NE_PAS_DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,FAUX
                      ,P5pis6,_04,_26
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     DEFINITION_SQUELETTE_NIVEAU_1(_21,_s2_40);

     NOUVEAU_SPECTRE_2(NE_PAS_DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,FAUX
                      ,P1pis6,_04,_20
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     NOUVEAU_SPECTRE_2(DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,VRAI
                      ,M3pis6,_09,_29
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     DEFINITION_SQUELETTE_NIVEAU_1(_33,_s2_41);

     NOUVEAU_SPECTRE_2(DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,VRAI
                      ,M1pis6,_01,_29
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     DEFINITION_SQUELETTE_NIVEAU_1(_21,_s2_42);

     NOUVEAU_SPECTRE_2(DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,VRAI
                      ,M1pis6,_05,_31
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     NOUVEAU_SPECTRE_2(DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,VRAI
                      ,P1pis6,_03,_27
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     DEFINITION_SQUELETTE_NIVEAU_1(_33,_s2_43);

     NOUVEAU_SPECTRE_2(DEPLACER__0_2,niveau,NE_PAS_NUMEROTER_LES_COTES,NIVEAU_UNDEF,VRAI
                      ,P3pis6,_02,_28
                      ,Rotation_depart
                      ,NombreMaximalSpectres
                       );

     MARQUAGE_D_UN_SQUELETTE(marquer_le_squelette_niveau_1
                            ,NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_1
                            ,_s2_40,_s2_41,_s2_42,_s2_43
                             );

     RETU_VIDE
     Eblock

EFonctionV

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D E F I N I T I O N   D E S   C L U S T E R S   D E   N I V E A U   2  :                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2                                                                                          \
                    VRAI
#define   NE_PAS_GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_1_NIVEAU_2                                                                          \
                    NOTL(GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)

DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_1,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_2,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_3,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_4,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_5,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_6,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_7,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));
DEFV(Local,DEFV(Logical,INIT(generer_le_cluster_niveau_2_8,GENERER_LE_CLUSTER_NIVEAU_1_NIVEAU_2)));

#define   GENERATION_D_UN_CLUSTER_NIVEAU_2_1(Irotation,ITrotation,niveau,message)                                                       \
                    Bblock                                                                                                              \
                    CALS(generation_d_un_cluster_niveau_2_1(ASD1(PointDepart__vecteurs_____cursor_3D,x)                                 \
                                                           ,ASD1(PointDepart__vecteurs_____cursor_3D,y)                                 \
                                                           ,ANGLE_DE_ROTATION(Irotation)                                                \
                                                           ,ITrotation                                                                  \
                                                           ,niveau                                                                      \
                                                           ,message                                                                     \
                                                            )                                                                           \
                         );                                                                                                             \
                    Eblock

#define   GENERATION_D_UN_CLUSTER_NIVEAU_2_n(Irotation,ITrotation,niveau,message,contexte0,contexte2)                                   \
                    Bblock                                                                                                              \
                    DEFV(pointF_3D,contexte_0__vecteurs_____cursor_3D);                                                                 \
                    DEFV(pointF_3D,contexte_2__vecteurs_____cursor_3D);                                                                 \
                                                                                                                                        \
                    DEFV(Float,INIT(translation_X,FLOT__UNDEF));                                                                        \
                    DEFV(Float,INIT(translation_Y,FLOT__UNDEF));                                                                        \
                                                                                                                                        \
                    CALS(Imove(ImageA3,ImageG));                                                                                        \
                                        /* Afin de pouvoir effacer la generation suivante qui sera en effet mal placee...            */ \
                                                                                                                                        \
                    RCG(ACCES_CONTEXTE_I(contexte0));                                                                                   \
                    TRANSFERT_POINT_3D(contexte_0__vecteurs_____cursor_3D,vecteurs_____cursor_3D);                                      \
                                                                                                                                        \
                    BSaveModifyVariable(Logical,IFsegment_____editer_le_vecteur_bidimensionnel,FAUX);                                   \
                                        /* Evidemment il ne faut pas editer les vecteurs si cela a ete demande...                    */ \
                                                                                                                                        \
                    GENERATION_D_UN_CLUSTER_NIVEAU_2_1(Irotation,ITrotation,niveau,message);                                            \
                                        /* Mise en place "invisible" du super-cluster sans translation a partir du point de depart   */ \
                                        /* courant 'PointDepart__vecteurs_____cursor_3D'. On calcule donc ainsi 'contexte2'...       */ \
                    ESaveModifyVariable(Logical,IFsegment_____editer_le_vecteur_bidimensionnel);                                        \
                                                                                                                                        \
                    CALS(Imove(ImageG,ImageA3));                                                                                        \
                                        /* Afin d'effacer la generation precedente qui est en effet mal placee...                    */ \
                                                                                                                                        \
                    RCG(ACCES_CONTEXTE_I(contexte2));                                                                                   \
                    TRANSFERT_POINT_3D(contexte_2__vecteurs_____cursor_3D,vecteurs_____cursor_3D);                                      \
                                                                                                                                        \
                    EGAL(translation_X,SOUS(ASD1(contexte_0__vecteurs_____cursor_3D,x),ASD1(contexte_2__vecteurs_____cursor_3D,x)));    \
                    EGAL(translation_Y,SOUS(ASD1(contexte_0__vecteurs_____cursor_3D,y),ASD1(contexte_2__vecteurs_____cursor_3D,y)));    \
                                                                                                                                        \
                    INITIALISATION_POINT_3D(PointDepart__vecteurs_____cursor_3D                                                         \
                                           ,ADD2(ASD1(PointDepart__vecteurs_____cursor_3D,x),translation_X)                             \
                                           ,ADD2(ASD1(PointDepart__vecteurs_____cursor_3D,y),translation_Y)                             \
                                           ,Zcentre_normalise                                                                           \
                                            );                                                                                          \
                                        /* Translation du point de depart courant 'PointDepart__vecteurs_____cursor_3D' qui devient  */ \
                                        /* donc le nouveau point de depart...                                                        */ \
                                                                                                                                        \
                    GENERATION_D_UN_CLUSTER_NIVEAU_2_1(Irotation,ITrotation,niveau,message);                                            \
                                        /* Mise en place "visible" du super-cluster avec donc translation...                         */ \
                    Eblock

#define   GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_super_cluster,GENERATION_D_UN_CLUSTER_NIVEAU_2)                    \
                    Bblock                                                                                                              \
                    Test(IL_NE_FAUT_PAS(generer_le_super_cluster))                                                                      \
                         Bblock                                                                                                         \
                         CALS(Imove(ImageA4,ImageG));                                                                                   \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                                                                                                                                        \
                    BSaveModifyVariable(Logical                                                                                         \
                                       ,IFsegment_____editer_le_vecteur_bidimensionnel                                                  \
                                       ,COND(IL_NE_FAUT_PAS(generer_le_super_cluster)                                                   \
                                            ,FAUX                                                                                       \
                                            ,IFsegment_____editer_le_vecteur_bidimensionnel                                             \
                                             )                                                                                          \
                                        );                                                                                              \
                                                                                                                                        \
                    BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2);                                                                             \
                                        /* Definition du super-cluster...                                                            */ \
                                                                                                                                        \
                    ESaveModifyVariable(Logical                                                                                         \
                                       ,IFsegment_____editer_le_vecteur_bidimensionnel                                                  \
                                        );                                                                                              \
                                                                                                                                        \
                    Test(IL_NE_FAUT_PAS(generer_le_super_cluster))                                                                      \
                         Bblock                                                                                                         \
                         CALS(Imove(ImageG,ImageA4));                                                                                   \
                                        /* Effacement du super-cluster...                                                            */ \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

DEFV(Local,DEFV(Float,INIT(X_centre_du_pavage,X_CENTRE_DU_PAVAGE)));
DEFV(Local,DEFV(Float,INIT(Y_centre_du_pavage,Y_CENTRE_DU_PAVAGE)));
                                        /* Centre du pavage...                                                                       */

DEFV(Local,DEFV(pointF_3D,PointDepart__vecteurs_____cursor_3D));

BFonctionV

DEFV(Local,DEFV(FonctionV,generation_d_un_cluster_niveau_2_1(X_depart,Y_depart,Rotation_depart,ITrotation,niveau,MessageOrigine)))
DEFV(Argument,DEFV(Float,X_depart));
DEFV(Argument,DEFV(Float,Y_depart));
DEFV(Argument,DEFV(Float,Rotation_depart));
DEFV(Argument,DEFV(Int,ITrotation));
DEFV(Argument,DEFV(genere_p,niveau));
DEFV(Argument,DEFV(CHAR,DTb0(MessageOrigine)));
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     /*..............................................................................................................................*/
     SET_CURSOR(X_depart
               ,Y_depart
               ,Zcentre_normalise
                );

     EGAL(niveau_de_trace,niveau);

     Test(IZGT(chain_Xtaille(MessageOrigine)))
          Bblock
          EGAL(Imessage_____facteur_scale_globale,GRO2(FRA4(FU)));
          CALS(Imessage(MessageOrigine
                       ,Inoir_____NOIR
                       ,GRIS_8
                       ,UN
                       ,FAUX
                        )
               );
          Eblock
     ATes
          Bblock
          Eblock
     ETes

     begin_nouveau_block
          Bblock
          DEFV(pointF_3D,Save_PointDepart__vecteurs_____cursor_3D);

          ROTATION_INITIALE(Rotation_depart);

          TRANSFERT_POINT_3D(Save_PointDepart__vecteurs_____cursor_3D,PointDepart__vecteurs_____cursor_3D);

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_1
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_1(ADD2(M1pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,HUIT
                                                                                                 ,C_VIDE
                                                                                                  );
                                                               )
                                                          );
                                        /* Definition du cluster 1.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_2
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(M5pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_40,_s2_40
                                                                                                  );
                                                               DEFINITION_SQUELETTE_NIVEAU_2(_s2_43,_s3_44);
                                                               )
                                                          );
                                        /* Definition du cluster 2.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_3
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(M3pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_42,_s2_40
                                                                                                  );
                                                               DEFINITION_SQUELETTE_NIVEAU_2(_s2_42,_s3_45);
                                                               )
                                                          );
                                        /* Definition du cluster 3.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_4
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(M3pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_41,_s2_43
                                                                                                  );
                                                               )
                                                          );
                                        /* Definition du cluster 4.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_5
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(M1pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_42,_s2_40
                                                                                                  );
                                                               DEFINITION_SQUELETTE_NIVEAU_2(_s2_43,_s3_46);
                                                               )
                                                          );
                                        /* Definition du cluster 5.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_6
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(P1pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_42,_s2_40
                                                                                                  );
                                                               )
                                                          );
                                        /* Definition du cluster 6.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_7
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(P1pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_41,_s2_43
                                                                                                  );
                                                               )
                                                          );
                                        /* Definition du cluster 7.                                                                  */

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_1(generer_le_cluster_niveau_1_8
                                                         ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_1_n(ADD2(P3pis6,ITrotation)
                                                                                                 ,niveau
                                                                                                 ,NEUF
                                                                                                 ,C_VIDE
                                                                                                 ,_s2_42,_s2_40
                                                                                                  );
                                                               DEFINITION_SQUELETTE_NIVEAU_2(_s2_42,_s3_47);
                                                               )
                                                          );

          MARQUAGE_D_UN_SQUELETTE(marquer_le_squelette_niveau_2
                                 ,NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_2
                                 ,_s3_44,_s3_45,_s3_46,_s3_47
                                  );

          TRANSFERT_POINT_3D(PointDepart__vecteurs_____cursor_3D,Save_PointDepart__vecteurs_____cursor_3D);
          Eblock
     end_nouveau_block

     RETU_VIDE
     Eblock

EFonctionV

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T R A C E   D U   S P E C T R E  :                                                                                         */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));

     DEFV(Logical,INIT(editer_les_mises_a_jour_a_effectuer,EDITER_LES_MISES_A_JOUR_A_EFFECTUER));
                                        /* Pour editer les mises a jour a effectuer dans ce '$K' pour la prochaine iteration...      */

     DEFV(Float,INIT(echelle_globale,ECHELLE_GLOBALE));
                                        /* Echelle globale...                                                                        */

     DEFV(Logical,INIT(anti_aliasing,ANTI_ALIASING));
                                        /* Etat de l'anti-aliasing...                                                                */

     DEFV(Logical,INIT(trace_un_cadre_carre,TRACE_UN_CADRE_CARRE));
                                        /* Afin de pouvoir tracer un cadre carre englobant l'ensemble des spectres...                */
     DEFV(genere_p,INIT(niveau_du_cadre,NIVEAU_DU_CADRE));
                                        /* Niveau general de trace...                                                                */
     /*..............................................................................................................................*/
     GET_ARGUMENTSv(nombre_d_arguments
                   ,BLOC(GET_ARGUMENT_L("SX_SY_SZ_____compatibilite_20070416=""compatibilite_20070416="
                                       ,SX_SY_SZ_____compatibilite_20070416
                                        );
                         GET_ARGUMENT_L("Ipoint_anti_aliase_segment_____compatibilite_20110420=""compatibilite_20110420="
                                       ,Ipoint_anti_aliase_segment_____compatibilite_20110420
                                        );

                         GET_ARGUMENT_C("imageR=""R=",nom_imageR);

                         GET_ARGUMENT_I("type=",type_courant);

                         GET_ARGUMENT_F("pis2=""p2=",pi_sur_2);
                         GET_ARGUMENT_F("pis3=""p3=",pi_sur_3);
                         GET_ARGUMENT_F("pis6=""p6=",pi_sur_6);

                         GET_ARGUMENT_F("X_centre=""Xc=",X_centre_du_pavage);
                         GET_ARGUMENT_F("Y_centre=""Yc=",Y_centre_du_pavage);

                         GET_ARGUMENT_L("symetrie_X=""sX=",IFsegment_____symetrie_par_rapport_a_l_axe_X);
                         GET_ARGUMENT_L("symetrie_Y=""sY=",IFsegment_____symetrie_par_rapport_a_l_axe_Y);
                                        /* Arguments introduits le 20231001102627...                                                 */

                         GET_ARGUMENT_L("mises_a_jour=""maj=",editer_les_mises_a_jour_a_effectuer);

                         GET_ARGUMENT_L("numeroter_cotes=""nc=",numeroter_les_cotes);

                         GET_ARGUMENT_I("angle_inclinaison_2=""ai2=",angle_d_inclinaison_2);
                         GET_ARGUMENT_I("angle_inclinaison_3=""ai3=",angle_d_inclinaison_3);
                         GET_ARGUMENT_I("angle_inclinaison_4=""ai4=",angle_d_inclinaison_4);
                         GET_ARGUMENT_I("angle_inclinaison_5=""ai5=",angle_d_inclinaison_5);
                         GET_ARGUMENT_I("angle_inclinaison_6=""ai6=",angle_d_inclinaison_6);
                         GET_ARGUMENT_I("angle_inclinaison_7=""ai7=",angle_d_inclinaison_7);
                         GET_ARGUMENT_I("angle_inclinaison_8=""ai8=",angle_d_inclinaison_8);

                         GET_ARGUMENT_I("contexte_0_2=""c02=",contexte_0_2);
                         GET_ARGUMENT_I("contexte_2_2=""c22=",contexte_2_2);
                         GET_ARGUMENT_I("contexte_0_3=""c03=",contexte_0_3);
                         GET_ARGUMENT_I("contexte_2_3=""c23=",contexte_2_3);
                         GET_ARGUMENT_I("contexte_0_4=""c04=",contexte_0_4);
                         GET_ARGUMENT_I("contexte_2_4=""c24=",contexte_2_4);
                         GET_ARGUMENT_I("contexte_0_5=""c05=",contexte_0_5);
                         GET_ARGUMENT_I("contexte_2_5=""c25=",contexte_2_5);
                         GET_ARGUMENT_I("contexte_0_6=""c06=",contexte_0_6);
                         GET_ARGUMENT_I("contexte_2_6=""c26=",contexte_2_6);
                         GET_ARGUMENT_I("contexte_0_7=""c07=",contexte_0_7);
                         GET_ARGUMENT_I("contexte_2_7=""c27=",contexte_2_7);
                         GET_ARGUMENT_I("contexte_0_8=""c08=",contexte_0_8);
                         GET_ARGUMENT_I("contexte_2_8=""c28=",contexte_2_8);

                         GET_ARGUMENT_L("cluster_1=""cl1=""cluster_1_1=""cl11=",generer_le_cluster_niveau_1_1);
                         GET_ARGUMENT_L("cluster_2=""cl2=""cluster_1_2=""cl12=",generer_le_cluster_niveau_1_2);
                         GET_ARGUMENT_L("cluster_3=""cl3=""cluster_1_3=""cl13=",generer_le_cluster_niveau_1_3);
                         GET_ARGUMENT_L("cluster_4=""cl4=""cluster_1_4=""cl14=",generer_le_cluster_niveau_1_4);
                         GET_ARGUMENT_L("cluster_5=""cl5=""cluster_1_5=""cl15=",generer_le_cluster_niveau_1_5);
                         GET_ARGUMENT_L("cluster_6=""cl6=""cluster_1_6=""cl16=",generer_le_cluster_niveau_1_6);
                         GET_ARGUMENT_L("cluster_7=""cl7=""cluster_1_7=""cl17=",generer_le_cluster_niveau_1_7);
                         GET_ARGUMENT_L("cluster_8=""cl8=""cluster_1_8=""cl18=",generer_le_cluster_niveau_1_8);

                         GET_ARGUMENT_L("super_cluster_1=""scl1=""cluster_2_1=""cl21=",generer_le_cluster_niveau_2_1);
                         GET_ARGUMENT_L("super_cluster_2=""scl2=""cluster_2_2=""cl22=",generer_le_cluster_niveau_2_2);
                         GET_ARGUMENT_L("super_cluster_3=""scl3=""cluster_2_3=""cl23=",generer_le_cluster_niveau_2_3);
                         GET_ARGUMENT_L("super_cluster_4=""scl4=""cluster_2_4=""cl24=",generer_le_cluster_niveau_2_4);
                         GET_ARGUMENT_L("super_cluster_5=""scl5=""cluster_2_5=""cl25=",generer_le_cluster_niveau_2_5);
                         GET_ARGUMENT_L("super_cluster_6=""scl6=""cluster_2_6=""cl26=",generer_le_cluster_niveau_2_6);
                         GET_ARGUMENT_L("super_cluster_7=""scl7=""cluster_2_7=""cl27=",generer_le_cluster_niveau_2_7);
                         GET_ARGUMENT_L("super_cluster_8=""scl8=""cluster_2_8=""cl28=",generer_le_cluster_niveau_2_8);

                         GET_ARGUMENT_L("squelettes=""ms=""squelette_0=""ms0=",marquer_les_squelettes_niveau_0);
                         GET_ARGUMENT_L("premier_squelette=""mps=""premier_squelette_0=""mps0=",marquer_le_premier_squelette_niveau_0);
                         GET_ARGUMENT_P("niveau_squelette=""ns=""niveau_squelette_0=""ns0=",niveau_de_trace_des_squelettes_niveau_0);
                                        /* Le marquage optionnel du premier squelette est lie a l'existence des deux "clusters"      */
                                        /* interessant de "Spectres"s (incluant un "Mystic" au passage) pour lesquels le premier     */
                                        /* squelette ne doit pas etre marque...                                                      */

                         GET_ARGUMENT_L("super_squelette=""mss=""squelette_1=""ms1="
                                       ,marquer_le_squelette_niveau_1
                                        );
                         GET_ARGUMENT_P("niveau_super_squelette=""nss=""niveau_squelette_1=""ns1="
                                       ,niveau_de_trace_du_squelette_niveau_1
                                        );

                         GET_ARGUMENT_L("super_super_squelette=""msss=""squelette_2=""ms2="
                                       ,marquer_le_squelette_niveau_2
                                        );
                         GET_ARGUMENT_P("niveau_super_super_squelette=""nsss=""niveau_squelette_2=""ns2="
                                       ,niveau_de_trace_du_squelette_niveau_2
                                        );

                         GET_ARGUMENT_L("super_super_super_squelette=""mssss=""squelette_3=""ms3="
                                       ,marquer_le_squelette_niveau_3
                                        );
                         GET_ARGUMENT_P("niveau_super_super_super_squelette=""nssss=""niveau_squelette_3=""ns3="
                                       ,niveau_de_trace_du_squelette_niveau_3
                                        );

                         GET_ARGUMENT_L("centre_gravite=""G=",marquer_le_centre_de_gravite);

                         GET_ARGUMENT_F("echelle=",echelle_globale);

                         GET_ARGUMENT_P("niveau_1=""n1=",niveau_de_trace_1);
                         GET_ARGUMENT_P("niveau_2=""n2=",niveau_de_trace_2);
                         GET_ARGUMENT_P("niveau_3=""n3=",niveau_de_trace_3);
                         GET_ARGUMENT_P("niveau_4=""n4=",niveau_de_trace_4);
                         GET_ARGUMENT_P("niveau_5=""n5=",niveau_de_trace_5);
                         GET_ARGUMENT_P("niveau_6=""n6=",niveau_de_trace_6);
                         GET_ARGUMENT_P("niveau_7=""n7=",niveau_de_trace_7);
                         GET_ARGUMENT_P("niveau_8=""n8=",niveau_de_trace_8);

                         GET_ARGUMENT_L("niveau_incremental=""ni=",niveau_de_trace_incremental);

                         GET_ARGUMENT_L("niveau_rotation=""nr=",niveau_de_trace_visualisant_la_rotation);
                         GET_ARGUMENT_I("Aniveau_rotation=""Anr=",facteur_____du_niveau_de_trace_visualisant_la_rotation);
                         GET_ARGUMENT_I("Bniveau_rotation=""Bnr=",translation_du_niveau_de_trace_visualisant_la_rotation);

                         GET_ARGUMENT_L("niveau_rotation_absolue=""nra="
                                       ,niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                                        );
                         GET_ARGUMENT_I("Aniveau_rotation_absolue=""Anra="
                                       ,facteur_____du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                                        );
                         GET_ARGUMENT_I("Bniveau_rotation_absolue=""Bnra="
                                       ,translation_du_niveau_de_trace_visualisant_la_valeur_absolue_de_la_rotation
                                        );

                         GET_ARGUMENT_L("anti_aliasing=""aa=",anti_aliasing);
                         GET_ARGUMENT_L("editer_vecteurs=""ev=",IFsegment_____editer_le_vecteur_bidimensionnel);
                         GET_ARGUMENT_L("trier_vecteurs=""tv=",IFsegment_____trier_puis_editer_le_vecteur_bidimensionnel);
                                        /* L'argument de tri a ete introduit le 20231012142717...                                    */

                         GET_ARGUMENT_L("cadre=""cc=",trace_un_cadre_carre);
                         GET_ARGUMENT_P("niveau_cadre=""nk=",niveau_du_cadre);
                         )
                    );

     Test(IFNE(SOMMET_DE_REFERENCE,_00))
          Bblock
          PRINT_ERREUR("le numerotage des contextes graphiques est incoherent, on aborte donc");
          CAL1(Prer2("(le sommet de reference est %d alors que le premier contexte est %d)\n",SOMMET_DE_REFERENCE,_00));

          Exit(PROBLEMES);
          Eblock
     ATes
          Bblock
          Eblock
     ETes


#define   CHECK_CONTEXTE(contexte_numero,nom_du_contexte)                                                                               \
                    Bblock                                                                                                              \
                    Test(NINCff(contexte_numero,_s3_44,_s3_47))                                                                         \
                         Bblock                                                                                                         \
                         CAL1(Prer1("le numero de contexte_numero %s est mauvais, il est donc reinitialise",nom_du_contexte));          \
                         EGAL(contexte_numero,_s3_44);                                                                                  \
                         Eblock                                                                                                         \
                    ATes                                                                                                                \
                         Bblock                                                                                                         \
                         Eblock                                                                                                         \
                    ETes                                                                                                                \
                    Eblock

     CHECK_CONTEXTE(contexte_0_2,"0_2");
     CHECK_CONTEXTE(contexte_2_2,"2_2");

     CHECK_CONTEXTE(contexte_0_3,"0_3");
     CHECK_CONTEXTE(contexte_2_3,"2_3");

     CHECK_CONTEXTE(contexte_0_4,"0_4");
     CHECK_CONTEXTE(contexte_2_4,"2_4");

     CHECK_CONTEXTE(contexte_0_5,"0_5");
     CHECK_CONTEXTE(contexte_2_5,"2_5");

     CHECK_CONTEXTE(contexte_0_6,"0_6");
     CHECK_CONTEXTE(contexte_2_6,"2_6");

     CHECK_CONTEXTE(contexte_0_7,"0_7");
     CHECK_CONTEXTE(contexte_2_7,"2_7");

     CHECK_CONTEXTE(contexte_0_8,"0_8");
     CHECK_CONTEXTE(contexte_2_8,"2_8");

     Test(IL_FAUT(numeroter_les_cotes))
          Bblock
          EGAL(FgL0_00_____remplacer_par_un_O,VRAI);
                                        /* Pour plus de lisibilite...                                                                */
          Eblock
     ATes
          Bblock
          Eblock
     ETes

     EGAL(IFsegment_____X_centre_des_symetries_par_rapport_aux_axes_X_et_Y,X_centre_du_pavage);
     EGAL(IFsegment_____Y_centre_des_symetries_par_rapport_aux_axes_X_et_Y,Y_centre_du_pavage);
                                        /* A priori (introduit le 20231001102627)...                                                 */

     SUPER_ECHELLE_PETIT_CARRE;
                                        /* Choix du format des figures obtenues :                                                    */
                                        /*                                                                                           */
                                        /*                  SUPER_ECHELLE_RECTANGULAIRE;                                             */
                                        /*                  SUPER_ECHELLE_PETIT_CARRE;                                               */
                                        /*                  SUPER_ECHELLE_GRAND_CARRE;                                               */
                                        /*                                                                                           */

     CALi(Inoir(ImageR));
                                        /* Initialisation de l'image Resultat.                                                       */

     CALS(FgERASE());
                                        /* Clear...                                                                                  */
     SET_FILTRAGE(ACTIF);

     CALS(Iinit_Z_Buffer());
     SET_ANTI_ALIASING(anti_aliasing);

     SKH(ECHELLES);
                                        /* Definition de l'echelle globale.                                                          */
     SXH(ECHELLES);
                                        /* Definition de l'echelle sur l'axe des 'X'.                                                */
     SYH(ECHELLES);
                                        /* Definition de l'echelle sur l'axe des 'Y'.                                                */

     SKH(echelle_globale);
                                        /* Changement de l'echelle globale.                                                          */

     SET_TRACE(AUTORISE);
     EGAL(DRAW_____initialiser_les_extrema_de_X_Y_Z,VRAI);

     begin_nouveau_block
          Bblock
          INITIALISATION_POINT_3D(PointDepart__vecteurs_____cursor_3D,X_centre_du_pavage,Y_centre_du_pavage,Zcentre_normalise);

          GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_1
                                                         ,BLOC(
                                                               BSaveModifyVariable(Logical,generer_le_cluster_niveau_1_6,FAUX);

                                                               GENERATION_D_UN_CLUSTER_NIVEAU_2_1(M1pis6,P0pis6
                                                                                                 ,niveau_de_trace_1
                                                                                                 ,C_VIDE
                                                                                                  );

                                                               ESaveModifyVariable(Logical,generer_le_cluster_niveau_1_6);
                                                               )
                                                          );
                                        /* Definition du "cluster de base"...                                                        */

          Choi(type_courant)
               Bblock
               Ca1e(_Type_1)
                                        /* Le cluster '_Type_1' est incorrect car, en effet, ses differents clusters "peripheriques" */
                                        /* n'entourent pas le premier, mais je le garde malgre tout, cela peut servir...             */
                    Bblock
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_2
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P4pis6,P4pis6
                                                                                                           ,niveau_de_trace_2
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_44,_s3_44
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_47,_s4_48);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_3
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M6pis6,M6pis6
                                                                                                           ,niveau_de_trace_3
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_46,_s4_49);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_4
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M6pis6,M6pis6
                                                                                                           ,niveau_de_trace_4
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_46,_s3_44
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_5
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M4pis6,M4pis6
                                                                                                           ,niveau_de_trace_5
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_47,_s4_50);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_6
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M2pis6,M2pis6
                                                                                                           ,niveau_de_trace_6
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_7
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M2pis6,M2pis6
                                                                                                           ,niveau_de_trace_7
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_46,_s3_44
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_8
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P0pis6,P0pis6
                                                                                                           ,niveau_de_trace_8
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_46,_s4_51);
                                                                         )
                                                                    );
                    Eblock
               ECa1

               Ca1e(_Type_2)
                                        /* Le cluster '_Type_2' a ete obtenu grace a l'image 'v $xiio/SMIT.11.X1.8' apres rotation   */
                                        /* (via 'v $xci/rotate$K') de 2.1 radians...                                                 */
                    Bblock
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_2
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M4pis6,M4pis6
                                                                                                           ,niveau_de_trace_2
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_44,_s3_44
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_47,_s4_48);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_3
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M2pis6,M2pis6
                                                                                                           ,niveau_de_trace_3
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_46,_s4_49);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_4
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(M2pis6,M2pis6
                                                                                                           ,niveau_de_trace_4
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_46,_s3_44
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_5
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P0pis6,P0pis6
                                                                                                           ,niveau_de_trace_5
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_47,_s4_50);
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_6
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P2pis6,P2pis6
                                                                                                           ,niveau_de_trace_6
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_7
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P2pis6,P2pis6
                                                                                                           ,niveau_de_trace_7
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_46,_s3_44
                                                                                                            );
                                                                         )
                                                                    );
                    GENERATION_CONDITIONNELLE_D_UN_CLUSTER_NIVEAU_2(generer_le_cluster_niveau_2_8
                                                                   ,BLOC(GENERATION_D_UN_CLUSTER_NIVEAU_2_n(P4pis6,P4pis6
                                                                                                           ,niveau_de_trace_8
                                                                                                           ,C_VIDE
                                                                                                           ,_s3_47,_s3_45
                                                                                                            );
                                                                         DEFINITION_SQUELETTE_NIVEAU_3(_s3_46,_s4_51);
                                                                         )
                                                                    );
                    Eblock
               ECa1

               Defo
                    Bblock
                    PRINT_ERREUR("le type demande n'existe pas");
                    Eblock
               EDef
               Eblock
          ECho

          MARQUAGE_D_UN_SQUELETTE(marquer_le_squelette_niveau_3
                                 ,NIVEAU_EFFECTIF_DE_TRACE_DU_SQUELETTE_NIVEAU_3
                                 ,_s4_48,_s4_49,_s4_50,_s4_51
                                  );
          Eblock
     end_nouveau_block

     AIDES_DIVERSES_APRES_LE_TRACE;

     SET_FILTRAGE(INACTIF);

     CALS(Imove(ImageR,ImageG));

     CALi(Iupdate_image(nom_imageR,ImageR));

     RETU_Commande;
     Eblock
ECommande



Copyright © Jean-François COLONNA, 2023-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2023-2024.