GenerateCircle: Generating circle on sphere

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

View source: R/spherepc.R

Description

This function makes a circle on the unit 2-sphere.

Usage

1
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

PrincipalCircle.

Examples

1
2
3
4
5
6
7
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)

spherepc documentation built on Oct. 7, 2021, 9:14 a.m.