sknano.core.geometric_regions.Sphere¶
-
class
sknano.core.geometric_regions.Sphere(center=None, r=1)[source][source]¶ Geometric3DRegionfor a sphere.New in version 0.3.0.
Parameters: center : array_like, optional
Either a 3-tuple of floats or an instance of the
Pointclass specifying the \((x,y,z)\) coordinates of theSpherecenter.r : float, optional
Sphere radius \(r\)
Attributes
centerSpherecenter point \((h, k, l)\).centroidAlias for center.fmtstrFormat string. measureAlias for volume, which is the measure of a 3D geometric region.rSphereradius, \(r\).volumeSpherevolume, \(V=\frac{4}{3}\pi r^3\).Methods
center_centroid()Center centroidon origin.contains(point)Test region membership of point in Sphere.rotate([angle, axis, anchor_point, ...])Rotate GeometricRegionpointsandvectors.todict()Returns a dictof theSphereconstructor parameters.translate(t[, fix_anchor_points])Translate GeometricRegionpointsandvectorsbyVectort.