| convertspherCart | R Documentation |
convert2 converts from Cartesian to spherical coordinates,
whereas convert3 converts from spherical to Cartesian coordinates.
convert2(points, rad = 1) convert3(points, rad = 1)
points |
The coordinates of the points to be converted. See Details. |
rad |
The radius of the sphere, by default set to 1. Not required if
|
For convert2, points must contain locations of a point or
points in Cartesian coordinates. This can be an object of class
sp3 or a length 3 vector or a 3 column matrix.
For convert3, points must contain locations of a point
or points in spherical coordinates. This can be an object of class
sp2 or a length 2 vector or a 2 column matrix.
The output of convert2 is either an object of class sp2
(if points is an object of class sp2), or a 2
column matrix giving the locations of points in spherical coordinates.
The output of convert2 is either an object of class sp2
(if points is an object of class sp3), or a 3
column matrix giving the locations of points in Cartesian
coordinates.
Tom Lawrence <email: tjlawrence@bigpond.com>
convert.globe, convert.sphereplot
sphere <- sphwin(type="sphere") X <- rpoispp.sphwin(sphere, lambda=20) Y <- convert3(X) i3 <- matrix(c(1,0,0,0,1,0,0,0,1), nrow=3, ncol=3, byrow=TRUE) convert2(i3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.