####################################################################################################################################### # # # D I F F U S I O N T R I D I M E N S I O N N E L L E " D O U C E " # # ( G E N E R A T I O N D U G R A D I E N T D E P A R T I C U L E S ) : # # # # # # Author of '$xiirk/.DIFZ.11.1.$U' : # # # # Jean-Francois COLONNA (LACTAMME, 20070601184256). # # # ####################################################################################################################################### $Z SETParam _____PremiereZ $_____Premiere $Z # Parametre introduit le 20070703090302 pour decoupler le nombre de plans perpendiculaires # $Z # a l'axe 'OZ' dans lesquels se fait la generation aleatoire du nombre de plans dans lesquels # $Z # se fait le calcul de la densite... # $Z SETParam _____DerniereZ $_____Derniere $Z # Parametre introduit le 20070703090302 pour decoupler le nombre de plans perpendiculaires # $Z # a l'axe 'OZ' dans lesquels se fait la generation aleatoire du nombre de plans dans lesquels # $Z # se fait le calcul de la densite... # $Z setParam _____DRotationX 0 $Z # Parametre introduit le 20070702131125... # $Z setParam _____DRotationY 0 $Z # Parametre introduit le 20070702131125... # $Z setParam _____DRotationZ 0 $Z # Parametre introduit le 20070702131125... # $Z setParam _____DTranslationX 0 $Z # Parametre introduit le 20070703121312... # $Z setParam _____DTranslationY 0 $Z # Parametre introduit le 20070703121312... # $Z setParam _____DTranslationZ 0 $Z # Parametre introduit le 20070703121312... # $Z $xci/lineaire$X \ $Z A=$_____CoefficientA B=$_____CoefficientB C=0 \ $Z standard=FAUX \ $Z $formatI | \ $Z $xci/acces$X \ $Z standard=FAUX zero=FAUX \ $Z R=$xTV/GRADIENT \ $Z $formatI $Z # Generation d'un gradient vertical (par defaut, les fortes valeurs etant en haut et les # $Z # faibles en bas, afin que lors de la mise en '$M', les montagnes elevees etant en arriere # $Z # plan...). # $c #include <stdio.h> $c $c extern int atoi(); $c extern char *getenv(); $c $c #define N0 _____PremiereZ $c #define N _____DerniereZ $c $c #define GRAINE _____Graine $c #define IGRAINE _____IGraine $c $c #define Z0 (atoi(getenv("Zmin"))) $c #define ZN (atoi(getenv("Zmax"))) $c $c int main() $c { $c int n; $c int graine=GRAINE; $c $c for (n=N0 ; n<=N ; n++) $c { $c int coordonnee_Z=((ZN*(n-N0))+(Z0*(N-n)))/(N-N0); $c $c printf("$xci/random.03$X $c C=$xTV/GRADIENT $c graine=%d $c facteur=$_____Facteur $c R=$_____imagesWR.%04d $c $formatI\n" $c ,graine $c ,n $c ); $c /* Generation d'un champ aleatoire suivant le gradient. */ $c $c printf("$xci/liste_points$X $c A=$_____imagesWR.%04d $c Z=%d $c en_tete=FAUX $c eX=VRAI eY=FAUX eZ=FAUX eNIVEAU=FAUX epoints=FAUX $c >>! $FLiStE_XY$COORD_X\n" $c ,n $c ,coordonnee_Z $c ); $c printf("$xci/liste_points$X $c A=$_____imagesWR.%04d $c Z=%d $c en_tete=FAUX $c eX=FAUX eY=VRAI eZ=FAUX eNIVEAU=FAUX epoints=FAUX $c >>! $FLiStE_XY$COORD_Y\n" $c ,n $c ,coordonnee_Z $c ); $c printf("$xci/liste_points$X $c A=$_____imagesWR.%04d $c Z=%d $c en_tete=FAUX $c eX=FAUX eY=FAUX eZ=VRAI eNIVEAU=FAUX epoints=FAUX $c >>! $FLiStE_XY$COORD_Z\n" $c ,n $c ,coordonnee_Z $c ); $c $c graine = graine + IGRAINE; $c } $c } $Z $xrv/ROTATION.01$X \ $Z ne=0 \ $Z LISTE_X=$FLiStE_XY$COORD_X \ $Z LISTE_Y=$FLiStE_XY$COORD_Y \ $Z LISTE_Z=$FLiStE_XY$COORD_Z \ $Z rotation=VRAI \ $Z ROTATION_OX=$_____DRotationX \ $Z ROTATION_OY=$_____DRotationY \ $Z ROTATION_OZ=$_____DRotationZ \ $Z TRANSLATION_OX=$_____DTranslationX \ $Z TRANSLATION_OY=$_____DTranslationY \ $Z TRANSLATION_OZ=$_____DTranslationZ \ $Z pX=1 pY=0 pZ=0 \ $Z > $FDLiStE_XY$COORD_X $Z # Possibilite de rotation introduite le 20070702131423... # $Z $xrv/ROTATION.01$X \ $Z ne=0 \ $Z LISTE_X=$FLiStE_XY$COORD_X \ $Z LISTE_Y=$FLiStE_XY$COORD_Y \ $Z LISTE_Z=$FLiStE_XY$COORD_Z \ $Z rotation=VRAI \ $Z ROTATION_OX=$_____DRotationX \ $Z ROTATION_OY=$_____DRotationY \ $Z ROTATION_OZ=$_____DRotationZ \ $Z TRANSLATION_OX=$_____DTranslationX \ $Z TRANSLATION_OY=$_____DTranslationY \ $Z TRANSLATION_OZ=$_____DTranslationZ \ $Z pX=0 pY=1 pZ=0 \ $Z > $FDLiStE_XY$COORD_Y $Z # Possibilite de rotation introduite le 20070702131423... # $Z $xrv/ROTATION.01$X \ $Z ne=0 \ $Z LISTE_X=$FLiStE_XY$COORD_X \ $Z LISTE_Y=$FLiStE_XY$COORD_Y \ $Z LISTE_Z=$FLiStE_XY$COORD_Z \ $Z rotation=VRAI \ $Z ROTATION_OX=$_____DRotationX \ $Z ROTATION_OY=$_____DRotationY \ $Z ROTATION_OZ=$_____DRotationZ \ $Z TRANSLATION_OX=$_____DTranslationX \ $Z TRANSLATION_OY=$_____DTranslationY \ $Z TRANSLATION_OZ=$_____DTranslationZ \ $Z pX=0 pY=0 pZ=1 \ $Z > $FDLiStE_XY$COORD_Z $Z # Possibilite de rotation introduite le 20070702131423... #