
load ball.dat;
[N,M]=size(ball);
x=ball(1:N-1,:)-ball(2:N,:);
size(x)
x=sqrt(sum((x.^2)')');
x(N)=0;
i=1;
for ii=1:N;
	s(i,:)=ball(ii,:);
	i=i+1;
	if (x(ii) > 20)
		i
		if ( i>10) 
			figure(1);
			plot(s(1:i-2,1)-s(2:i-1,1));
			figure(2);
			plot(s(1:i-2,2)-s(2:i-1,2));
			figure(3);
			plot(s(1:i-1,1),s(1:i-1,2));
			k=waitforbuttonpress;
		end;
		i=1;
	end;
end;


