Isis 3 Programmer Reference
Isis::SurfaceModel Class Reference

Model a 3-D surface. More...

#include <SurfaceModel.h>

Collaboration diagram for Isis::SurfaceModel:
Collaboration graph

Public Member Functions

 SurfaceModel ()
 Constructor. More...
 
 ~SurfaceModel ()
 Destructor. More...
 
void AddTriplet (const double x, const double y, const double z)
 Add a single (x,y,z) triplet to the list of knowns. After all knowns are added invoke the Solve method. More...
 
void AddTriplets (const double *x, const double *y, const double *z, const int n)
 Add an array of (x,y,z) triplet to the list of knowns After all knowns are added invoke the Solve method. More...
 
void AddTriplets (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
 Add an array of (x,y,z) triplet to the list of knowns After all knowns are added invoke the Solve method. More...
 
void Solve ()
 Fit a surface to the input triplets. More...
 
double Evaluate (const double x, const double y)
 Evaluate at x,y to compute z. This is available after the Solve method is invoked. More...
 
int MinMax (double &x, double &y)
 After invoking Solve, a coordinate (x,y) at a local minimum (or maximum) of the surface model can be computed using this method. More...
 

Private Attributes

LeastSquaresp_lsq
 
PolynomialBivariatep_poly2d
 

Detailed Description

Model a 3-D surface.

Given a set of (x,y,z) triplets, this class will model the surface that best fits the points. The equation to be modelled is:

\[ z = a + b*x + c*y + d*x^2 + e*x*y + f*y^2 \]

Author
2005-05-09 Jeff Anderson
History:
2008-06-18 Steven Lambright Fixed ifndef command
Todo:
Add plot and/or visualize method

Definition at line 34 of file SurfaceModel.h.

Constructor & Destructor Documentation

◆ SurfaceModel()

Isis::SurfaceModel::SurfaceModel ( )

Constructor.

Definition at line 11 of file SurfaceModel.cpp.

◆ ~SurfaceModel()

Isis::SurfaceModel::~SurfaceModel ( )

Destructor.

Definition at line 17 of file SurfaceModel.cpp.

Member Function Documentation

◆ AddTriplet()

void Isis::SurfaceModel::AddTriplet ( const double  x,
const double  y,
const double  z 
)

Add a single (x,y,z) triplet to the list of knowns. After all knowns are added invoke the Solve method.

Definition at line 24 of file SurfaceModel.cpp.

References Isis::LeastSquares::AddKnown().

Referenced by AddTriplets().

◆ AddTriplets() [1/2]

void Isis::SurfaceModel::AddTriplets ( const double *  x,
const double *  y,
const double *  z,
const int  n 
)

Add an array of (x,y,z) triplet to the list of knowns After all knowns are added invoke the Solve method.

Definition at line 33 of file SurfaceModel.cpp.

References AddTriplet().

◆ AddTriplets() [2/2]

void Isis::SurfaceModel::AddTriplets ( const std::vector< double > &  x,
const std::vector< double > &  y,
const std::vector< double > &  z 
)

Add an array of (x,y,z) triplet to the list of knowns After all knowns are added invoke the Solve method.

Definition at line 42 of file SurfaceModel.cpp.

References AddTriplet().

◆ Evaluate()

double Isis::SurfaceModel::Evaluate ( const double  x,
const double  y 
)

Evaluate at x,y to compute z. This is available after the Solve method is invoked.

Definition at line 57 of file SurfaceModel.cpp.

References Isis::LeastSquares::Evaluate().

◆ MinMax()

int Isis::SurfaceModel::MinMax ( double &  x,
double &  y 
)

After invoking Solve, a coordinate (x,y) at a local minimum (or maximum) of the surface model can be computed using this method.

Returns
A zero if successful, otherwise, the surface is a plane and has no min/max

Definition at line 70 of file SurfaceModel.cpp.

References Isis::BasisFunction::Coefficient().

◆ Solve()

void Isis::SurfaceModel::Solve ( )

Fit a surface to the input triplets.

Definition at line 51 of file SurfaceModel.cpp.

References Isis::LeastSquares::Solve().


The documentation for this class was generated from the following files: