Class SphericalPoint
java.lang.Object
nl.tudelft.simulation.language.d3.SphericalPoint
A spherical point as defined in
https://mathworld.wolfram.com/SphericalCoordinates.html . Also according to ISO 31-11
Copyright (c) 2002-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Author:
- Peter Jacobs
-
Constructor Summary
ConstructorsConstructorDescriptionSphericalPoint(double radius, double theta, double phi) constructs a new SphericalPoint. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoublegetPhi()doubledoublegetTheta()inthashCode()converts a spherical point to a Cartesian point.static CartesianPointtoCartesianPoint(SphericalPoint point) converts a spherical point to a Cartesian point.toString()
-
Constructor Details
-
SphericalPoint
public SphericalPoint(double radius, double theta, double phi) constructs a new SphericalPoint.- Parameters:
radius- radiustheta- thetaphi- phi
-
-
Method Details
-
getPhi
public double getPhi()- Returns:
- phi
-
getRadius
public double getRadius()- Returns:
- radius
-
getTheta
public double getTheta()- Returns:
- theta
-
toCartesianPoint
converts a spherical point to a Cartesian point.- Returns:
- the Cartesian point
-
toCartesianPoint
converts a spherical point to a Cartesian point.- Parameters:
point- the spherical point- Returns:
- the Cartesian point
-
hashCode
public int hashCode() -
equals
-
toString
-