MADNESS 0.10.1
|
A spherical surface (3 dimensions) More...
#include <sdf_shape_3D.h>
Public Member Functions | |
SDFSphere (const double radius, const coord_3d ¢er) | |
SDF for a sphere. | |
coord_3d | grad_sdf (const coord_3d &pt) const |
Computes the gradient of the SDF. | |
double | sdf (const coord_3d &pt) const |
Computes the normal distance. | |
![]() | |
virtual | ~SignedDFInterface () |
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] ) | |
virtual double | sdf (const Vector< double, NDIM > &x) const=0 |
Returns the signed distance from the surface,. | |
Protected Attributes | |
const coord_3d | center |
Center of sphere. | |
const double | radius |
Radius of sphere. | |
A spherical surface (3 dimensions)
SDF for a sphere.
radius | The radius of the sphere |
center | The center of the sphere |
Computes the gradient of the SDF.
pt | Point at which to compute the gradient |
References center, madness::g, and madness::nonlinear_vector_solver().
Computes the normal distance.
This SDF is exact, and easy to show.
pt | Point at which to compute the distance from the surface |
References center, madness::nonlinear_vector_solver(), and radius.
|
protected |
Center of sphere.
Referenced by grad_sdf(), and sdf().