Sphere¶
-
class
Sphere
: public feasst::Shape¶ A sphere is given by a center point and a radius.
Public Functions
-
Sphere
(const argtype &args, const Position center)¶ - Parameters
center
: position of the center of the sphere in absolute coordinates.
args:
radius: Set the radius of the sphere.
-
Sphere
(const argtype &args)¶ Same as above, but the center is assumed to be the origin.
-
double
nearest_distance
(const Position &point) const¶ Return the distance from the point to the nearest point on the surface. The distance is negative if the point is inside of the shape and positive if it is outside.
-
double
surface_area
() const¶ Return the surface area (if implemented).
-
double
volume
() const¶ Return the volume (if implemented).
-
void
surface_mesh
(const int num, std::vector<Position> *points) const¶ - Parameters
num
: The number of points.
Generate approximately equi-distance points on the surface using golden spiral methodology.
http://www.softimageblog.com/archives/115 https://en.wikipedia.org/wiki/Tammes_problem
-