function moeb;
%   A 3-D model of the familiar Moebius strip, shown here
%  with four half-twists instead of the usual one, created
%  with MATLAB 5.
%
%  Filename: moeb.m

%   Yama Habibzai
%   Copyright (c) 1984-98 by The MathWorks, Inc. All Rights Reserved
%   $Revision: 1.6 $
%   $Date: 1997/12/03 17:29:58 $ 

figurePos = getfgpos(400, 330);
figurePos(1) = figurePos(1)+88;
figurePos(2) = figurePos(2)+31;

figs = allchild(0);
figName = findobj(figs, 'Name', 'Moebius Strip');

if isempty(figName)
  
  fig = figure('Position', figurePos,...
      'Color', [1 1 1],...
      'NumberTitle', 'off',...
      'Tag', 'FrontImage',...
      'Name', 'Moebius Strip',...
      'Resize', 'off');
  axes('Parent', fig, 'Position', [.02 .08 .95 .95]);
  
  frame = uicontrol('Units','pixels', ...
      'Position',[330 10 55 55], ...
      'BackGroundColor', [.7 .7 .7],...
      'Style','frame', ...
      'Tag','Frame1');
  
  push1 = uicontrol('Units','pixels', ...
      'Position',[335 15 45 20], ...
      'callback', 'close',...
      'String', 'Close',...
      'Tag','Pushbutton1');
  
  push1 = uicontrol('Units','pixels', ...
      'Position',[335 40 45 20], ...
      'callback', 'helpwin(help(''moeb''), ''Moebius Strip'');',...
      'String', 'Info',...
      'Tag','Pushbutton1');
  
  for t = 4
    moebius(1/2,t)
    shading interp
    colormap(hsv(512))
    view(-40,40)
    lighting phong
    set(gca,'cameraviewangle', 8.5)
    l = light('pos',[0 -1 1]);
    material([.3 .8 .6 8 1])
    drawnow
  end
end  
