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
|
s |
positive number, the radius of the Poincaré ball if
|
tmax |
positive number controlling the length of the gyroray |
OtoA |
Boolean, whether the gyroray must be directed from
|
model |
the hyperbolic model, either |
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]