function [len, hline] = moveto(xy, h, rad, col);
% function [len, hline] = moveto(xy, h, rad, col);
loc=get(h,'position');
if nargin>3,
	hline = line([loc(1)+rad, xy(1)+rad],[loc(2)+rad, xy(2)+rad],'color',col);
else
	hline = line([loc(1)+rad, xy(1)+rad],[loc(2)+rad, xy(2)+rad]);
end;
len=xy-loc(1:2);
len=sqrt(len*len');
loc(1:2)=xy;
set(h,'position',loc);
