/*************************************************************************************************************************************/ /* */ /* D E F I N I T I O N S D E S D I F F E R E N T E S I N I T I A L I S A T I O N S : */ /* */ /* */ /* Author of '$xrq/nucleon.LW.1$I' : */ /* */ /* Jean-Francois Colonna (LACTAMME, 1991??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N I T I A L I S A T I O N D E L ' U N I V E R S ( D E B U T , */ /* A V A N T L ' E N T R E E D E S P A R A M E T R E S ) : */ /* */ /*************************************************************************************************************************************/ #define ___DEBUT_DE_L_INITIALISATION_DE_L_UNIVERS \ Bblock \ EGAL(X_quark_REEL_ROUGE,X_quark_REEL_ROUGE_INITIAL); \ EGAL(Y_quark_REEL_ROUGE,Y_quark_REEL_ROUGE_INITIAL); \ EGAL(Z_quark_REEL_ROUGE,Z_quark_REEL_ROUGE_INITIAL); \ /* Initialisation de la position du quark REEL ROUGE. */ \ EGAL(X_quark_REEL_VERTE,X_quark_REEL_VERTE_INITIAL); \ EGAL(Y_quark_REEL_VERTE,Y_quark_REEL_VERTE_INITIAL); \ EGAL(Z_quark_REEL_VERTE,Z_quark_REEL_VERTE_INITIAL); \ /* Initialisation de la position du quark REEL VERTE. */ \ EGAL(X_quark_REEL_BLEUE,X_quark_REEL_BLEUE_INITIAL); \ EGAL(Y_quark_REEL_BLEUE,Y_quark_REEL_BLEUE_INITIAL); \ EGAL(Z_quark_REEL_BLEUE,Z_quark_REEL_BLEUE_INITIAL); \ /* Initialisation de la position du quark REEL ROUGE. */ \ INITIALISATION_DE_L_ESPACE_DE_PARAMETRAGE; \ /* Initialisation du point courant de l'espace abstrait servant a parametrer le generateur */ \ /* d'evenements. Ceci est fait aussi dans '$xrq/nucleon.LB$I'... */ \ EGAL(adolescence_d_une_particule,ADOLESCENCE_D_UNE_PARTICULE); \ /* Duree de l'adolescence d'une particule qui correspond a une periode au cours de laquelle */ \ /* elle ne peut rentrer en collision. La valeur implicite est choisie de facon telle qu'elle */ \ /* corresponde a une duree superieure a celle necessaire a s'echapper du voisinage d'une */ \ /* particule ; ceci permet d'eviter que des particules emises soient immediatement */ \ /* reabsorbee. L'initialisation a lieu dans 'DEBUT_DE_L_INITIALISATION_DE_L_UNIVERS' a */ \ /* cause du compilateur de 'SYSTEME_SG4D..._IRIX_CC' qui refuse d'initialiser cette */ \ /* variable avec l'expression 'ADOLESCENCE_D_UNE_PARTICULE' qui contient un 'MIN2(...)'... */ \ EGAL(distance_caracteristique_g1,DISTANCE_CARACTERISTIQUE_g1); \ /* 'distance_caracteristique_g1' ne peut etre initialise a la compilation puisqu'en effet, */ \ /* 'DISTANCE_CARACTERISTIQUE_g1' contient des lignes trigonometriques... */ \ EGAL(distance_caracteristique_g2,DISTANCE_CARACTERISTIQUE_g2); \ /* 'distance_caracteristique_g2' ne peut etre initialise a la compilation puisqu'en effet, */ \ /* 'DISTANCE_CARACTERISTIQUE_g2' contient des lignes trigonometriques... */ \ INITIALISATION_POINT_3D(Lsource \ ,X_DE_LA_SOURCE_LUMINEUSE \ ,Y_DE_LA_SOURCE_LUMINEUSE \ ,Z_DE_LA_SOURCE_LUMINEUSE \ ); \ /* Initialisation de la position de la source lumineuse... */ \ Eblock \ /* Initialisation de l'univers de la simulation... */ BFonctionI DEFV(LoF,GENERE__Fonction__OPT(DEBUT_DE_L_INITIALISATION_DE_L_UNIVERS,U,___DEBUT_DE_L_INITIALISATION_DE_L_UNIVERS)) EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N I T I A L I S A T I O N D E L ' U N I V E R S ( F I N , */ /* A P R E S L ' E N T R E E D E S P A R A M E T R E S ) : */ /* */ /*************************************************************************************************************************************/ #define ___FIN_DE_L_INITIALISATION_DE_L_UNIVERS \ Bblock \ DEFINITION_DE_L_ESPACE_PHYSIQUE; \ /* Initialisation de la definition de l'espace physique. */ \ INITIALISATION_ACCROISSEMENT_3D(champ_electrique,champ_electrique_X,champ_electrique_Y,champ_electrique_Z); \ INITIALISATION_ACCROISSEMENT_3D(champ_magnetique,champ_magnetique_X,champ_magnetique_Y,champ_magnetique_Z); \ /* Initialisation de l'eventuel champ electro-magnetique. */ \ INITIALISATION_D_UNE_PARTICULE_INEXISTANTE(PARTICULE_NON_DEFINIE); \ /* Et ce afin de verifier que des particules non definies ne sont pas utilisees... */ \ INITIALISATION_DE_L_ENSEMBLE_DES_PARTICULES; \ /* Initialisation de la liste des particules contenues dans le proton. */ \ DEFINITION_DU_QUARK_REEL_ROUGE; \ DEFINITION_DU_QUARK_REEL_VERTE; \ DEFINITION_DU_QUARK_REEL_BLEUE; \ /* Definition des trois quarks REELs constitutifs du proton, mais sans leurs charges */ \ /* de couleurs (voir ci-dessous)... */ \ COULEUR_DU_QUARK_REEL_ROUGE; \ COULEUR_DU_QUARK_REEL_VERTE; \ COULEUR_DU_QUARK_REEL_BLEUE; \ /* Mise en place de la couleur (qr,qv,qb) d'un quark REEL. En effet, lors de la mise en */ \ /* place des quarks REELs par 'DEFINITION_DU_QUARK_REEL_ROUGE/VERTE/BLEUE', on ne peut */ \ /* simultanement definir leur charge de couleurs, car cette derniere reference les extrema */ \ /* du champ, qui sont eux-memes calcules a partir de la position des quarks REELs. Ainsi, */ \ /* en definissant 'DEFINITION_DU_QUARK_REEL_ROUGE' (le premier defini), il serait necessaire */ \ /* de connaitre les quarks REELs VERTE et BLEUE, alors que leur position n'est pas encore */ \ /* definie. Donc, on attendra d'avoir defini la position des 3 quarks REELs avant de fixer */ \ /* leur charge de couleur par 'COULEUR_DU_QUARK_REEL_ROUGE/VERTE/BLEUE'... */ \ INJECTION_DE_NUAGES_DE_PARTICULES_VIRTUELLES; \ /* Enfin, une eventuelle initialisation du modele a l'aide de nuages de particules */ \ /* virtuelles autour des quarks REELs est effectuee... */ \ Eblock \ /* Initialisation de l'univers de la simulation... */ BFonctionI DEFV(LoF,GENERE__Fonction__OPT(FIN_DE_L_INITIALISATION_DE_L_UNIVERS,U,___FIN_DE_L_INITIALISATION_DE_L_UNIVERS)) EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H O I X E N T R E L E M O D E R A P I D E E T L E M O D E N O R M A L : */ /* */ /*************************************************************************************************************************************/ #define FORCER_LE_MODE_RAPIDE_DE_LA_SYNTHESE_D_IMAGE \ FAUX DEFV(Local,DEFV(Logical,INIT(forcer_le_mode_rapide_de_la_synthese_d_image,FORCER_LE_MODE_RAPIDE_DE_LA_SYNTHESE_D_IMAGE))); /* Indicateur disant si la synthese d'image aura lieu suivant un mode degrade ('VRAI' : les */ /* trainees ainsi que les convolutions ne sont pas calculees) ou bien suivant le mode normal */ /* ('FAUX' : ou les trainees ainsi que les convolutions sont conditionnelles). */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N I T I A L I S A T I O N D E L A S Y N T H E S E D ' I M A G E : */ /* */ /*************************************************************************************************************************************/ #ifdef PROJECTION_3D_2D_VERSION_02 #Aifdef PROJECTION_3D_2D_VERSION_02 # message "ATTENTION : aux macros inexistantes..." #Eifdef PROJECTION_3D_2D_VERSION_02 #define DEBUT_D_INITIALISATION_DE_LA_SYNTHESE_D_IMAGE \ Bblock \ SET_DIMENSIONS_2D(Xmin_IMAGE,Xmax_IMAGE,Ymin_IMAGE,Ymax_IMAGE); \ /* Dimensionnement des images a generer... */ \ \ INITIALISATION_POINT_3D(periode_1_de_translation_de_l_origine \ ,PERIODE_1_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OX \ ,PERIODE_1_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OY \ ,PERIODE_1_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(translation_1_de_l_origine \ ,TRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OX \ ,TRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OY \ ,TRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(Dtranslation_1_de_l_origine \ ,dTRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OX \ ,dTRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OY \ ,dTRANSLATION_1_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ /* Definition de la periode '1' de translation de l'origine. */ \ INITIALISATION_POINT_3D(periode_2_de_translation_de_l_origine \ ,PERIODE_2_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OX \ ,PERIODE_2_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OY \ ,PERIODE_2_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(translation_2_de_l_origine \ ,TRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OX \ ,TRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OY \ ,TRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(Dtranslation_2_de_l_origine \ ,dTRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OX \ ,dTRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OY \ ,dTRANSLATION_2_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ /* Definition de la periode '2' de translation de l'origine. */ \ INITIALISATION_POINT_3D(periode_3_de_translation_de_l_origine \ ,PERIODE_3_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OX \ ,PERIODE_3_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OY \ ,PERIODE_3_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(translation_3_de_l_origine \ ,TRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OX \ ,TRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OY \ ,TRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(Dtranslation_3_de_l_origine \ ,dTRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OX \ ,dTRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OY \ ,dTRANSLATION_3_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ /* Definition de la periode '3' de translation de l'origine. */ \ INITIALISATION_POINT_3D(periode_4_de_translation_de_l_origine \ ,PERIODE_4_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OX \ ,PERIODE_4_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OY \ ,PERIODE_4_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(translation_4_de_l_origine \ ,TRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OX \ ,TRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OY \ ,TRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(Dtranslation_4_de_l_origine \ ,dTRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OX \ ,dTRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OY \ ,dTRANSLATION_4_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ /* Definition de la periode '4' de translation de l'origine. */ \ INITIALISATION_POINT_3D(periode_5_de_translation_de_l_origine \ ,PERIODE_5_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OX \ ,PERIODE_5_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OY \ ,PERIODE_5_DE_TRANSLATION_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(translation_5_de_l_origine \ ,TRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OX \ ,TRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OY \ ,TRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ INITIALISATION_ACCROISSEMENT_3D(Dtranslation_5_de_l_origine \ ,dTRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OX \ ,dTRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OY \ ,dTRANSLATION_5_DE_L_ORIGINE_LE_LONG_DE_OZ \ ); \ /* Definition de la periode '5' de translation de l'origine. */ \ Eblock \ /* Debut d'initialisation de la synthese d'image... */ #define FIN_D_INITIALISATION_DE_LA_SYNTHESE_D_IMAGE \ Bblock \ Test(IL_FAUT(forcer_le_mode_rapide_de_la_synthese_d_image)) \ /* ATTENTION : de facon a acceler au mieux le processus, il est evident que ce test doit */ \ /* etre tout au debut de 'FIN_D_INITIALISATION_DE_LA_SYNTHESE_D_IMAGE'... */ \ Bblock \ EGAL(memoriser_le_champ_global,FAUX); \ /* Dans le cas ou le mode rapide est force, le champ global ne peut etre memorise, */ \ EGAL(generer_les_trainees,FAUX); \ /* Dans le cas ou le mode rapide est force, on inhibe le calcul des trainees, */ \ EGAL(nombre_de_points_du_noyau_de_convolution,ABSENCE_DE_CONVOLUTION); \ /* Dans le cas ou le mode rapide est force, on inhibe les convolutions, */ \ EGAL(niveau_de_NOIR_remonte,NOIR); \ /* Dans le cas ou le mode rapide est force, le niveau de 'NOIR' restera inchange. */ \ Eblock \ ATes \ Bblock \ Eblock \ ETes \ \ Test(IL_FAUT(synchroniser_la_generation_des_images)) \ Bblock \ INITIALISATION_D_UN_FEU(FEU_feu_DE_SYNCHRONISATION_DE_LA_SIMULATION_DES_HADRONS); \ /* Initialisation du feu... */ \ Eblock \ ATes \ Bblock \ Eblock \ ETes \ RE_INITIALISATION_DE_LA_SYNTHESE_D_IMAGE; \ /* Re-initialisation de la synthese d'image... */ \ INITIALISATION_DU_NOYAU_DE_CONVOLUTION; \ /* Initialisation eventuelle du noyau de convolution... */ \ MISE_A_JOUR_D_UN_CUMUL_POUR_LE_CALCUL_DES_TRAINEES(TRAINEES_ROUGE,Image_ROUGE); \ MISE_A_JOUR_D_UN_CUMUL_POUR_LE_CALCUL_DES_TRAINEES(TRAINEES_VERTE,Image_VERTE); \ MISE_A_JOUR_D_UN_CUMUL_POUR_LE_CALCUL_DES_TRAINEES(TRAINEES_BLEUE,Image_BLEUE); \ /* Initialisation eventuelle du calcul des trainees... */ \ Eblock \ /* Fin d'initialisation de la synthese d'image... */ #define RE_INITIALISATION_DE_LA_SYNTHESE_D_IMAGE \ Bblock \ CALi(Inoir(Image_ROUGE)); \ CALi(Inoir(Image_VERTE)); \ CALi(Inoir(Image_BLEUE)); \ /* Initialisation des images Resultat avant le changement eventuel de (pasX,pasY) ; on */ \ /* notera qu'elles contiennent les differentes images de l'animation... */ \ /* */ \ /* ATTENTION : a cause de la notion de trainees (qui s'obtiennent car cumul iteratif des */ \ /* differentes images resultant de la simulation), on ne peut pas initialiser le fond des */ \ /* images avec autre chose que du 'NOIR', car sinon le fond des images augmenteraient au */ \ /* cours du temps... */ \ SET_NOIR_PLANCHER(NOIR_PLANCHER); \ /* Pour la prise en compte des problemes des quarks qui disparaissent visuellement a cause */ \ /* de 'MULTIPLEXAGE_RVB_223(...)' qui peut facilement generer du NOIR si les trois */ \ /* composantes chromatiques sont faibles dans [0,1]... */ \ INITIALISATION_TRANSFORMATION; \ /* Initialisation de la transformation tri-dimensionnelle courante. */ \ \ /* ATTENTION : on faisait autrefois : */ \ /* */ \ /* CALS(Iinit_Z_Buffer()); */ \ /* */ \ /* mais maintenant, c'est 'VISUALISATION_D_UNE_LISTE_DE_POINTS' qui le prend en charge... */ \ \ SET_FACTEUR_D_ELOIGNEMENT_EN_Z_DE_L_OBSERVATEUR(FACTEUR_D_ELOIGNEMENT_EN_Z_DE_L_OBSERVATEUR); \ /* Facteur d'eloignement en 'Z' de l'observateur destine a une projection "standard"... */ \ SET_DECALAGE_ANGULAIRE_DE_L_OBSERVATEUR(decalage_angulaire_pour_la_stereoscopie); \ /* Initialisation du facteur de rotation de l'observateur permettant ainsi de creer */ \ /* des paires stereoscopiques... */ \ INITIALISATION_DE_LA_LISTE_DES_POINTS; \ /* (re-)initialisation de l'index de rangement dans la liste de tri des spheres... */ \ Eblock \ /* Re-initialisation de la synthese d'image... */