| MADNESS
    version 0.9
    | 
A rectangle (2 dimensions) More...
#include <sdf_shape_2D.h>


| Public Member Functions | |
| SDFRectangle (const coord_2d &length, const coord_2d ¢er) | |
| Constructor for rectangle.  More... | |
| double | sdf (const coord_2d &pt) const | 
| Computes the normal distance.  More... | |
| coord_2d | grad_sdf (const coord_2d &pt) const | 
|  Public Member Functions inherited from madness::SignedDFInterface< 2 > | |
| virtual double | sdf (const Vector< double, NDIM > &x) const =0 | 
| Returns the signed distance from the surface,.  More... | |
| virtual Vector< double, NDIM > | grad_sdf (const Vector< double, NDIM > &x) const =0 | 
| Returns the gradient of the signed distance from the surface (i.e., dsdf(x)/dx[i] )  More... | |
| virtual | ~SignedDFInterface () | 
| Protected Attributes | |
| const coord_2d | lengths | 
| Half the length of each side.  More... | |
| const coord_2d | center | 
| the center  More... | |
A rectangle (2 dimensions)
This SDF naively uses contours, and should be improved for serious usage.
Constructor for rectangle.
| length | The lengths of the rectangle | 
| center | The center of the rectangle | 
Computes the gradient of the SDF.
| pt | Point at which to compute the gradient | 
References MADNESS_EXCEPTION.
| 
 | inline | 
Computes the normal distance.
| pt | Point at which to compute the distance from the surface | 
References mpfr::fabs(), and max.
| 
 | protected | 
the center
| 
 | protected | 
Half the length of each side.
 1.8.8
 1.8.8