Learn R Programming

spherepc (version 0.1.2)

GenerateCircle: Generating circle on sphere

Description

This function makes a circle on the sphere.

Usage

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.

Value

matrix consisting of spatial locations with two columns.

Details

This function makes a circle on a sphere.

See Also

PrincipalCircle.

Examples

Run this code
# NOT RUN {
library(rgl)
library(sphereplot)
library(geosphere)
circle <- GenerateCircle(c(0, 0), 1)
# plot (It requires to load 'rgl', 'sphereplot', and 'geosphere' R package.)
rgl.sphgrid()
rgl.sphpoints(circle[, 1], circle[, 2], radius = 1, col = "blue", size = 12)
# }

Run the code above in your browser using DataLab