View source: R/utils-spherical.R
arcpoints | R Documentation |
This function calculates points along an arc between two points and a circle center.
arcpoints(
p1,
p2,
breaks = 2,
origin = c(0, 0, 0),
onlyNew = FALSE,
output = "cartesian",
radius = authRadius
)
p1 |
( |
p2 |
( |
breaks |
( |
origin |
( |
onlyNew |
( |
output |
( |
radius |
( |
The function always returns the smaller arc, with angle alpha < pi.
Either an XYZ or a long-lat numeric matrix.
# empty plot
plot(NULL, NULL, xlim=c(-180, 180), ylim=c(-90,90))
# then endpoints of the arc
point1<-c(-45,-70)
point2<-c(130,65)
points(arcpoints(point1, point2, breaks=70, output="polar"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.