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

Usage

1
GenerateCircle(center, radius, T = 1000)

Arguments

center

center of circle.

radius

radius of circle. It should be in [0, pi].

T

the number of points in circle.

Details

This function makes a circle on a 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 April 14, 2020, 6:41 p.m.