EGXPhys

Functions

template<typename T , typename T2 >
void EGXMath::SpheroidInertia (const T mass, const T equatorialRadiusInm, const T polarRadiusInm, T2(&matrix)[9])
 Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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::SpheroidInertia (const T mass, const T equatorialRadiusInm, const T polarRadiusInm, std::vector< T2 > &matrix)
 Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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::SpheroidInertia (const T mass, const T equatorialRadiusInm, const T polarRadiusInm, glm::mat3 &matrix)
 Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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

◆ SpheroidInertia() [1/3]

template<typename T , typename T2 >
void EGXMath::SpheroidInertia ( const T  mass,
const T  equatorialRadiusInm,
const T  polarRadiusInm,
T2(&)  matrix[9] 
)

Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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.
equatorialRadiusInm\( a\ (m)\) Equatorial radius in meters. The degenerate semi-principle axis of the spheroid.
polarRadiusInm\( c\ (m)\) Polar radius in meters. The unique semi-principle axis of the spheroid.
matrix\( I_{spheroid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the spheroid.
See also
SpheroidEccentricity() for eccentricity of a spheroid.
SpheroidEquatorialRadius() for equatorial radius of a spheroid.
SpheroidFlattening() for flattening of a spheroid.
SpheroidPolarRadius() for polar radius of a spheroid.
SpheroidSurfaceArea() for surface area of a spheroid.
SpheroidVolume() for volume of a spheroid.
SphereInertia() for inertial tensor of a sphere.
EllipsoidInertia() for inertial tensor of an ellipsoid.

◆ SpheroidInertia() [2/3]

template<typename T , typename T2 >
void EGXMath::SpheroidInertia ( const T  mass,
const T  equatorialRadiusInm,
const T  polarRadiusInm,
std::vector< T2 > &  matrix 
)

Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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.
equatorialRadiusInm\( a\ (m)\) Equatorial radius in meters. The degenerate semi-principle axis of the spheroid.
polarRadiusInm\( c\ (m)\) Polar radius in meters. The unique semi-principle axis of the spheroid.
matrix\( I_{spheroid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the spheroid.
See also
SpheroidEccentricity() for eccentricity of a spheroid.
SpheroidEquatorialRadius() for equatorial radius of a spheroid.
SpheroidFlattening() for flattening of a spheroid.
SpheroidPolarRadius() for polar radius of a spheroid.
SpheroidSurfaceArea() for surface area of a spheroid.
SpheroidVolume() for volume of a spheroid.
SphereInertia() for inertial tensor of a sphere.
EllipsoidInertia() for inertial tensor of an ellipsoid.

◆ SpheroidInertia() [3/3]

template<typename T >
void EGXMath::SpheroidInertia ( const T  mass,
const T  equatorialRadiusInm,
const T  polarRadiusInm,
glm::mat3 &  matrix 
)

Finds the moment of inertia tensor, \(I_{spheroid}\) of a spheroid with equatorial radius \(a\) and polar radius, \(c\). It is assumed that \(a\) lays on the xy-plane, and \(c\) on the z-axis.

\[ I_{spheroid}=\begin{bmatrix} \frac{1}{5}m\ a^2c^2 & 0 & 0\\ 0 & \frac{1}{5}m\ a^2c^2 & 0\\ 0 & 0 & \frac{2}{5}m\ a^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.
equatorialRadiusInm\( a\ (m)\) Equatorial radius in meters. The degenerate semi-principle axis of the spheroid.
polarRadiusInm\( c\ (m)\) Polar radius in meters. The unique semi-principle axis of the spheroid.
matrix\( I_{spheroid}\ (kg\ m^2)\) Moment of inertia tensor matrix of the spheroid.
See also
SpheroidEccentricity() for eccentricity of a spheroid.
SpheroidEquatorialRadius() for equatorial radius of a spheroid.
SpheroidFlattening() for flattening of a spheroid.
SpheroidPolarRadius() for polar radius of a spheroid.
SpheroidSurfaceArea() for surface area of a spheroid.
SpheroidVolume() for volume of a spheroid.
SphereInertia() for inertial tensor of a sphere.
EllipsoidInertia() for inertial tensor of an ellipsoid.