sl.triag.area: Compute Triangle Area on Sphere

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/sl.triag.area.R

Description

Compute the area of a triangle on a sphere.

Usage

1
sl.triag.area(lon, lat)

Arguments

lon

a vector of length 3 specifying the longitudes of the triangle vertices.

lat

a vector of length 3 specifying the longitudes of the triangle vertices.

Details

This function is based on Girard's theorem: the area of a triangle on a unit sphere equals the excess of the sum of angles over pi (180 degrees).

Value

A scalar giving the area of the triangle (on a unit sphere).

Note

This function is more accurate for large triangles but less accurate for small ones compared to sl.smalltriag.area. Also, sl.smalltriag.area is computationally cheaper, so for small triangles (<1/100 degrees or so), sl.smalltriag.area should be preferred in any case.

Author(s)

Helge Goessling

See Also

sl.smalltriag.area, sl.polygon.area

Examples

1
2
3
sl.triag.area(c(0,60,30),c(0,0,30))
## Should return:
## [1] 0.2866951

helgegoessling/spheRlab documentation built on Sept. 29, 2017, 6:36 a.m.