%liss3dmn Film einer Lissajous-Figur MLISS:NLISS (def 1:2) in 3D
t = 0:0.1:6.3;
if ( exist('MLISS') ==0 | exist('NLISS') ==0) 
  a=1; b = 2;
else
  a=MLISS ; b = NLISS;
end
x = cos(a*t) ;  y = sin(a*t) ;  z = cos(b*t);
zc1 = ones(1,length(t)) ;  zc2 = -ones(1,length(t));
xl = [1 1] ;  yl = [0 0] ;  zl = [-1 1];
for again = 1:5
  clf
  tet = input(' 3D Lissajous-Figur - Eingabe Aufsicht-Winkel (grad):');
  if isempty(tet)  
    tet = 0;
  end
  hdl=plot3(x,y,z,'k') ;  hold on
  axis ([-1.1 1.1 -1.1 1.1 -1.1 1.1]) ;  axis square;  view(0,tet);
  plot3(x,y,zc1,'g') ;  plot3(x,y,zc2,'g') 
  hdlr = plot3(xl,yl,zl,'r') ;   hdlb = plot3(yl,xl,zl,'b');
  hold off
% Drehung
  for k=2:2:360
    rotate(hdl,[0 0 1],2) ;    rotate(hdlr,[0 0 1],2)
    rotate(hdlb,[0 0 1],2);    pause(0.1)
  end
  rep = input(' nochmals (Zahl = yes, ret=nein)?');
  if isempty(rep)
    break
  end
end

