Skip to main content

NAO


NAO Class NADisc

Overview


An NADisc is the region
   Disc = { x | x in R^2, |x-c|<=1 }


It is very similar to the NABall, except that the radius is always 1, the Disc is always 2-dimensional, and the Disc has a boundary (the unit circle with the same center).


User's Guide


To use this class, you must include the header file
NAO/Disc.h
and link against library
libNAOBase.a
The following constructors are provided:

The following member functions are available in addition to those provided by the abstract interface NARegion:


Programmer's Guide


The NADisc stores the center of the Disc. The default origin is the point (0,0).

The test for inclusion in the Disc is simply:

  isitinChart((x,y))= (x-xc)*(x-xc)+(y-yc)*(y-yc) <= 1

The Disc, unlike the Ball, has a boundary. The boundary is a unit circle with the same center as the Disc. The boundary is implemented as a class private to the Disc, of type "DiscBoundary".


Example


To create a unit disc with center at 1,2:
#include<NAO/Disc.h>

NAManifold *disc=new NADisc(1.,2.);

See also the Disc example in the Examples document.


Related Classes and Subroutines


The parent of this class:

Siblings of this class:

See also:


Created: Fri Oct 9 09:23:57 EDT 1998

[Comments | NAO home page ]

[Research home page]

[ IBM home page | Order | Privacy | ContactIBM | Legal ]