function ngc6543(action)
% NGC6543 Shows Hubble Telescope Image of Star

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

if nargin <1 
  action = 'init';
end

switch action
case 'init',
  figurePos=get(0,'DefaultFigurePosition');
  figurePos(3:4)=[560 420];
  figure('NumberTitle', 'off',...
         'Name', 'ngc6543a Image',...
         'Position', figurePos);

  rgb = imread('ngc6543a.jpg');
  image(rgb);
  set(gca,'Position',[0 0 1 1])
  
  % Create the buttons
  frm = uicontrol('Style', 'frame',....
      'Units', 'normal', 'Position',...
      [.83 .115 .14 .17],...
      'BackGroundColor', [.4 .4 .4]);
  
  hndl = uicontrol('Style', 'push',...
       'String', 'Close',...
       'Units', 'normal',...
       'Position', [.85 .14 .1 .05],...
       'callback', 'close');
  
  info =  uicontrol('Style', 'push',...
       'String', 'info',...
       'Units', 'normal',...
       'Position', [.85 .21 .1 .05],...
       'callback', 'ngc6543(''info'')');
  set(gca, 'cameraviewangle', 5,...
       'Units', 'normalized',...
       'Position', [0 -.05 1 1]);

  h = uicontrol('Style', 'text',...
       'Units', 'normal', ...
       'String', 'Cat''s Eye Nebula',...
       'Position', [.32 .89 .35 .07],...
       'BackGroundColor', [0 0 0] ,...
       'ForeGroundColor', [1 1 1],...
       'FontUnits', 'points',...
       'FontSize', 14,...
       'Fontweight', 'bold');   

case 'info',
  
  ttl = 'NGC6543 Nebula';
  str = {'This image was created by the Space Telescope Science Institute,'
  'operated by the Association of Universities for Research in Astronomy,'
  'Inc., with support from NASA contract NAS5-26555, and is reproduced'
  'with permission from AURA/STScI. Digital renditions of images produced'
  'by AURA/STScI are obtainable royalty-free. Credits: J. P. Harrington'
  'and K. J. Borkowski (University of Maryland), and NASA.'
  ' '
  'PHOTO RELEASE NO.:  STScI-PRC95-01'
  ' '
  'HUBBLE PROBES THE COMPLEX HISTORY OF A DYING STAR '
  ' '
  'This NASA Hubble Space Telescope image shows one of the most complex'
  'planetary nebulae ever seen, NGC 6543, nicknamed the "Cat''s Eye'
  'Nebula." Hubble reveals surprisingly intricate structures including'
  'concentric gas shells, jets of high-speed gas and unusual shock-induced'
  'knots of gas.  Estimated to be 1,000 years old, the nebula is a visual'
  '"fossil record" of the dynamics and late evolution of a dying star.'
  ' '
  'A preliminary interpretation suggests that the star might be a'
  'double-star system. The dynamical effects of two stars orbiting one'
  'another most easily explains the intricate structures, which are much'
  'more complicated than features seen in most planetary nebulae.  (The'
  'two stars are too close together to be individually resolved by Hubble,'
  'and instead, appear as a single point of light at the center of the'
  'nebula.)'
  ' '
  'According to this model, a fast "stellar wind" of gas blown off the'
  'central star created the elongated shell of dense, glowing gas.  This'
  'structure is embedded inside two larger lobes of gas blown off the star'
  'at an earlier phase.  These lobes are "pinched" by a ring of denser'
  'gas, presumably ejected along the orbital plane of the binary'
  'companion.'
  ' '
  'The suspected companion star also might be responsible for a pair of'
  'high- speed jets of gas that lie at right angles to this equatorial'
  'ring.  If the companion were pulling in material from a neighboring'
  'star,  jets escaping along the companion''s rotation axis could be'
  'produced.'
  ' '
  'These jets would explain several puzzling features along the periphery'
  'of the gas lobes.  Like a stream of water hitting a sand pile, the jets'
  'compress gas ahead of them, creating the "curlicue" features and bright'
  'arcs near the outer edge of the lobes.  The twin jets are now pointing'
  'in different directions than these features.  This suggests the jets'
  'are wobbling, or precessing, and turning on and off episodically.'
  ' '
  'This color picture, taken with the Wide Field Planetary Camera-2,  is a'
  'composite of three images taken at different wavelengths. (red,'
  'hydrogen-alpha; blue, neutral oxygen, 6300 angstroms; green, ionized'
  'nitrogen, 6584 angstroms).  The image was taken on September 18, 1994.'
  'NGC 6543 is 3,000 light-years away in the northern constellation'
  'Draco.'
  ' '
  'The term planetary nebula is a misnomer; dying stars create these'
  'cocoons when they lose outer layers of gas.  The process has nothing to'
  'do with planet formation, which is predicted to happen early in a'
  'star''s life.'
  ' '
  'This material was presented at the 185th meeting of the American'
  'Astronomical Society in Tucson, AZ on January 11, 1995.'
  ' '
  'Credit: J.P. Harrington and K.J. Borkowski (University of Maryland),'
  'and NASA'
  ' '
  ' filename: ngc6543.m'};
    helpwin(str, ttl);
end




