#include </usr1/tp517/Tumble/trunk/src/tumble/cell.h>
Inheritance diagram for CurvedTriangle:
Public Member Functions | |
bool | newton_find (const Point2D &p, double &u, double &v, int &niter, int &edge_num) const |
Given a point find this triangle's barycentric coordinates for it. | |
bool | newton_find (const Point2D &p, double &u, double &v) const |
virtual void | jacobian_matrix (double u, double v, Point2D &pdu, Point2D &pdv) const=0 |
virtual Point2D | eval (double u, double v) const=0 |
CurvedTriangle () | |
virtual | ~CurvedTriangle () |
As we would like both BeizerTriangles and GhostTriangles to have the ability to run the newton_find() algorithm we inherit from this common super class.
Definition at line 671 of file cell.h.
virtual CurvedTriangle::~CurvedTriangle | ( | ) | [inline, virtual] |
bool CurvedTriangle::newton_find | ( | const Point2D & | p, | |
double & | u, | |||
double & | v, | |||
int & | niter, | |||
int & | edge_num | |||
) | const |
Given a point find this triangle's barycentric coordinates for it.
This function is used to do a reverse lookup. If you have a geometric point and want to know if that point is inside this triangle, and if so what it's parametrization is, then use this function.
This function uses newtons method to find the find the point. Its tolerance is controlled by several static variables in Cell.C.
This function will consider the location a failure if either u,v, or u+v is not in [0,1], as this indicates the point is outside the triangle.
p | The point to search for | |
[out] | u | The first parameter on a successful location |
[out] | v | The second parameter on a successfull location |
[out] | niter | The number of iterations to converge |
[out] | edge_num | If the convergence is outside of the triangle, the edge number accross which the point is located |
Definition at line 2383 of file cell.C.
References Point2D::cross(), eval(), jacobian_matrix(), and Point2D::magsq().
Referenced by newton_find(), and BezierTriangle::newton_find().
Here is the call graph for this function:
bool CurvedTriangle::newton_find | ( | const Point2D & | p, | |
double & | u, | |||
double & | v | |||
) | const |
Definition at line 2451 of file cell.C.
References newton_find().
Here is the call graph for this function:
virtual Point2D CurvedTriangle::eval | ( | double | u, | |
double | v | |||
) | const [pure virtual] |