(* This is the file MakeFramesZ2.m, written by Douglas N. Arnold Department of Mathematics Penn State University Park, PA 16802 January 1997 *) Needs["homotopyframes`"] Needs["Graphics`Colors`"] (* This file makes an animation of a linear homotopy by showing the evolution of the image of a rainbow shaded disc. The frames of the evolution are output as PPM files. *) (* STEP 1: DESCRIBE THE DESIRED ANIMATION *) f0[z_]:=z (* initial and final functions *) f1[z_]:=z^2 (* of the homotopy *) center=0; (* center, radius, initial angle, and final *) radius=2; (* angle of the disc sector to plot *) arg0=-Pi/2; arg1=3Pi/2; llplot=-4.5-4.5 I; (* lower left and upper right corners of *) urplot=-llplot; (* plotting region *) nframes=11; (* number of frames in the animation *) spokes=1200; (* number of vertical lines (these have varying hue) *) starthue=0; (* starting and ending hues for the vertical lines *) endhue=1; (* (both should be in [0,1] ) *) sthickness=.012; (* thickness of the vertical lines *) circles=6; (* number of r=const. circles to superimpose *) ccolor=GrayLevel[.25]; (* color of the superimposed circles *) cthickness=.006 (* thickness of the superimposed circles *) bdrycolor=White; (* color of the boundary *) bdrythickness=.008 (* thickness of the boundary lines *) width=400 (* frame width in pixels *) height=400 (* frame height in pixels *) options = (* general plot options *) {Background->Black, DefaultColor->White, AspectRatio->Automatic}; (* STEP 2: MAKE THE ANIMATION *) homotopyframes[ (* initial function *) f0, (* final function *) f1, (* curvelist *) Join[ (* colored radii *) Table[ spoke@@Join[{center,0,radius,arg0+(arg1-arg0)j/spokes, PlotStyle->{{Thickness[sthickness], Hue[starthue + (endhue-starthue)j/spokes]}}}, options], {j,0,spokes}], (* horizontal grid lines *) circlearray@@Join[{center,radius/circles,radius-radius/circles, arg0,arg1,circles-1, PlotStyle->{{Thickness[cthickness],ccolor}}}, options], (* boundary *) {circle@@Join[{center,radius,arg0,arg1, PlotStyle->{{Thickness[bdrythickness],bdrycolor}}}, options]} ], (* number of frames *) nframes, (* width and height *) width, height, (* filename prefix *) "frame", (* options for each frame *) PlotRange->{{Re[llplot],Re[urplot]},{Im[llplot],Im[urplot]}} ]; Print[StringJoin["-- wrote frames --"]]