View source: R/cartesian2sphere.R
cartesian2sphere | R Documentation |
Convert Cartesian coordinates to spherical coordinates
cartesian2sphere(lon, lat, lonR = NULL, latR = NULL, verbose = FALSE)
lon |
A numeric vector of longitudes |
lat |
A numeric vector of latitudes |
lonR |
Center longitude of viewing angle |
latR |
Center latitude of viewing angle |
verbose |
a boolean; if TRUE print information about progress |
A list(X=X, Y=Y, Z=Y) where X is the radial distance, Y is the polar angle, and Z is the azimuthal angle. When displaying data on a spherical grid, the longitude/latitude coordinate system is replaced with X/Z, i.e., plot(X, Z) instead of plot(lon, lat).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.