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

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

Compute the area of a triangle on a sphere.

1 | ```
sl.triag.area(lon, lat)
``` |

`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. |

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).

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

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.

Helge Goessling

`sl.smalltriag.area`

, `sl.polygon.area`

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.