% draw_fig2 redraws with a pause to allow better "movie"
figure(2), clf
axis([-70 70 -70 70])
xlabel('East distance from start  [km]')
ylabel('North distance from start  [km]')
axis square
hold on
title('Pucks on ice, Fig. 2', 'fontsize', 14)
for j=1:floor(length(T)/24)
  plot((XYA(24*j-23,1)-XYA(1,1))/10^3,(XYA(24*j-23,2)-XYA(1,2))/10^3,'bx')
  plot((XYB(24*j-23,1)-XYB(1,1))/10^3,(XYB(24*j-23,2)-XYB(1,2))/10^3,'rx')
  plot((XYA(24*j-23:24*j,1)-XYA(1,1))/10^3,(XYA(24*j-23:24*j,2)-XYA(1,2))/10^3,'b-');
  plot((XYB(24*j-23:24*j,1)-XYB(1,1))/10^3,(XYB(24*j-23:24*j,2)-XYB(1,2))/10^3,'r-');
% M(j)=getframe(gcf);
  pause(0.2)
end
legend('particle A','particle B',4)
quiver(0,0,20,20,0,'k')
text(22,22,'F')