Usage
inertia_tensor(x, w = NULL)
Arguments
- x
numeric. Can be three element vector, three column array, or an
object of class "line"
or "plane"
- w
numeric. weightings
Details
$$D = n - (x_i, y_i, z_i) (x_i, y_i, z_i)^T$$
Examples
set.seed(1)
x <- rfb(100, mu = Line(120, 50), k = 1, A = diag(c(10, 0, 0)))
inertia_tensor(x)
#> [,1] [,2] [,3]
#> [1,] 89.33396 114.39372 106.83139
#> [2,] 114.39372 55.78596 97.73437
#> [3,] 106.83139 97.73437 54.88008