/*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N D ' U N E T R A N S F O R M A T I O N A U T O - S I M I L A I R E */ /* D E H I L B E R T D A N S [ 0 , 1 ] x [ 0 , 1 ] O U [ 0 , 1 ] x [ 0 , 1 ] x [ 0 , 1 ] : */ /* */ /* */ /* Probleme de terminologie (le 20230106115142) : */ /* */ /* On notera un probleme dans les */ /* noms donnes aux programmes : */ /* */ /* $xci/valeurs_TransformationPeano2D$I */ /* $xci/valeurs_TransformationPeano2D$K */ /* $xci/valeurs_TransformationPeano3D$K */ /* */ /* qui devraient s'appeler 'Hilbert' */ /* et non pas 'Peano', ainsi qu'a 55 */ /* images 'PEAN's qui devraient s'appeler */ /* en fait 'HILB's. Tout cela est precise */ /* dans 'v $xiirv/$Fnota 20230106103125'... */ /* */ /* */ /* Author of '$xci/valeurs_TransformationPeano2D$I' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20220426130808). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #define MISE_EN_PLACE_D_UNE_LISTE_DE_SUBSTITUTION(nom_paletteA \ ,nom_de_la_substitution_de_definition \ ,substitution_courante_de_definition \ ,liste_flottante_substitution_de_definition \ ,lissage_de_la_substitution_de_definition \ ,nombre_de_passes_de_lissage_de_la_substitution_de_definition \ ,pas_de_lissage_de_la_substitution_de_definition \ ,minimum_de_la_substitution_de_definition \ ,maximum_de_la_substitution_de_definition \ ,generer_avec_une_liste_de_substitution \ ) \ Bblock \ Test(IL_FAUT(remplacer_les_listes_de_substitution_par_des_listes_quelconques)) \ /* Possibilite introduite le 20220513110909... */ \ Bblock \ EGAL(generer_avec_une_liste_de_substitution,VRAI); \ /* On fait comme si une liste de substitution allait etre utilisee... */ \ Eblock \ ATes \ Bblock \ Test(IFNE_chaine(nom_paletteA,NOM_PIPE)) \ Bblock \ CALS(Iload_palette_de_couleurs(nom_paletteA,ESPACE_DE_COULEURS_RVB)); \ \ Test(IFNE_chaine(nom_de_la_substitution_de_definition,NOM_UNDEF)) \ Bblock \ RECHERCHE_D_UNE_LISTE_DE_SUBSTITUTION(nom_de_la_substitution_de_definition \ ,substitution_courante_de_definition \ ,substitution_courante_de_definition \ ); \ /* Tentative de recherche de la substitution demandee... */ \ Eblock \ ATes \ Bblock \ Eblock \ ETes \ \ PUSH_SUBSTITUTION; \ /* Sauvegarde de la SUBSTITUTION courante. */ \ SUBSTITUTION(substitution_courante_de_definition); \ /* Mise en place de la SUBSTITUTION demandee. */ \ PUSH_FILTRAGE; \ /* Sauvegarde de l'etat courant du filtrage des niveaux. */ \ SET_FILTRAGE(ACTIF); \ /* Et on active le filtrage puisque la fonction 'Nsubstitution(...)' va etre utilisee */ \ /* ci-apres dans 'CONVERSION_FLOTTANTE_D_UNE_LISTE_DE_SUBSTITUTION(...)'. */ \ \ CONVERSION_FLOTTANTE_D_UNE_LISTE_DE_SUBSTITUTION \ (liste_flottante_substitution_de_definition \ ,minimum_de_la_substitution_de_definition \ ,maximum_de_la_substitution_de_definition \ ,lissage_de_la_substitution_de_definition \ ,nombre_de_passes_de_lissage_de_la_substitution_de_definition \ ,pas_de_lissage_de_la_substitution_de_definition \ ); \ \ PULL_FILTRAGE; \ PULL_SUBSTITUTION; \ /* Et restauration des conditions initiales... */ \ \ EGAL(generer_avec_une_liste_de_substitution,VRAI); \ Eblock \ ATes \ Bblock \ Eblock \ ETes \ Eblock \ ETes \ Eblock \ /* Mise en place d'une liste de substitution definissant 'f1x(...)', 'f1y(...)' ou */ \ /* encore 'f1y(...)' (dans le cas de 'v $xci/valeurs_TransformationPeano3D$K'... */ #define INTERPOLATION_DE_LA_SUBSTITUTION(liste_flottante_substitution_de_definition \ ,interpoler \ ,lineairement \ ,derivee_origine \ ,derivee_extremite \ ,ELEMENT_DU_FICHIER_LISTE \ ) \ Bblock \ Test(IL_FAUT(remplacer_les_listes_de_substitution_par_des_listes_quelconques)) \ /* Possibilite introduite le 20220513111510... */ \ Bblock \ DEFV(Float,INIT(index_flottant,HOMO(t,minimum_t,maximum_t,INDEX0,TRMU(nombre_d_elements)))); \ DEFV(Int,INIT(index_entier,UNDEF)); \ DEFV(Int,INIT(index_entier_maximal,LSTX(PREMIER_ELEMENT_D_UN_FICHIER,nombre_d_elements))); \ \ EGAL(index_entier,INTE(index_flottant)); \ \ Test(IL_NE_FAUT_PAS(interpoler_les_listes_quelconques)) \ /* En fait, j'ai decouvert le 20220513134353 qu'il etait impossible d'interpoler en toute */ \ /* generalite car, en effet, les elements contenus dans 'FICHIER_LISTE' ne sont peut-etre */ \ /* pas dans le bon ordre... Cela s'est vu en exploitant les coordonnees {X,Y,Z} du noeud */ \ /* 'v $xiirv/KNOT.11.3.1' ('v $xiirv/.KNOT.11.1.$U Definition.d'une.droite.de.la.surface'). */ \ Bblock \ EGAL(ValeurDeLaFonction \ ,ELEMENT_DU_FICHIER_LISTE(MIN2(index_entier,index_entier_maximal)) \ ); \ Eblock \ ATes \ Bblock \ /* Malgre tout, le code suivant (inutile) est conserve... */ \ DEFV(Float,INIT(lambda,FLOT__UNDEF)); \ \ EGAL(lambda,DECI(index_flottant)); \ \ Test(IFGE(index_entier,index_entier_maximal)) \ Bblock \ EGAL(ValeurDeLaFonction \ ,ELEMENT_DU_FICHIER_LISTE(index_entier_maximal) \ ); \ Eblock \ ATes \ Bblock \ EGAL(ValeurDeLaFonction \ ,INTERPOLATION_MIXTE(NOTL(lineairement) \ ,ELEMENT_DU_FICHIER_LISTE(NEUT(index_entier)) \ ,derivee_origine \ ,ELEMENT_DU_FICHIER_LISTE(SUCC(index_entier)) \ ,derivee_extremite \ ,lambda \ ) \ ); \ /* On notera qu'on utilise les parametres {lineairement,derivee_origine,derivee_extremite} */ \ /* relatifs aux listes de substitution, alors que ces dernieres ne sont pas utilisees ici... */ \ Eblock \ ETes \ Eblock \ ETes \ Eblock \ ATes \ Bblock \ Test(IL_NE_FAUT_PAS(interpoler)) \ Bblock \ EGAL(ValeurDeLaFonction \ ,ITb1(liste_flottante_substitution_de_definition,INDX(__DENORMALISE_NIVEAU_AVEC_TRONCATION(t),NOIR)) \ ); \ Eblock \ ATes \ Bblock \ DEFV(Float,INIT(index_flottant,TRNF(F___DENORMALISE_NIVEAU(t)))); \ /* Le 'TRNF(...)' est lie au '__DENORMALISE_NIVEAU_AVEC_TRONCATION(...)' qui precede... */ \ DEFV(Int,INIT(index_entier,UNDEF)); \ DEFV(Float,INIT(lambda,FLOT__UNDEF)); \ \ EGAL(index_entier,INTE(index_flottant)); \ EGAL(lambda,DECI(index_flottant)); \ \ Test(IFGE(index_entier,BLANC)) \ Bblock \ EGAL(ValeurDeLaFonction \ ,ITb1(liste_flottante_substitution_de_definition,INDX(BLANC,NOIR)) \ ); \ Eblock \ ATes \ Bblock \ EGAL(ValeurDeLaFonction \ ,INTERPOLATION_MIXTE(NOTL(lineairement) \ ,ITb1(liste_flottante_substitution_de_definition \ ,INDX(NEUT(index_entier),NOIR) \ ) \ ,derivee_origine \ ,ITb1(liste_flottante_substitution_de_definition \ ,INDX(SUCC(index_entier),NOIR) \ ) \ ,derivee_extremite \ ,lambda \ ) \ ); \ Eblock \ ETes \ Eblock \ ETes \ Eblock \ ETes \ Eblock \ /* La possible interpolation des listes de substitution a ete introduite le 20220423111102. */