#######################################################################################################################################
# #
# G E N E R A T I O N D E S I M A G E S D U S Y S T E M E S O L A I R E : #
# #
# #
# Author of '$xivP/disk.000000010/face.2/.NSPH.1.11.$U' : #
# #
# Jean-Francois Colonna (LACTAMME, AAAAMMJJhhmmss). #
# #
#######################################################################################################################################
$Z # ATTENTION, a cause de 'v $Falias_listG FiLeT3' qui extrait les 'if(...)' introduits par #
$Z # des '$Z', la variable '$_____EulerRdn' doit absolument avoir ete definie avant par 'SET', #
$Z # afin de pouvoir etre utilisee apres pour savoir s'il faut faire une generation aleatoire #
$Z # pas. Cela rend donc inutile d'ecrire : #
$Z # #
$Z # if ($?_____EulerRdn == $NEXIST) then #
$Z # set _____EulerRdn=$NEXIST #
$Z # else #
$Z # endif #
$Z # #
$Z setParam _____Centrer FAUX
$Z setParam _____Reference 1
$Z setParam _____Lineaire FAUX
$Z setParam _____RotationOX 0
$Z setParam _____RotationOY 0
$Z setParam _____RotationOZ 0
$Z if ($?_____Zoom == $NEXIST) then
$Z SET _____Zoom=0.60
$Z
$Z SETParam _____ZoomD $_____Zoom
$Z
$Z SETParam _____ZoomA $_____Zoom
$Z else
$Z SET _____ZoomD=$_____Zoom
$Z SET _____ZoomA=$_____Zoom
$Z endif
$Z setParam _____Lz 1.0e13
$Z SETParam _____Npremiere 1
$Z SETParam _____Nderniere 512
$Z set NcorpsS=11
$Z
$Z alias genere 'set Fl=\!:1 ; set Li=(\!:2*) ; \\
$Z $DELETE $Fl ; \\
$Z echo "$Li" | $SE -e "s/$K_BLANC$K_BLANC*/ /g" | $R "$K_BLANC" "$K_NL" > $Fl ; \\
$Z unset Fl Li'
$Z
$Z alias GenR 'set Fi=\!:1 ; set Pr=\!:2 ; set In=\!:3 ; set Su=\!:4 ; set De=\!:5 ; set Ar=(\!:6*) ; \\
$Z $DELETE $Fi ; set Part0=2 ; @ PartN = $NcorpsS - 2 ; \\
$Z echo $Pr > $Fi ; \\
$Z $xci/valeurs_alea$X p=$Part0 d=$PartN signe="$K_VIDE" inf=$In sup=$Su $Ar >>! $Fi ; \\
$Z echo $De >>! $Fi ; \\
$Z echo $De >>! $Fi ; \\
$Z unset Fi Pr In Su De Ar Part0 PartN'
$Z
$Z set Theta=`calcul -$pi/6`
$Z
$Z if ($_____EulerRdn == $NEXIST) then
$Z genere $xTV/THETA_3D \
$Z 0 0 0 \
$Z 0 \
$Z 0 0 0 0 0 $Theta \
$Z $Theta
$Z genere $xTV/PSI_3D \
$Z 0 0 0 \
$Z 0 \
$Z 0 0 0 0 0 0 \
$Z 0
$Z genere $xTV/PHI_3D \
$Z 0 0 0 \
$Z 0 \
$Z 0 0 0 0 0 0 \
$Z 0
$Z else
$Z GenR $xTV/THETA_3D 0 0 $pi $Theta g=1111
$Z GenR $xTV/PSI_3D 0 0 $dpi $Theta g=3333
$Z GenR $xTV/PHI_3D 0 0 $dpi $Theta g=5555
$Z endif
$Z
$Z if ($_____TransRdn == $NEXIST) then
$Z set _____TransRdnX=0
$Z set _____TransRdnY=0
$Z set _____TransRdnZ=0
$Z else
$Z setParam _____TransRdnX 5000.0e9
$Z
$Z setParam _____TransRdnY 5000.0e9
$Z
$Z setParam _____TransRdnZ 5000.0e9
$Z endif
$Z
$Z GenR $xTV/TRANS_X_3D 0 0 $_____TransRdnX 0 g=1133
$Z GenR $xTV/TRANS_Y_3D 0 0 $_____TransRdnY 0 g=3355
$Z GenR $xTV/TRANS_Z_3D 0 0 $_____TransRdnZ 0 g=5577
$Z
$Z genere $xTV/THETA_2D \
$Z 0 0 0 \
$Z 0 \
$Z 0 0 0 0 0 0 \
$Z 0
$Z
$Z genere $xTV/RAYONS \
$Z +30e10 +18e10 +18e10 \
$Z +18e10 \
$Z +18e10 +23e10 +23e10 +21e10 +21e10 +18e10 \
$Z +18e10
$Z genere $xTV/COULEURS$ROUGE \
$Z $GRIS_8 $GRIS_8 $GRIS_8 \
$Z $GRIS_0 \
$Z $GRIS_8 $GRIS_8 $GRIS_8 $GRIS_4 $GRIS_0 $GRIS_7 \
$Z $GRIS_0
$Z genere $xTV/COULEURS$VERTE \
$Z $GRIS_8 $GRIS_6 $GRIS_4 \
$Z $GRIS_6 \
$Z $GRIS_4 $GRIS_6 $GRIS_7 $GRIS_8 $GRIS_7 $GRIS_7 \
$Z $GRIS_4
$Z genere $xTV/COULEURS$BLEUE \
$Z $GRIS_0 $GRIS_2 $GRIS_0 \
$Z $GRIS_8 \
$Z $GRIS_2 $GRIS_0 $GRIS_0 $GRIS_8 $GRIS_8 $GRIS_8 \
$Z $GRIS_8
$Z SETENV ZoomD $_____ZoomD
$Z SETENV ZoomA $_____ZoomA
$X echo "neutre"
$X # commande destinee uniquement a mettre a jour l'environnement 'env'... #
$Z Pal
$c #include <stdio.h>
$c
$c extern double atof();
$c extern char *getenv();
$c extern double sqrt();
$c extern double pow();
$c
$c #define DPI (atof(getenv("dpi")))
$c
$c #define N0 _____Npremiere
$c #define N _____Nderniere
$c
$c #define ZOOMD (atof(getenv("ZoomD")))
$c #define ZOOMA (atof(getenv("ZoomA")))
$c
$c #define NPAS (N-N0+1)
$c
$c #define Kepler(r) (Dtheta9*sqrt(pow((rayon9/r),3.0)))
$c /* Cette procedure repose sur la troisieme loi de Kepler qui stipule que le carre de la */
$c /* periode de revolution est proportionnel au cube du grand axe de la trajectoire (ellipse). */
$c
$c int main()
$c {
$c int n;
$c
$c double rayon0=0;
$c double rayon1=+57.9e9;
$c double rayon2=+108.2e9;
$c double rayon3=+149.6e9;
$c double rayon4=+227.9e9;
$c double rayon5=+778.3e9;
$c double rayon6=+1427.0e9;
$c double rayon7=+2869.6e9;
$c double rayon8=+4496.6e9;
$c double rayon9=+5900.0e9;
$c
$c double Dtheta0=0;
$c double Dtheta1;
$c double Dtheta2;
$c double Dtheta3;
$c double Dtheta4;
$c double Dtheta5;
$c double Dtheta6;
$c double Dtheta7;
$c double Dtheta8;
$c double Dtheta9=DPI/((double)NPAS);
$c
$c Dtheta1=Kepler(rayon1);
$c Dtheta2=Kepler(rayon2);
$c Dtheta3=Kepler(rayon3);
$c Dtheta4=Kepler(rayon4);
$c Dtheta5=Kepler(rayon5);
$c Dtheta6=Kepler(rayon6);
$c Dtheta7=Kepler(rayon7);
$c Dtheta8=Kepler(rayon8);
$c
$c for (n=N0 ; n<=N ; n++)
$c {
$c double rayon;
$c double Dtheta;
$c double zoom;
$c
$c rayon=((rayon0*(n-N0))+(rayon9*(N-n)))/(N-N0);
$c zoom=((ZOOMA*(n-N0))+(ZOOMD*(N-n)))/(N-N0);
$c
$c if ((n>N0) && (n<N))
$c {
$c Dtheta=Kepler(rayon);
$c }
$c else
$c {
$c if (n==N0)
$c {
$c Dtheta=Dtheta9;
$c }
$c else
$c {
$c }
$c
$c if (n==N)
$c {
$c Dtheta=Dtheta0;
$c }
$c else
$c {
$c }
$c }
$c
$c printf("genere
$c $xTV/RAYON_2D
$c %+g %+g %+g
$c %+g
$c %+g %+g %+g %+g %+g
$c %+g %+g\n"
$c ,rayon0,rayon1,rayon2
$c ,rayon3
$c ,rayon4,rayon5,rayon6,rayon7,rayon8
$c ,rayon9,rayon
$c );
$c printf("genere
$c $xTV/DELTA_THETA_2D
$c %+g %+g %+g
$c %+g
$c %+g %+g %+g %+g %+g
$c %+g %+g\n"
$c ,Dtheta0,Dtheta1,Dtheta2
$c ,Dtheta3
$c ,Dtheta4,Dtheta5,Dtheta6,Dtheta7,Dtheta8
$c ,Dtheta9,Dtheta
$c );
$c
$c printf("$xrr/N_spheres.11$X
$c corps=$NcorpsS
$c np=%d
$c LISTE_THETA_3D=$xTV/THETA_3D
$c LISTE_PSI_3D=$xTV/PSI_3D
$c LISTE_PHI_3D=$xTV/PHI_3D
$c LISTE_TRANSLATION_X_3D=$xTV/TRANS_X_3D
$c LISTE_TRANSLATION_Y_3D=$xTV/TRANS_Y_3D
$c LISTE_TRANSLATION_Z_3D=$xTV/TRANS_Z_3D
$c LISTE_RAYON_2D=$xTV/RAYON_2D
$c LISTE_THETA_2D=$xTV/THETA_2D
$c LISTE_DELTA_THETA_2D=$xTV/DELTA_THETA_2D
$c LISTE_RAYON=$xTV/RAYONS
$c LISTE_ROUGE=$xTV/COULEURS$ROUGE
$c LISTE_VERTE=$xTV/COULEURS$VERTE
$c LISTE_BLEUE=$xTV/COULEURS$BLEUE
$c centrer=$_____Centrer reference=$_____Reference
$c extension=5
$c dct=15000
$c nombre=1000
$c ensemble=VRAI
$c Ranterieurs=1.0
$c trainees=FAUX
$c renormaliser=FAUX
$c lineaire=$_____Lineaire exposant=0.4
$c Lz=$_____Lz
$c TRANSLATION_OX=0
$c TRANSLATION_OY=0
$c ROTATION_OX=$_____RotationOX
$c ROTATION_OY=$_____RotationOY
$c ROTATION_OZ=$_____RotationOZ
$c ZOOM=%f
$c fond=FAUX
$c pV=%d
$c R=$xTV/NSPH.Wa.
$c $formatI\n"
$c ,NPAS,zoom,NPAS
$c );
$c
$c printf("$MV $xTV/NSPH.Wa.%04d$ROUGE
$c $_____images.%04d$ROUGE\n"
$c ,N,n
$c );
$c printf("$MV $xTV/NSPH.Wa.%04d$VERTE
$c $_____images.%04d$VERTE\n"
$c ,N,n
$c );
$c printf("$MV $xTV/NSPH.Wa.%04d$BLEUE
$c $_____images.%04d$BLEUE\n"
$c ,N,n
$c );
$c
$c printf("$DELETE $xTV/COORDONNEES$COORD_X\n");
$c printf("$DELETE $xTV/COORDONNEES$COORD_Y\n");
$c printf("$DELETE $xTV/COORDONNEES$COORD_Z\n");
$c
$c printf("$DELETE $xTV/VITESSES$COORD_X\n");
$c printf("$DELETE $xTV/VITESSES$COORD_Y\n");
$c printf("$DELETE $xTV/VITESSES$COORD_Z\n");
$c }
$c }
$Z $DELETE $xTV/THETA_3D
$Z $DELETE $xTV/PSI_3D
$Z $DELETE $xTV/PHI_3D
$Z $DELETE $xTV/RAYON_2D
$Z $DELETE $xTV/THETA_2D
$Z $DELETE $xTV/DELTA_THETA_2D
$Z $DELETE $xTV/RAYONS
$Z $DELETE $xTV/COULEURS$ROUGE
$Z $DELETE $xTV/COULEURS$VERTE
$Z $DELETE $xTV/COULEURS$BLEUE
$Z $xci/reduction_16$Z $_____images. $_____animation $_____Npremiere $_____Nderniere VRAI VRAI VRAI VRAI
$Z $xci/reduction_64$Z $_____images. $_____animation $_____Npremiere $_____Nderniere VRAI VRAI VRAI VRAI
$X $xci/genere$X c='ro $_____animation$R16$%s' RVB=VRAI postfixes_RVB=FAUX
$X $xci/genere$X c='ro $_____animation$R64$%s' RVB=VRAI postfixes_RVB=FAUX
$X
$X $xci/genere$X c='$xcg/unite$Z $_____animation$R16$%s' RVB=VRAI postfixes_RVB=FAUX
$X $xci/genere$X c='$xcg/unite$Z $_____animation$R64$%s' RVB=VRAI postfixes_RVB=FAUX