azel.to.sphere.colattitude: Convert azimuth-elevation coordinates to spherical...

Description Usage Arguments Value Author(s) Examples

View source: R/geometry.R

Description

Convert azimuth-elevation coordinates to spherical coordinates

Usage

1

Arguments

r

Coordinates of points in azimuth-elevation coordinates represented as 2 column matrix with column names alpha (elevation) and theta (azimuth).

r0

Direction of the axis of the sphere on which to project represented as a 2 column matrix of with column names alpha (elevation) and theta (azimuth).

Value

2-column matrix of spherical coordinates of points with column names psi (colatitude) and lambda (longitude).

Author(s)

David Sterratt

Examples

1
2
3
r0 <- cbind(alpha=0, theta=0)
r <- rbind(r0, r0+c(1,0), r0-c(1,0), r0+c(0,1), r0-c(0,1))
azel.to.sphere.colattitude(r, r0)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
      [,1] [,2] [,3]
alpha    0    1    0
          [,1]      [,2]      [,3]
[1,]  0.000000 1.0000000  0.000000
[2,]  0.000000 0.5403023  0.841471
[3,]  0.000000 0.5403023 -0.841471
[4,]  0.841471 0.5403023  0.000000
[5,] -0.841471 0.5403023  0.000000
         theta     alpha
[1,]  0.000000  0.000000
[2,]  0.000000  0.841471
[3,]  0.000000 -0.841471
[4,] -0.841471  0.000000
[5,]  0.841471  0.000000
     psi    lambda
[1,]   0  0.000000
[2,]   1  1.570796
[3,]   1 -1.570796
[4,]   1  3.141593
[5,]   1  0.000000

retistruct documentation built on Aug. 10, 2017, 1:03 a.m.