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

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

Compute the area of a small triangle on a sphere.

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

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

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.

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

Helge Goessling

`sl.triag.area`

, `sl.polygon.area`

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 Dec. 16, 2018, 8:07 a.m.

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.