Skip to contents

Inertia tensor

Usage

# S3 method for class 'spherical'
inertia_tensor(x, w = NULL)

inertia_tensor(x, w = NULL)

Arguments

x

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

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(20250411)
x <- rfb(100, mu = Line(120, 50), k = 1, A = diag(c(10, 0, 0)))
inertia_tensor(x)
#>           [,1]      [,2]      [,3]
#> [1,]  90.78673 111.69263 104.58105
#> [2,] 111.69263  59.24772 100.69700
#> [3,] 104.58105 100.69700  49.96555