Re: Map Attractors in Mathematica
- Subject: [mg3135] Re: Map Attractors in Mathematica
- From: pnardon at ulb.ac.be (Pasquale Nardone)
- Date: 7 Feb 1996 10:40:39 -0600
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: Université Libre de Bruxelles
- Sender: daemon at wri.com
suppose that you have a starting function in 2 dimension f[x_,y_]:=.... you can then define the recursive mapping by: g[{x_,y_},n_]:=g[Mod[{x+y,x+2*y},1],n-1]; g[{x_,y_},0]:=f[x,y]; and then use the DensityPlot to see what happens: DensityPlot[g[{x,y},5],{x,0,1},{y,0,1},PlotPoints->30] (for example this is the 5 iterate) For the f[x_,y_] you can define it mathematically i.e. f[x_,y_]=If[((x-0.5)^2+(y-0.5)^2<0.1),1,0] or, if you have a bitmap object, for example on my Mac I use a "icon" (a 32x32 bitmap with a "smile"): AFile="2G:smile"; data=ReadList[fichier,Byte,1024]; data=Partition[data,32]; Show[DensityGraphics[1-data/255,ColorFunction->(Hue[1-#,1-#,1]&)]]; (* this is the starting image *) f[x_,y_]:=Transpose[data][[Floor[31*x+1],Floor[-31*y+32]]]; DensityPlot[f[x,y],{x,0,1},{y,0,1},PlotPoints->32]; (*this define a 2 dimension function which correspond to the bitmap *) -- -------------------------------------------- Pasquale Nardone * * Universiti Libre de Bruxelles * CP 231, Sciences-Physique * Bld du Triomphe * 1050 Bruxelles, Belgium * tel: 650,55,15 fax: 650,57,67 (+32,2) * ,,, (o o) ----ooO-(_)-Ooo----