(*   This is the file MakeZ2Frames.m, written by

     Douglas N. Arnold  <dna@math.psu.edu>
     Department of Mathematics
     Penn State
     University Park, PA  16802
     
     January 1997
*)
      
Needs["homotopyframes`"]
Needs["Graphics`Colors`"]

(* Make some animations of the homotopy from the identity to z^2 and
   store them.
*)

width=400             (* frame width in pixels *)
height=400            (* frame height in pixels *)

(* image of a Cartesian grid in the right half plane *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[vlinearray[-1.5I,1.5+1.5I,6,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      hlinearray[-1.5I,1.5+1.5I,11,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2a",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}
];
Print["-- wrote frames z2a --"]

(* image of a Cartesian grid in the left half plane *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[vlinearray[-1.5-1.5I,1.5I,6,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      hlinearray[-1.5-1.5I,1.5I,11,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2b",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}
];
Print["-- wrote frames z2b --"]

(* image of a Cartesian grid in both half planes *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[vlinearray[-1.5-1.5I,1.5+1.5I,11,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      hlinearray[-1.5-1.5I,1.5+1.5I,11,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2c",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}];
Print["-- wrote frames z2c --"]

(* image of a polar grid in the right half plane *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[spokearray[0,1/3,2,-Pi/2,Pi/2,7,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      circlearray[0,1/3,2,-Pi/2,Pi/2,6,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2d",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}];
Print["-- wrote frames z2d --"]

(* image of a polar grid in the left half plane *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[spokearray[0,1/3,2,Pi/2,3Pi/2,7,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      circlearray[0,1/3,2,Pi/2,3Pi/2,6,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2e",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}];
Print["-- wrote frames z2e --"]


(* image of a polar grid in the both half planes *)
homotopyframes[
  (* initial function *)
    # &,
  (* final function *)
    #^2 &,
  (* curvelist *)
    Join[spokearray[0,1/3,2,-Pi,Pi,13,
      PlotStyle->{{Thickness[.006],Magenta}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic],
      circlearray[0,1/3,2,-Pi,Pi,6,
      PlotStyle->{{Thickness[.006],Yellow}},
      Background->Black,
      DefaultColor->White,
      AspectRatio->Automatic]],
  (* number of frames *)
    11,
  (* width and height *)
    width, height,
  (* filename prefix *)
    "z2f",
  (* options (for each frame) *)
    PlotRange->{{-4,4},{-4,4}}];
Print["-- wrote frames z2f --"]


