(***********************************************************************
This file was generated automatically by the Mathematica front end.
It contains Initialization cells from a Notebook file, which typically
will have the same name as this file except ending in ".nb" instead of
".m".

This file is intended to be loaded into the Mathematica kernel using
the package loading commands Get or Needs.  Doing so is equivalent to
using the Evaluate Initialization Cells menu command in the front end.

DO NOT EDIT THIS FILE.  This entire file is regenerated automatically 
each time the parent Notebook file is saved in the Mathematica front end.
Any changes you make to this file will be overwritten.
***********************************************************************)





Clear[T,\[Alpha],x,y]
T[x_,y_,\[Alpha]_]:={x Cos[\[Alpha]] - (y-x^2) Sin[\[Alpha]],
    			    x Sin[\[Alpha]] + (y - x^2) Cos[\[Alpha]]}























































































Clear[td,ic,\[Alpha],x,y]
td[x_,y_,\[Alpha]_]:=T[x,y,\[Alpha]]/;-1<x<1 /;-1<y<1





























Clear[linef]
linef[x_]:=x*.8
linef2[x_]:=-x*.7 +.3

















Clear[circletopf,circlebotf]
circletopf[x_] := Sqrt[.7^2 - x^2]
circlebotf[x_] :=-Sqrt[.7^2 - x^2]



























sinf[x_]:=Sin[x*Pi]
sin2f[x_]:=Sin[x*Pi/3+.3]
cosf[x_]:=Cos[x*Pi]



















Clear[a,b,c,d,e,f,nextStep,ns,ic,graphPoints, icLine,icSin,icCircle,step]

nextStep[x_,y_,\[Alpha]_]:=
  Thread[Sequence[DeleteCases[Thread[td[x,y,\[Alpha]]],td[_,_,_]]]]
ns[ic_,\[Alpha]_] :=nextStep[ic[[1]],ic[[2]],\[Alpha]]

ic[f_,step_]:={Range[-1,1,step],Table[f[i],{i,-1,1,step}]}




Clear[icLine,icLine2,icSin,icCircle]
icLine[step_] := {Range[-1,1,step],Table[linef[i],{i,-1,1,step}]}

icLine2[step_] := {Range[-1,1,step],Table[linef2[i],{i,-1,1,step}]}

icSin[step_] := {Range[-1,1,step],Table[sinf[i],{i,-1,1,step}]}

icCircle[step_] := {Flatten[{Range[-.7,.7,step],Range[-.7,.7,step]}],
    Flatten[{Table[circletopf[i],{i,-.7,.7,step}],
        Table[circlebotf[i],{i,-.7,.7,step}]}]}









































alpha1 = ArcCos[-.05];
alpha2 = ArcCos[.4];
alpha3 = ArcCos[.24];



iterateHenon[ic_,nmax_,\[Alpha]_]:=
  	Module[
    	{n=0,
      g=ListPlot[DeleteCases[Thread[ic],{_,_Complex}],AspectRatio\[Rule]1,
          PlotRange\[Rule]{{-1,1},{-1,1}}],nextS=ic},
    	{While[n<nmax,
        	{nextS = ns[nextS,\[Alpha]],
          	
          g = Flatten[{g,Graphics[Hue[n/nmax]],
                ListPlot[DeleteCases[Thread[nextS],{_,_Complex}],
                  AspectRatio\[Rule]1,Axes\[Rule]True,
                  PlotRange\[Rule]{{-1,1},{-1,1}},
                  DefaultColor\[Rule]Hue[n/nmax]]}],
          	n=n+1}],
      Show[Flatten[{Graphics[PointSize[0.001]],g}],AspectRatio\[Rule]1,
        Axes\[Rule]True,PlotRange\[Rule]{{-1,1},{-1,1}}]}]

Clear[plotIcColor]
plotIcColor[ic_]:=
  Module[{initial =DeleteCases[Thread[ic],{_,_Complex}] },
    Thread[{Map[Hue,Range[0,1,1/(Length[initial]-1)]],Map[Point,initial]}]]







iterateHenon2[ic_,nmax_,\[Alpha]_]:=
  	Module[
    	{n=0,g=plotIcColor[ic],nextS=ic},
    	{While[n<nmax,
        	{nextS = ns[nextS,\[Alpha]],
          	g =Flatten[{g,plotIcColor[nextS]}],
          	n=n+1}],
      Show[Map[Graphics,Flatten[{PointSize[.005],g}]],AspectRatio\[Rule]1,
        PlotRange->{{-1,1},{-1,1}}]}]











































































