function status = TERNNew(self, theName, x, y, z, c)

% TERNNew -- Constructor for TERN class.
 
% Copyright (C) 1996 Dr. Charles R. Denham, ZYDECO.
% All Rights Reserved.
 
% Version of 17-Sep-96 at 11:33:13.05.

Class('TERN', 'FSW')

if nargin < 1, help TERNNew, return, end
if nargin < 2, theName = 'TERN Window'; end

if (0)
   theFSW = DoNew('FSW', theName);
   DoEnable(DoGetUI(theFSW), self)
  else
   theFigure = figure('name', theName);
   DoEnable(theFigure, self)
end

FSWMenu(self)
TernMenu(self)

if nargin == 3
   TernPLot(x);
  elseif nargin == 4
   TernPLot(x, y);
  elseif nargin == 5
   TernPLot(x, y, z);
  elseif nargin == 6
   TernPLot(x, y, z, c);
end

hold on
theBox = DoNew('DATA', TernBox(gca, 4));
theGrid = DoNew('DATA', TernGrid(gca, 4));
theTics = DoNew('DATA', TernTics(gca, 4));
TernView
TernAxes

DoSetHan(self, 'itsBox', theBox)
DoSetHan(self, 'itsGrid', theGrid)
DoSetHan(self, 'itsTics', theTics)

TERNCommand(self, 'Grid', 'off')
TERNCommand(self, 'Tics', 'off')
