Skip to contents

Decomposition of Orientation Tensor Eigenvectors and Eigenvalues

Usage

ot_eigen(x, scaled = FALSE, ...)

Arguments

x

object of class "Vec3", "Line", "Ray", or "Plane", where the rows are the observations and the columns are the coordinates.

scaled

logical. Whether the Eigenvectors should be scaled by the Eigenvalues (only effective if x is in Cartesian coordinates).

...

additional arguments passed to ortensor().

Value

list containing

values

Eigenvalues

vectors

Eigenvectors in coordinate system of x

See also

Examples

set.seed(20250411)
mu <- rvmf(n = 1)
x <- rfb(100, mu = mu, k = 1, A = diag(c(10, 0, 0)))
x_eigen <- ot_eigen(x)
x_eigen
#> eigen() decomposition
#> $values
#> [1] 0.50728225 0.44931162 0.04340613
#> 
#> $vectors
#> Vector (Vec3) object (n = 3):
#>              x            y          z
#> [1,] 0.8693159 -0.003890268 -0.4942416
#> [2,] 0.4149276  0.549090456  0.7254893
#> [3,] 0.2685610 -0.835753873  0.4789472
#> 
plot(x, col = "grey")
points(mu, col = 4)
text(mu, labels = "Mean", col = 4, pos = 4)
points(x_eigen$vectors, col = c(1, 2, 3))
text(x_eigen$vectors, col = c(1, 2, 3), labels = c("E1", "E2", "E3"), pos = 4)