Skip to contents

Rotate vector object to position that eigenvectors are parallel to axes of coordinate system: E3||X (north-south), E2||X(east-west), E1||X(vertical)

Usage

center(x, max_vertical = FALSE)

Arguments

x

Object of class "Vec3", "Line" or "Plane"

max_vertical

Whether the maximum of the von Mises-Fisher distribution is already vertical or not.

Value

Object of class of x

See also

Examples

set.seed(1)
mu <- Line(120, 50)
x <- rvmf(100, mu = mu, k = 20)
x_centered <- center(x)

# plot results
plot(x, col = "grey")
points(x_centered, col = "black")
legend("topright", legend = c("original", "centered"), col = c("grey", "black"), pch = 16)