Represents spherical coordinates.
Part of MathLib, a diverse library of mathematical functions.
Create a new spherical coordinate with the given radius, rho, and angles in radians, theta and phi.
rho |
radius |
theta |
azimuth angle |
phi |
elevation angle |
Get or set the rho coordinate value.
Get or set the theta coordinate value.
Get or set the phi coordinate value.
Answers a Boolean whether the receiver equals the argument.
Returns a hash value for the receiver.
The math operations of addition, subtraction, multiplication and division are accomplished by first converting to cartesian coordinates, then answering to spherical coordinates.
Scale the radius by some value.
Rotation about the origin in the XY plane by the angle given in radians.
Positive values rotate from +X towards +Y
Rotation about the origin in the YZ plane by the angle given in radians.
Positive values rotate from +Y towards +Z
Rotation about the origin in the XZ plane by the angle given in radians.
Positive values rotate from +X towards +Z
Rotation about the origin in the XY plane by the angle given in radians.
A synonym for rotate.
Rotation about the origin in the YZ plane by the angle given in radians.
A synonym for tilt.
Rotation about the origin in the XZ plane by the angle given in radians.
A synonym for tumble.
Mirror x, reflecting across the YZ plane.
Mirror y, reflecting across the XZ plane.
Mirror z, reflecting across the XY plane.
Mirror across the origin.
Rotate theta by pi and negate phi.
This operation is equivalent to negating rho, and is a synonym for mirrorO.
Answer the radius.
Answer the azimuth angle, theta, in radians.
Answer the azimuth angle, theta, in radians.
Answer the azimuth and elevation angles, theta and phi, in radians.
[ theta, phi ]
Answer the azimuth and elevation angles, theta and phi, in radians.
[ theta, phi ]
Answer the cartesian coordinate x of the receiver.
Answer the cartesian coordinate y of the receiver.
Answer the cartesian coordinate z of the receiver.
Answer the cartesian coordinate x of the receiver.
Answer the cartesian coordinate y of the receiver.
Returns the receiver.
Convert to Polar, discarding z.
Answers a Complex with x as the real part and y as the imaginary part, discarding z.
Convert to Point, discarding z.
Convert to Cartesian.
Joseph Anderson, 2011.