(* This is the file MakeFramesSquares.m, written by Douglas N. Arnold Department of Mathematics Penn State University Park, PA 16802 January 1997, June 1997 *) Needs["homotopyframes`"] Needs["Graphics`Colors`"] (* This file makes two sets of GIF files to be used as animations showing how four small squares are deformed under an analytic and a non-analytic cubic polynomial transformation of the plane. The image of the squares is shown as the identity is deformed by linear homotopy to the mapping. *) (* STEP 1: DESCRIBE THE DESIRED ANIMATIONS *) f0[z_]:=z (* initial and final functions *) f1[z_]:=(z^3-3z^2-1)/(1+3I) (* of the homotopies *) f2[z_]:=(z^3-3Conjugate[z]^2-1)/(1+3I) llplot=-1-I; (* lower left and upper right corners of *) urplot=-llplot; (* plotting region *) nframes=11; (* number of frames in the animation *) pixels=400 (* size of the image in pixels *) options = (* plot options for each frame *) {Background->Black, DefaultColor->White, AspectRatio->Automatic}; (* describe the squares *) a=(1+I)/2; d=.2; nl=5; squares = Union[ linearray[a,(1+d)a,nl,nl,PlotStyle->{Magenta}], linearray[-a,-(1+d)a,nl,nl,PlotStyle->{Green}], linearray[Conjugate[a],(1+d)Conjugate[a],nl,nl,PlotStyle->{Cyan}], linearray[-Conjugate[a],-(1+d)Conjugate[a],nl,nl,PlotStyle->{Yellow}]]; (* STEP 2: MAKE THE ANIMATIONS *) homotopyframes[ (* initial function *) f0, (* final function *) f1, (* curvelist *) squares, (* number of frames *) nframes, (* resolution *) pixels, (* filename prefix *) "squares1-", (* Show options (for each frame) *) options, PlotRange->{{Re[llplot],Re[urplot]},{Im[llplot],Im[urplot]}} ]; Print["-- wrote frames for squares1 --"] homotopyframes[ (* initial function *) f0, (* final function *) f2, (* curvelist *) squares, (* number of frames *) nframes, (* resolution *) pixels, (* filename prefix *) "squares2-", (* Show options (for each frame) *) options, PlotRange->{{Re[llplot],Re[urplot]},{Im[llplot],Im[urplot]}} ]; Print["-- wrote frames for squares2 --"]