sph2car | R Documentation |
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)
long |
longitude values, can also contain a matrix of long, lat and radius (in that order). |
lat |
latitude values. |
radius |
radius values. |
deg |
Specifies if input is in degrees (default) or radians. |
This is a low level function that is used for plot transformations.
A data.frame is returned containing the columns x, y and z.
Aaron Robotham
rgl.sphgrid
,rgl.sphcirc
,rgl.sphpoints
,rgl.sphtext
,rgl.sphsun
,rgl.sphMW
,pointsphere
,car2sph
print(sph2car(45,0,sqrt(2),deg=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.