

figure('position',get(0,'screensize'));
axes('position',[0 0 1 1]);
[x,y]=ginput;

n=length(x);
s=(1:n)';
t=(1:0.05:n)';

for spline_type=1:3

switch spline_type
case 1
    u=interp1(s,x,t,'nearest');
    v=interp1(s,y,t,'nearest');
case 2
    u=interp1(s,x,t,'linear');
    v=interp1(s,y,t,'linear');
case 3
    u=interp1(s,x,t,'spline');
    v=interp1(s,y,t,'spline');
end

clf reset;

plot(x,y,'.',u,v,'-'); hold on;
fprintf('\n \t [PAUSE]');
pause

format long
[x y]

end

