#-------------------------------------------------------------------------# # Animation of the string instanton solutions. This program generates a # # .gif graphics file for each frame of the animation sequence. # # Usage (on UNIX): maple =0 then tp:=cat(`p=`,convert(p,string),` q=`,convert(q,string),` Time Index: `,substring(convert(indx,string),1..7),substring(space,1..7-length(substring(convert(indx,string),1..7)))) else tp:=cat(`p=`,convert(p,string),` q=`,convert(q,string),` Time Index:`,substring(convert(indx,string),1..8),substring(space,1..8-length(substring(convert(indx,string),1..8)))) fi: points:=parse(readline(file)): for i from 1 to q-1 do readline(file): j:=1: for s from 1 to points/2 do # ----First half of string---- pt:=parse(readline(file)): if s=1 then if linalg[iszero](map(Im,pt)) then smin:=pt :b(j):=[pt] else b(j):=[]: smin:=[2.999,2.999,2.999] fi fi: if s>1 then if linalg[iszero](map(Im,pt)) then b(j):=[op(b(j)),pt] else j:=j+1 :b(j):=[]: fi fi: od; k:=1: c(1):=[]: for s from points/2+1 to points do # ----Last half of string---- pt:=parse(readline(file)): if s0 then L1:=[op(L1),b(h)] fi: od: for h from 1 to k do if nops(c(h))>0 then L2:=[op(L2),c(h)] fi: od: if nops(L1)>0 then L1:=op(1,L1): else L1:=[]: fi: if nops(L2)>0 then L2:=op(1,L2): else L1:=[]: fi: d:=[op(d),PLOT3D(POINTS([2.999,2.999,2.999]),COLOR(RGB,0,0,0)),PLOT3D(POINTS([smin,smax]),COLOR(RGB,0,0,0)),PLOT3D(CURVES(L1),COLOR(RGB,1,0,0)),PLOT3D(CURVES(L2),COLOR(RGB,0,0,1))]: od: interface(plotoutput=cat(convert(p,string),`x`,convert(q,string),`-`,convert(n,string),`.gif`),plotoptions=`portrait,noborder,color`): plots[display](d,view=[-3..3,-3..3,-3..3],projection=.1,orientation=[25,60],axes=boxed,labels=['x','y','z'],scaling=constrained,titlefont=[COURIER,10],title=tp); test:=readline(file): unassign('l'):unassign('b'):unassign('points'):close(): od: #quit: #--------------------------------------------------------------------------# # Use `Dave's Targa Animator` to compile the .gif files into a .flc file. # #--------------------------------------------------------------------------#