Skip to contents

Inertia tensor

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

Value

3 x 3 matrix

Details

$$D = n - (x_i, y_i, z_i) (x_i, y_i, z_i)^T$$

See also

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.57957 112.32135 107.80095
#> [2,] 112.32135  56.08848  94.91204
#> [3,] 107.80095  94.91204  54.33194