% -------------------------------------------------------------------------
% script file for making movies of 3D rotations
%
% set i = 0 before running this script the first time
% -------------------------------------------------------------------------

i = i + 1; % select a new case every time the script is run
switch i
case  1
  axis1 = 'x'; axis2 = 'y'; axis3 = 'x';
case  2
  axis1 = 'x'; axis2 = 'y'; axis3 = 'z';
case  3
  axis1 = 'x'; axis2 = 'z'; axis3 = 'y';
case  4
  axis1 = 'x'; axis2 = 'z'; axis3 = 'x';
case  5
  axis1 = 'y'; axis2 = 'z'; axis3 = 'y';
case  6
  axis1 = 'y'; axis2 = 'z'; axis3 = 'x';
case  7
  axis1 = 'y'; axis2 = 'x'; axis3 = 'z';
case  8
  axis1 = 'y'; axis2 = 'x'; axis3 = 'y';
case  9
  axis1 = 'z'; axis2 = 'x'; axis3 = 'z';
case 10
  axis1 = 'z'; axis2 = 'x'; axis3 = 'y';
case 11
  axis1 = 'z'; axis2 = 'y'; axis3 = 'x';
case 12
  axis1 = 'z'; axis2 = 'y'; axis3 = 'z';
otherwise
  disp('Done.'); i = 0; % reset i, ready to run again
end

Line = [3 -5 -7 1; 16 12 8 1]'; % line defined by two points

RotMovieBody(Line, axis1, axis2, axis3);
