skspatial.objects.Sphere.volume¶
- Sphere.volume() float [source]¶
Return the volume of the sphere.
The volume \(V\) of a sphere with radius \(r\) is
\[V = \frac{4}{3} \pi r ^ 3\]- Returns:
- np.float64
Volume of the sphere.
Examples
>>> from skspatial.objects import Sphere
>>> Sphere([0, 0, 0], 1).volume().round(2) 4.19
>>> Sphere([0, 0, 0], 2).volume().round(2) 33.51