Class Sphere2D
- java.lang.Object
-
- org.hipparchus.geometry.spherical.twod.Sphere2D
-
- All Implemented Interfaces:
Serializable
,Space
public class Sphere2D extends Object implements Serializable, Space
This class implements a two-dimensional sphere (i.e. the regular sphere).We use here the topologists definition of the 2-sphere (see Sphere on MathWorld), i.e. the 2-sphere is the two-dimensional surface defined in 3D as x2+y2+z2=1.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static double
SMALLEST_TOLERANCE
Smallest tolerance that can be managed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkTolerance(double tolerance)
Check tolerance againstSMALLEST_TOLERANCE
.int
getDimension()
Get the dimension of the space.static Sphere2D
getInstance()
Get the unique instance.Sphere1D
getSubSpace()
Get the n-1 dimension subspace of this space.
-
-
-
Method Detail
-
getInstance
public static Sphere2D getInstance()
Get the unique instance.- Returns:
- the unique instance
-
checkTolerance
public static void checkTolerance(double tolerance) throws MathIllegalArgumentException
Check tolerance againstSMALLEST_TOLERANCE
.- Parameters:
tolerance
- tolerance to check- Throws:
MathIllegalArgumentException
- if tolerance is smaller thanSMALLEST_TOLERANCE
-
getDimension
public int getDimension()
Get the dimension of the space.- Specified by:
getDimension
in interfaceSpace
- Returns:
- dimension of the space
-
getSubSpace
public Sphere1D getSubSpace()
Get the n-1 dimension subspace of this space.- Specified by:
getSubSpace
in interfaceSpace
- Returns:
- n-1 dimension sub-space of this space
- See Also:
Space.getDimension()
-
-