function p = foxvel(t,x)
% usage: p = foxvel(t,x)
% description: gives vector velocity of fox using rabbit functions.

global k;
global ctime;

dx  = rabbitpos(t) - x;
normdx = norm(dx);
if (normdx < 0.01)
    p = rabbitvel(t);
    if (ctime == 0)
        ctime = t;
    end    
else
    p = k*norm(rabbitvel(t))*dx/normdx;
end
