sl.smalltriag.area: Compute Small Triangle Area on Sphere

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

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

Description

Compute the area of a small triangle on a sphere.

Usage

1

Arguments

lon

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

lat

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

Details

This function works in x-y-z coordinates, meaning that it becomes imprecise for larger triangles (e.g. spanning more than a few degrees). However, the function is comparably fast and may therefore be favoured when applied to many small triangles. If accuracy is an issue, use sl.triag.area instead.

Value

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

Author(s)

Helge Goessling

See Also

sl.triag.area, sl.polygon.area

Examples

1
2
3
4
5
6
7
8
9
sl.smalltriag.area(lon=c(0,2,1),lat=c(0,0,1))
## Should return:
## [1] 0.0003045813
## (Compare the result of sl.triag.area: 0.0003046329)

sl.smalltriag.area(c(0,60,30),c(0,0,30))
## Should return:
## [1] 0.2454951
## (Compare the result of sl.triag.area: 0.2866951)

helgegoessling/spheRlab documentation built on Sept. 29, 2018, 12:09 p.m.