sl.triag.area: Compute Triangle Area on Sphere

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

sl.triag.areaR Documentation

Compute Triangle Area on Sphere

Description

Compute the area of a triangle on a sphere.

Usage

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

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

helgegoessling/spheRlab documentation built on April 8, 2024, 8:34 a.m.