Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Arnold's Cat Map

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5314] Arnold's Cat Map
  • From: wilson figueroa <wfigueroa at mosquito.com>
  • Date: Sat, 23 Nov 1996 01:44:49 -0500
  • Organization: Mosquito Net, Inc.
  • Sender: owner-wri-mathgroup at wolfram.com

Hi group,

I am attempting to implement Arnold's Cat Map using Mathematica
and have received two excellent solutions.

These are shown below.

-------------------------------------------------------------------

Soluton 1:

A=(Table[{20,y},{y,20,80}]~Join~Table[{x,20},{x,20,80}])/101;

T[{x_,y_}]:=Mod[{x+y,x+2*y},1]

MFold[A_,T_,i_]:=Fold[Map[T,#]&,A,Table[A,{i}]]

Image[A_,i_]:=\
Show[Graphics[{PointSize[1/30],Text[i,{.95,.95},{1,0}],Map[Point,A]}],
AspectRatio->1,PlotRange->{{0,1},{0,1}},Frame->True,FrameTicks->None]

Table[Image[MFold[A,T,i],i],{i,0,25}]

-------------------------------------------------------------------

Solution 2:

PointQ[p_] := VectorQ[p, NumberQ] && Length[p] == 2;
m = {{1,1}, {1,2}};
cat[x_?PointQ] := Mod[m.x, 1];
cat2[x_, 0]  := x
cat[x_, 1]  := cat[x]
cat2[x_, n_] := cat[cat2[x, n-1]]
 cat2[{27/76, 58/76}, 9]
\!\({27\/76, 29\/38}\)
 period[x_] := Module[{i=2},
                     While[Nest[cat,x, i]=!= x, i++];
                    i]
 period[{3/101, 6/101}]
25
 period[{27/76, 58/76}]
9
catgraph[r_, n_] := Module[{line, line2},
        line =  Table[{i, i}/r,{i, 0, r-1}];
        line2 = Apply[Point[{#1, #2}]&, line, 1];
                Show[Graphics[line2/.x_?PointQ :> cat2[x, n]], 
Frame->True,
                        AspectRatio->Automatic
                ]
]
Table[catgraph[101,i],{i,0,25}]

---------------------------------------------------------------------

I would like one iteration more which allows me to implement this 
solution using any color image.  I would especially like to use a color
image of a cat.  There is a great cat image in the new MMA v 3.0
manual.

Can someone proficient with handling images help here?

Also, does anyone know if the Arnold's Cat Map transformation is
applicable in n-dimensions, particurlarly in three dimensions as
this should be producable graphically using MMA v 3.0.

I would like to thank individuals who have provided the solutions
shown above.  Both have very nice features and are very 
efficient.

Thank you to anyone in the group who can provide help.

Sincerely,

Wilson Figueroa

wfiguero at mosquito.com


  • Prev by Date: Euclidean Matrix Norm
  • Next by Date: Re: List of variable names
  • Previous by thread: Re: Arnold's Cat Map
  • Next by thread: Re: Arnold's Cat Map