gyroray {gyro}R Documentation

Gyroray

Description

Gyroray given an origin and a point.

Usage

gyroray(O, A, s = 1, tmax = 20, OtoA = TRUE, model = "U", n = 300)

Arguments

O, A

two distinct points (of the same dimension); the point O is the origin of the gyroray

s

positive number, the radius of the Poincaré ball if model="M", otherwise, if model="U", this number defines the hyperbolic curvature

tmax

positive number controlling the length of the gyroray

OtoA

Boolean, whether the gyroray must be directed from O to A or must be the opposite one

model

the hyperbolic model, either "M" (Möbius model, i.e. Poincaré model) or "U" (Ungar model, i.e. hyperboloid model)

n

number of points forming the gyroray

Value

A numeric matrix with n rows. Each row is a point of the gyroray with origin O (the first row) and passing through A or not, according to OtoA.

Examples

library(gyro)
# a 2D example ####
O <- c(1, 2); A <- c(1, 1)
opar <- par(mar = c(2, 2, 2, 0.5))
plot(rbind(O, A), type = "p", pch = 19, xlab = NA, ylab = NA,
     xlim = c(0, 2), ylim = c(0, 3), main = "s = 0.3")
s <- 0.3
ray <- gyroray(O, A, s)
lines(ray, col = "blue", lwd = 2)
text(t(O), expression(italic(O)), pos = 2)
text(t(A), expression(italic(A)), pos = 3)
# opposite gyroray
yar <- gyroray(O, A, s, OtoA = FALSE)
lines(yar, col = "red", lwd = 2)
par(opar)

[Package gyro version 1.4.0 Index]