inertia: Moment of inertia tensor

View source: R/inertia.R

inertiaR Documentation

Moment of inertia tensor

Description

Computes the moment of inertia tensor of a set of point masses in arbitrary dimensions,

\mathbf{I} = \sum_i m_i \left( |\mathbf{x}_i|^2\mathbf{1} - \mathbf{x}_i\mathbf{x}_i^\mathrm{T} \right),

where \mathbf{1} is the identity matrix.

Usage

inertia(x, m = 1)

Arguments

x

Numeric vector or matrix. If a matrix is supplied, each row is interpreted as a point.

m

Numeric scalar or vector of point masses. If a scalar is supplied, the same mass is assigned to every point.

Value

A symmetric d\times d matrix containing the moment of inertia tensor, where d is the dimension of the points.

See Also

moments, quadrupole


cooltools documentation built on Sept. 11, 2026, 5:06 p.m.