cart2sph: Convert spherical to Cartesian coordinates or vice versa
Description
These functions interconvert coordinate systems.
Usage
cart2sph(df)
sph2cart(df)
Arguments
df
For cart2sph, a data frame with columns named x, y and z containing the Cartesian coordinates to be converted. For sph2cart, a data frame with columns named r, theta and phi with the radius and angles (in spherical coordinates)
Value
A data frame with named columns containing the converted coordinates.