L'étude des systèmes dynamiques est fascinante et le modèle de Hénon permet de les approcher avec des moyens réduits en terme de calculs. Il est alors possible d'obtenir des images qui surprennent toujours. Leur réalisation est en deux temps :
Remarques :
Fichier : henon.pl 1 #!/usr/bin/perl 2 3 use Getopt::Std; 4 5 getopts("ABTZLIP"); 6 7 $| = 1; 8 9 $IMAGE = "/home/syracuse/bin/syr-image"; 10 11 12 sub fixed { 13 my($x) = @_; 14 return sprintf("%f6",$x); 15 } 16 17 sub inBBox { 18 my($x,$y,$b1x,$b1y,$b2x,$b2y) = @_; 19 return (($x-$b1x)*($b2x-$x)>0 && ($y-$b1y)*($b2y-$y)>0); 20 } 21 22 if (-e $ARGV[0]) { 23 require $ARGV[0]; 24 if ($opt_Z) { 25 $fichier = "$ARGV[0]Z"; 26 require "zoom.pl"; 27 } 28 if ($opt_B) { 29 $fichier = "$ARGV[0]B"; 30 require "bifurcation.pl"; 31 } 32 if ($opt_A) { 33 $fichier = "$ARGV[0]A"; 34 require "attraction.pl"; 35 } 36 if ($opt_T) { 37 $fichier = "$ARGV[0]T"; 38 require "trajectoire.pl"; 39 } 40 if ($opt_L) { 41 $fichier = "$ARGV[0]L"; 42 require "lyapunov.pl"; 43 } 44 &go(); 45 print `mpost $fichier.mp`; 46 if ($opt_I) { 47 print `$IMAGE -fpng -i2 $fichier.ps`; 48 } 49 if ($opt_P) { 50 print `$IMAGE $fichier.ps`; 51 } 52 } else { 53 print "fichier de paramètres absent !\n"; 54 } |