sph.angles: Calculate angles in a spherical polygon

sph.anglesR Documentation

Calculate angles in a spherical polygon

Description

Calculate the size of all angles in a spherical polygon

Usage

  sph.angles(win)

Arguments

win

A window. Must be an object of class sphwin with type="polygon".

Details

This function uses the spherical geometry and the spherical cosine rule to calculate the sizes of all angles in a spherical polygon.

Value

A numeric containing the sizes of all angles in radians, given in an anticlockwise direction. The first angle in the numeric is at the second of the vertices in listed under param in the sphwin object.

Author(s)

Tom Lawrence <email: tjlawrence@bigpond.com>

See Also

sphcos (spherical cosine rule), sphsin (spherical sine rule)

Examples

x <- matrix(nrow=4, ncol=2)
x[1,] <- c(0,0)
x[2,] <- c(pi/2, 0)
x[3,] <- c(pi/2, pi/2)
x[4,] <- c(0,0)
sphpoly <- sphwin(type="polygon", param=x, ref=rep(0, 3), ref3=c(pi/4,pi/4))
sph.angles(win=sphpoly)

baddstats/spherstat documentation built on Feb. 6, 2023, 1:45 a.m.