Identify the center of a small circle based on three points of a sphere
Usage
sc_center(x, origin = c(0, 0, 0), output = "polar")Value
A list with two elements, the center o the small circle and the surface radius of the small circle.
Examples
# generate 3 points on a sphere
set.seed(2)
ps <- icosa::rpsphere(3, output="polar")
small <- sc_center(x=ps)
circle<- sc_shape(x=small$center, r=small$r, output="polar")
plot(NULL, NULL, xlim=c(-180, 180), ylim=c(-90, 90))
points(ps, col="red", pch=3, cex=4)
points(small$center, col="blue", pch=16)
points(circle, col="green", pch=16)
