GenerateCircle {spherepc} | R Documentation |
Generating circle on sphere
Description
This function makes a circle on the unit 2-sphere.
Usage
GenerateCircle(center, radius, T = 1000)
Arguments
center |
center of circle with spatial locations (longitude and latitude denoted by degrees). |
radius |
radius of circle. It should be in [0, pi]. |
T |
the number of points that make up circle. The points in circle are equally spaced. The default is 1000. |
Details
This function makes a circle on the unit 2-sphere.
Value
matrix consisting of spatial locations with two columns.
Author(s)
Jongmin Lee
See Also
Examples
library(rgl)
library(sphereplot)
library(geosphere)
circle <- GenerateCircle(c(0, 0), 1)
# plot (It requires to load 'rgl', 'sphereplot', and 'geosphere' R package.)
sphereplot::rgl.sphgrid()
sphereplot::rgl.sphpoints(circle[, 1], circle[, 2], radius = 1, col = "blue", size = 12)
[Package spherepc version 0.1.7 Index]