powered by
Transforms 3D spherical coordinates to cartesian coordinates. The user can choose to input the spherical coordinates in degrees or radians.
sph2car(long, lat, radius = 1, deg = TRUE)
Longitude values, can also contain a matrix of long, lat and radius (in that order).
Latitude values.
Radius values.
Specifies if input is in degrees (default) or radians.
A data.frame is returned containing the columns x, y and z.
This is a low level function that is used for plot transformations.
coordmatch
# NOT RUN { print(sph2car(45,0,sqrt(2),deg=TRUE)) # }
Run the code above in your browser using DataLab