Stability Islands Within Knot Aurae Daniel McCoy Abstract This
Transcription
Stability Islands Within Knot Aurae Daniel McCoy Abstract This
Stability Islands Within Knot Aurae Daniel McCoy Abstract This project is based on the work of Starrett (2009) who proposed that fitting the vector field of a knot to a polynomial vector field would generate infinite numbers of knots and links in the space surrounding the knot. We attempt to map this space by simulating particles in the surrounding vector field, or Aurae, and constructing islands of stability from these particles trajectories. Generating The Aurae The process of generating the fields that surround the knot is quite simple and may be pursued in a variety of different ways. The method favored by this author is to simply fit the temporal derivative of the parametric equation FX = cos(4 " # t)# [5 + 3cos(6" # t)] FY = sin(4 " # t)# [5 + 3cos(6" # t)] FZ = 3cos(6" # t) Which generates a trefoil as seen in figure 1 in three dimensions ! Fig 1. A trefoil knot Obviously the model terms of the polynomial which we are fitting to are important to this experiment so we will examine their effects on the field by plotting the magnitude of the curl in the xy plane. The magnitude of the curl is averaged vertically over the entire knot on the left of the figure and taken from a slice through the middle on the right in figure 2. The fits are computed up to polynomial degree three after which the fitting algorithm begins to break down. Note that the only knot being analyzed here is the trefoil, but other knots are easily substituted and will be the subject of future study. Average over Z of mag(curl) Middle slice of mag(curl) 3rd degree polynomial 2nd 1st From this we can see clearly that the field rapidly goes infinite outside the knot and that the third order polynomial offers the richest spacial resolution. One may deal with the rapidly increasing field by imposing a function of the form exp(A|x+y+z|) on the field but this is spurious to the matter at hand as we are only interested in closed orbits within the field. We can see from the rapidly increasing nature of the field external to the knot that we can discard points which fall any distance from the knot as all these points will rapidly escape. Generating Particle Paths For a specific starting point a test particle is moved through the field with a simple dynamics engine. This allows us to see that the polynomial fit is working well as particles started at coordinates very near the knot’s will essentially follow the knot as seen in figure 3. Fig 3. Near or bi t to a knot . These trajectories are what we will be analyzing to determine which initial conditions give closed orbits and which are unconstrained. Further, one may observe the effects of slightly changing starting position on the orbit as in the following figures. Fig 4. C h ao tic beha vior in t he vicinit y of a knot . Analysis The analysis which we perform on the orbits is quite simple in this study. To determine if the orbits are closed we will use the method of close returns. Analysis of this data is a little time consuming due to the number of computer intensive trajectories which must be calculated for each data point in the figure. (To get reasonable results as to whether the trajectory is closed requires a smallish time step and a large number of steps) The figure presented below is the product of a large number of discrete trajectory calculations and took all of the computational resources of the computer center approximately three days to run. The author is interested in adding to this set of data further after the semester ends. The figure it self is very simple, first we generate a 6 by 6 by 12 lattice centered around the knot and extending to its edges. At each lattice point a particle is started and its resultant trajectory is analyzed to determine if it is closed. Figure 5 shows this with each grid point in blue and closed orbits circled in green. Fig 5. D a t a poin t l a t t ice. (Green circle are closed). Which is fairly uninformative, although it gives the reader of how many data points were used. To better visualize this we take all points which generate closed orbits and create surfaces as in figure 6. This figure shows that there are areas of high entrapment in the ends of the knot and a little in the middle while the center is quite unstable. Unfortunately we must conclude this study here for now as this is the most regularly spaced grid points which we may run in the time allowed, but given enough time we may be able to create detailed maps of stable areas of space within not only trefoils, but other knots as well. Fig 6. A trefoil knot Conclusion and Future Work To summarize, we have taken a knot and the fit a polynomial field to its tangent vectors. We may pursue various approaches to damping this field out so that it doesn’t go to infinity at large distances in future studies. From examining the curl we can see that a third degree polynomial has a good level of complexity and it is used for all the simulations in this study. Once the field is in place we can treat this as a simple dynamics problem. From testing by eye we can determine how many iterations and what size time step should be used to give a dependable closed orbit. To automate the process of determining if an orbit is closed we use the method of close returns. From this we can run a large number of starting positions and get an idea of what regions give stable orbits and which ones escape. Sadly, this data is a little sparse and further simulation is warranted. Extended pursuance of this project would implement a faster dynamics engine and perhaps gaining access to the NMT cluster. For now we can see that there are stable areas around the top and bottom of the knot and around the middle with voids of escaping points in the lobes. More data points would allow better analysis of this shape. Other interesting ideas to pursue might be to try different knots, and varying the parameterization of the knot to see what effects this might have on the areas of stability. Biliography Starrett, J Knots and Links and Aurae (2009) Murasagi Knot Theory & Its Applications (1929) Modern Birkhauser Classics Palm, WJ Introduction to Matlab 7 for Engineers (2005) McGraw Hill Press, et. al. Numerical Recipes (1986) Cambridge University Press Appendix: Code (the original files are at http://infohost.nmt.edu/~dmccoy/knot/) MAIN CODE: function[ ]=generateisland(sub,XIC,YIC,ZIC) %USAGE: Sub=0 generates a contour plot, sub=1 generates a trajectory for %every run and plots it to the screen, sub =2 kills all plotting %XIC etc. are generated by makeics.m and must be equal length vectors of %initial condition points. close all time=4000; dt=0.05; var=0.1; disp('generating knot') knot=getparametric; %figure(1) %plot3(knot(1,:),knot(2,:),knot(3,:),'LineWidth',2,'Color','k') %print -dpdf -noui 'Trefoil.pdf' step=0.1; lim=max(knot(1,:)); limx=lim; limy=lim; limz=lim; disp('Entering fitting routine') [coeffx,coeffy,coeffz]=knotfit(knot); disp('fit complete') if sub==1 generatecontour end disp(YIC) for i=1:length(XIC) disp('Iteration') disp([i length(XIC)]) [trajectory{i},escape(i)]=gen_trajectory(XIC(i),YIC(i),ZIC(i),dt,time,coeffx,coeffy,coeffz); current=trajectory{i}; disp('Trajectory Done') if sub==0 if max(current)<1000 hold all disp('Plotting') figure(1) plot3(current(1,:),current(2,:),current(3,:)) end end result(i)=0; freq(i)=0; if escape(i)==0 disp('Analyzing for close orbits') [result(i),freq(i)]=analyze_traj(trajectory{i},var); end ICstr=strcat(num2str(XIC(i)),'_',num2str(YIC(i)),'_',num2str(ZIC(i))); filename=strcat('traj',ICstr,'.mat') icx=XIC(i); icy=YIC(i); icz=ZIC(i); TT=trajectory{i}; reso=result(i); fff=freq(i); eesc=escape(i); save(filename,'icx','icy','icz','TT','reso','fff','eesc'); end -----------------------------------------getparametric.m ------------------------------------------ function [knot] = getparametric () step =0.01; maxt=10; t=[0:step:maxt]; for i=1:maxt/step+1 trefoilx(i)=cos(4*t(i)*pi)*(5+3*cos(6*t(i)*pi)); trefoily(i)=sin(4*t(i)*pi)*(5+3*cos(6*t(i)*pi)); trefoilz(i)=-3*sin(6*t(i)*pi); end knot=[trefoilx;trefoily;trefoilz;t]; end -----------------------------------------knotfit.m -----------------------------------------function [coeffX,coeffY,coeffZ]=knotfit(knot) Dknot=[diff(knot(1,:));diff(knot(2,:));diff(knot(3,:));diff(knot(4,:))]; DX=Dknot(1,:); DY=Dknot(2,:); DZ=Dknot(3,:); DT=Dknot(4,:); len=size(knot); len=len(2); X=knot(1,1:len-1); Y=knot(2,1:len-1); Z=knot(3,1:len-1); indepvar=[X' Y' Z']; modelterms=3; coeffX=polyfitn(indepvar,DX,modelterms); coeffY=polyfitn(indepvar,DY,modelterms); coeffZ=polyfitn(indepvar,DZ,modelterms); disp(coeffZ.VarNames) disp(coeffZ.ModelTerms) disp(coeffZ.Coefficients) end -----------------------------------------generatecontour.m -----------------------------------------[BOXX,XC,YC,ZC]= fieldgenerate(coeffx,limx,limy,limz,step); disp('Xfield generated') [BOXY,XC,YC,ZC]= fieldgenerate(coeffx,limx,limy,limz,step); disp('Yfield generated') [BOXZ,XC,YC,ZC]= fieldgenerate(coeffz,limx,limy,limz,step); disp('Zfield generated') [curlx,curly,curlz,cav]=curl(XC,YC,ZC,BOXX,BOXY,BOXZ); MAG=BOXX.*BOXX+BOXY.*BOXY+BOXZ.*BOXZ; avg_MAG=mean(MAG,3); %disp(avg_MAG) figure(1) contour3(-avg_MAG,30) print -dpdf -noui 'Overallcontour.pdf' figure(2) contour3(-MAG(:,:,round(size(MAG,3)/2)),30) print -dpdf -noui 'MiddleContour.pdf' -----------------------------------------gen_trajectory.m -----------------------------------------function[trajectory,escape]=gen_trajectory(XIC,YIC,ZIC,dt,time,coeffx,coeffy,coeffz) steps=time/dt; escape=0; xp(1)=XIC; yp(1)=YIC; zp(1)=ZIC; b(1)=0;b(2)=0;b(3)=0; for i=1:steps-1 [fx]=forcecalc(coeffx,xp(i),yp(i),zp(i)); [fy]=forcecalc(coeffy,xp(i),yp(i),zp(i)); [fz]=forcecalc(coeffz,xp(i),yp(i),zp(i)); FF=fx+fy+fz; if isnan(FF)==1 disp('error, divide by zero') disp([xp(i-2) yp(i-2) zp(i-2)]) disp('@ ICS:') disp([XIC YIC ZIC]) escape=-1; break end xp(i+1)=xp(i)+(fx+b(1))*(dt^2); yp(i+1)=yp(i)+(fy+b(2))*(dt^2); zp(i+1)=zp(i)+(fz+b(3))*(dt^2); end trajectory=[xp;yp;zp]; end -----------------------------------------analyze_trajectory.m -----------------------------------------function[reoccur,freq]=analyze_traj(traj,var) reoccur=0;freq=0; numpts=5000; step=round(length(traj)/numpts); ind=[1:step:step*numpts]; course=traj(:,ind); diff=100; for i=1:length(course) point=course(:,i); for j=i+100:length(course) inspect=traj(:,j); % disp([course(:,i) course(:,j)]) % disp([ind(i) ind(j)]) % disp(diff) diff=sum(abs(inspect-point)); if diff<var freq=1; reoccur=1; return end end end -----------------------------------------forcecalc.m -----------------------------------------function[force]=forcecalc(coeff,XC,YC,ZC) terms=size(coeff.ModelTerms); terms=terms(1); F=0; for m=1:terms; xxx=coeff.ModelTerms(m,1); yyy=coeff.ModelTerms(m,2); zzz=coeff.ModelTerms(m,3); F=F+coeff.Coefficients(m)*XC^(xxx)*YC^(yyy)*ZC^(zzz); end force=F;%*exp(-(100)*(XC+YC+ZC)); end -----------------------------------------fieldgenerate.m -----------------------------------------function [BOX,XC,YC,ZC]=fieldgenerate(coeff,boxx,boxy,boxz,step) XC=[-boxx:step:boxx]; YC=[-boxy:step:boxy]; ZC=[-boxz:step:boxz]; lengthx=size(XC); lengthy=size(YC); lengthz=size(ZC); length=[lengthx' lengthy' lengthz']; length=length(2,:) BOX=zeros(length(1),length(2),length(3)); terms=size(coeff.ModelTerms) terms=terms(1) for i=1:length(1); % Loopx for j=1:length(2); % Loopy for k=1:length(3); % Loopz for m=1:terms; % disp([i length(1) j length(2) k length(3)]) xxx=coeff.ModelTerms(m,1); yyy=coeff.ModelTerms(m,2); zzz=coeff.ModelTerms(m,3); BOX(i,j,k)=BOX(i,j,k)+coeff.Coefficients(m)*XC(i)^(xxx)*YC(j)^(yyy)*ZC(k)^(zzz); end end end end end -----------------------------------------Auxiliary Programs -----------------------------------------readall.m -----------------------------------------flist=dir('traj*.mat') ICX=zeros(1,length(flist)); ICY=ICX;ICZ=ICX; ESC=ICX; CLOSED=ICX; FREQ=ICX; for i=1:length(flist) disp(i) load(flist(i).name) % load files in workspace ESC(i)=eesc; FREQ(i)= fff; ICX(i)= icx; ICY(i)=icy; ICZ(i)= icz; CLOSED(i)= reso ; end -----------------------------------------makeics.m -----------------------------------------function[XIC,YIC,ZIC]=makeics(XIC,YIC,ZIC,step) step=step; ZIC=ZIC; XIC=[XIC(1):step:XIC(2)] YIC=[YIC(1):step:YIC(2)] xd=[];yd=[];zd=[]; for i=1:length(YIC) yy=ones(1,length(XIC)).*YIC(i); zz=ones(1,length(XIC)).*ZIC; xd=[xd XIC]; yd=[yd yy]; zd=[zd zz]; end XIC=xd;YIC=yd;ZIC=zd; -----------------------------------------plotclosed.m -----------------------------------------close all figure(1) scatter3(ICX,ICY,ICZ,1); hold on inde=find(ESC==0); ICXC=ICX(inde);ICYC=ICY(inde);ICZC=ICZ(inde);CLOSEDC=CLOSED(inde); scatter3(ICXC,ICYC,ICZC,40,CLOSEDC*20) XX=[-6:2:6]; YY=[-6:2:6]; ZZ=[-6:1:6]; V=ones(length(XX),length(YY),length(ZZ)); for i=1:length(ICX) xind=find(ICX(i)==XX); yind=find(ICY(i)==YY); zind=find(ICZ(i)==ZZ); V(xind,yind,zind)=CLOSED(i); end figure(2) contourslice(XX,YY,ZZ,V,[],[],[-6:1:6],[-1 0],'cubic') [f,v]=isosurface(XX,YY,ZZ,V,0); p=patch('Faces',f,'Vertices',v); isonormals(XX,YY,ZZ,V,p) set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1]) view(3); camlight lighting gouraud return figure(4) data=smooth3(V,'box',0.1); p1 = patch(isosurface(data,.5), ... 'FaceColor','blue','EdgeColor','none'); p2 = patch(isocaps(data,.5), ... 'FaceColor','interp','EdgeColor','none'); isonormals(data,p1) view(3); axis vis3d tight camlight; lighting phong