function plot_motion(a,b,c,t,h,alpha,beta,v)

x(1) = -b;
z(1) = (b+a*b)*sin(alpha(1))+h(1);
x(2) = a*b;
z(2) = h(1);
x(3) = c*b;
z(3) = -(c-a)*b*sin(alpha(1))+h(1);
x(4) = b;
z(4) = -(c-a)*b*sin(alpha(1))-(b-c*b)*sin(beta(1))+h(1);


figure
ph = plot(x,z);

xlim([-2*b 2*b]);
ylim([2*min(h) 2*max(h)]);

set(ph,'EraseMode','xor');

for i = 1:length(t)

x(1) = -b;
z(1) = (b+a*b)*sin(alpha(i))+h(i);
x(2) = a*b;
z(2) = h(i);
x(3) = c*b;
z(3) = -(c-a)*b*sin(alpha(i))+h(i);
x(4) = b;
z(4) = -(c-a)*b*sin(alpha(i))-(b-c*b)*sin(beta(i))+h(i);

set(ph,'XData',x);
set(ph,'YData',z);
%set(t1,'String',['Time = ',num2str(t(i),'%4.0f'),' seconds']);
pause(t(2)-t(1));
end



%figure
%h2 = plot(x,eta0(1,:));
%aa = axis;
%aa(3) = min(min(eta0));
%aa(4) = max(max(eta0));
%axis(aa);
%set(h2,'EraseMode','xor')
%t1 = text(aa(2)-60,aa(4)-0.1,['Time = ',num2str(0.0,'%4.3f'),' seconds']);
%title('Wave Elevation');
%xlabel('x (m)');
%ylabel('\eta (m)');


%for i = 1:length(t)
%set(h2,'YData',eta0(i,:));
%set(t1,'String',['Time = ',num2str(t(i),'%4.0f'),' seconds']);
%set(l1,'XData',[t(i) t(i)]);
%pause(dt);
%end
