EGXPhys

Functions

template<typename T , typename T2 >
void EGXMath::EllipsoidInertia (const T mass, const T aSemiPrincipleAxisInm, const T bSemiPrincipleAxisInm, const T cSemiPrincipleAxisInm, T2(&matrix)[9])
 Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html. More...

 
template<typename T , typename T2 >
void EGXMath::EllipsoidInertia (const T mass, const T aSemiPrincipleAxisInm, const T bSemiPrincipleAxisInm, const T cSemiPrincipleAxisInm, std::vector< T2 > &matrix)
 Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html. More...

 
template<typename T >
void EGXMath::EllipsoidInertia (const T mass, const T aSemiPrincipleAxisInm, const T bSemiPrincipleAxisInm, const T cSemiPrincipleAxisInm, glm::mat3 &matrix)
 Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html. More...

 

Detailed Description

Function Documentation

◆ EllipsoidInertia() [1/3]

template<typename T , typename T2 >
void EGXMath::EllipsoidInertia ( const T  mass,
const T  aSemiPrincipleAxisInm,
const T  bSemiPrincipleAxisInm,
const T  cSemiPrincipleAxisInm,
T2(&)  matrix[9] 
)

Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html.

Parameters
mass\( m\ (kg)\) Mass of the ellipsoid.
aSemiPrincipleAxisInm\( a\ (m)\) Semi-principle axis of the ellipsoid that lays along the x-axis in meters.
bSemiPrincipleAxisInm\( b\ (m)\) Semi-principle axis of the ellipsoid that lays along the y-axis in meters.
cSemiPrincipleAxisInm\( c\ (m)\) Semi-principle axis of the ellipsoid that lays along the z-axis in meters.
matrix\( I_{ellipsoid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the ellipsoid.
See also
EllipsoidSurfaceArea() for surface area of an ellipsoid.
EllipsoidVolume() for volume of an ellipsoid.
SphereInertia() for inertial tensor of a sphere.
SpheroidInertia() for inertial tensor of a spheroid.

◆ EllipsoidInertia() [2/3]

template<typename T , typename T2 >
void EGXMath::EllipsoidInertia ( const T  mass,
const T  aSemiPrincipleAxisInm,
const T  bSemiPrincipleAxisInm,
const T  cSemiPrincipleAxisInm,
std::vector< T2 > &  matrix 
)

Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html.

Parameters
mass\( m\ (kg)\) Mass of the ellipsoid.
aSemiPrincipleAxisInm\( a\ (m)\) Semi-principle axis of the ellipsoid that lays along the x-axis in meters.
bSemiPrincipleAxisInm\( b\ (m)\) Semi-principle axis of the ellipsoid that lays along the y-axis in meters.
cSemiPrincipleAxisInm\( c\ (m)\) Semi-principle axis of the ellipsoid that lays along the z-axis in meters.
matrix\( I_{ellipsoid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the ellipsoid.
See also
EllipsoidSurfaceArea() for surface area of an ellipsoid.
EllipsoidVolume() for volume of an ellipsoid.
SphereInertia() for inertial tensor of a sphere.
SpheroidInertia() for inertial tensor of a spheroid.

◆ EllipsoidInertia() [3/3]

template<typename T >
void EGXMath::EllipsoidInertia ( const T  mass,
const T  aSemiPrincipleAxisInm,
const T  bSemiPrincipleAxisInm,
const T  cSemiPrincipleAxisInm,
glm::mat3 &  matrix 
)

Finds the moment of inertia tensor, \(I_{ellipsoid}\) of an ellipsoid with three distinct semi-principle axes, \(a\), \(b\) and \(c\). It is assumed that \(a\) lays on the x-axis, \(b\) on the y-axis and \(c\) on the z-axis.

\[ I_{ellipsoid}=\begin{bmatrix} \frac{1}{5}m\ b^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{1}{5}m\ a^2b^2 \end{bmatrix} \]

See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaEllipsoid.html.

Parameters
mass\( m\ (kg)\) Mass of the ellipsoid.
aSemiPrincipleAxisInm\( a\ (m)\) Semi-principle axis of the ellipsoid that lays along the x-axis in meters.
bSemiPrincipleAxisInm\( b\ (m)\) Semi-principle axis of the ellipsoid that lays along the y-axis in meters.
cSemiPrincipleAxisInm\( c\ (m)\) Semi-principle axis of the ellipsoid that lays along the z-axis in meters.
matrix\( I_{ellipsoid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the ellipsoid.
See also
EllipsoidSurfaceArea() for surface area of an ellipsoid.
EllipsoidVolume() for volume of an ellipsoid.
SphereInertia() for inertial tensor of a sphere.
SpheroidInertia() for inertial tensor of a spheroid.