/* @file  psEllipse.h
 * @brief functions to manipulate sparse matrices equations
 *
 * $Revision: 1.3 $ $Name: not supported by cvs2svn $
 * $Date: 2007-01-23 22:47:23 $
 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
 */

#ifndef PS_ELLIPSE_H
#define PS_ELLIPSE_H

/// @addtogroup MathOps Mathematical Operations
/// @{

// strucures to define elliptical shape parameters
typedef struct
{
    double major;                       // Major axis
    double minor;                       // Minor axis
    double theta;                       // Position angle
}
psEllipseAxes;

typedef struct
{
    double x2;                          // Moment of xx
    double y2;                          // Moment of yy
    double xy;                          // Moment of xy
}
psEllipseMoments;

typedef struct
{
    double sx;                          // Shape parameter in x
    double sy;                          // Shape parameter in y
    double sxy;                         // Shape parameter in xy
}
psEllipseShape;

// conversions between elliptical shape representations
psEllipseMoments psEllipseAxesToMoments(psEllipseAxes axes);
psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments, double maxAR);
psEllipseShape psEllipseAxesToShape(psEllipseAxes axes);
psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape, double maxAR);

/// @}
#endif
