
NAO/RgnCrv.hand link against library
libNAOBase.aThe following constructors are provided:
| NARegionBoundedByCurve(M ); | |||
| Creates a region from it's boundary. | |||
|
The following member functions are available in addition to those provided
by the abstract interface NARegion:
The winding number is defined to be:

The integral is approximated by integrals along line segments approximating the
curve. Some care has to be taken when the point is near the bounding curve.
#include <NAO/RgnCrv.h>
#include <NAO/Ellipse.h>
#include <NAO/UTDrMfld.h>
#include <NAO/UTGraph.h>
int main(int argc, char *argv[])
{
NAManifold *e=new NAEllipse(.5,0.,1.,.3,NAPI/3.);
NARegion *r=new NARegionBoundedByCurve(e);
NADraw(r,"gold3");
NAGraphicsPause();
NAGraphicsClose();
e->unReference();
r->unReference();
return(0);
}
The first statement calls the constructor for the NABall. The second statement constructs a point in R5. The rest of the example prints the point in R5, and tests to see if it is inside the ball or not.
This is what I see when I run this:
drawing a 2-Manifold in 2-Space! (RegionBoundedByCurve) Drawing boundary 0/1 drawing a 1-Manifold in 2-Space! (Ellipse) shpause: Hit enter when you are ready to continue. "q" quits. Shared memory unavailable, using fallback display method.~NATopLevel: Just deleted the last NATopLevel Object total TopLevels allocated 11 PointOnManifolds 8 smartPtr's 0 Manifolds 3 smartPtr's 0 FunctionSpaces 0 smartPtr's 0 Functions 0 smartPtr's 0 OperatorSpaces 0 smartPtr's 0 Operators 0 smartPtr's 0 Algorithms 0 Problems 0 Lists 0
Siblings of this class:
Some other classes that might be of interest are:
[Comments | NAO home page ]
[ IBM home page | Order | Privacy | ContactIBM | Legal ]