graphics_toolkit('fltk')  % currently necessary for Octave
movie = 0; %% switch to generate movie 0: no movie, 1: movie generated
cd pngmovie
k = 1;
plot3(x(:,k),y(:,k),h(:,k));
xlabel('x'); ylabel('y'); zlabel('h');
axis([-14 14 -14 14 -360 80])
grid on
for k = 1:nt
   plot3(x(:,k),y(:,k),h(:,k),'*-');
   axis([-14 14 -14 14 -360 80])
   xlabel('x'); ylabel('y'); zlabel('h');
   grid on
   drawnow();
if movie
   filename = ['movie',sprintf('%03i',k),'.png'];
   print(filename,'-dpng')
end%if
end%for

if movie
  system('avconv -r 10 -i ./movie%03d.png -c:v libx264 -r 10 -pix_fmt yuv420p Circle.mp4')
  system('rm -f *.png');
end%if
cd ..
