EGXPhys

Functions

template<typename T >
EGXMath::CylinderSurfaceArea (const T radius, const T height)
 Finds the surface area, \(A_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):

\[ A_{cyl}=2\pi r^2 + 2\pi r h \]

. More...

 
template<typename T >
EGXMath::CylinderVolume (const T radius, const T height)
 Finds the volume, \(V_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):

\[ V_{cyl}=\pi r^2 h\]

. More...

 
template<typename T , typename T2 >
void EGXMath::CylinderInertia (const T mass, const T height, const T radius, T2(&matrix)[9])
 Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

 
template<typename T , typename T2 >
void EGXMath::CylinderInertia (const T mass, const T height, const T radius, std::vector< T2 > &matrix)
 Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

 
template<typename T , typename T2 >
void EGXMath::CylinderInertia (const T mass, const T height, const T radius, glm::mat3 &matrix)
 Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

 

Detailed Description

Function Documentation

◆ CylinderInertia() [1/3]

template<typename T , typename T2 >
void EGXMath::CylinderInertia ( const T  mass,
const T  height,
const T  radius,
T2(&)  matrix[9] 
)

Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

Parameters
mass\( m\ (kg)\) Mass of cylinder in kilograms.
height\( r\ (m)\) Height of cylinder in meters.
radius\( r\ (m)\) Radius of cylinder in meters.
matrix\( I_{cyl}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared.
See also
DiskInertia() for alias.
CylinderSurfaceArea() for surface area of a cylinder.
CylinderVolume() for volume of a cylinder.
HoopThinInertia() for inertial tensor of a thin hoop.
HoopInertia() for inertial tensor of a hoop.
DiskThinInertia() for inertial tensor of a thin disk.
SphereInertia() for inertial tensor of a sphere.

◆ CylinderInertia() [2/3]

template<typename T , typename T2 >
void EGXMath::CylinderInertia ( const T  mass,
const T  height,
const T  radius,
std::vector< T2 > &  matrix 
)

Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

Parameters
mass\( m\ (kg)\) Mass of cylinder in kilograms.
height\( r\ (m)\) Height of cylinder in meters.
radius\( r\ (m)\) Radius of cylinder in meters.
matrix\( I_{disk}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared.
See also
DiskInertia() for alias.
CylinderSurfaceArea() for surface area of a cylinder.
CylinderVolume() for volume of a cylinder.
HoopThinInertia() for inertial tensor of a thin hoop.
HoopInertia() for inertial tensor of a hoop.
DiskThinInertia() for inertial tensor of a thin disk.
SphereInertia() for inertial tensor of a sphere.

◆ CylinderInertia() [3/3]

template<typename T , typename T2 >
void EGXMath::CylinderInertia ( const T  mass,
const T  height,
const T  radius,
glm::mat3 &  matrix 
)

Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.

\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]

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

Parameters
mass\( m\ (kg)\) Mass of cylinder in kilograms.
height\( r\ (m)\) Height of cylinder in meters.
radius\( r\ (m)\) Radius of cylinder in meters.
matrix\( I_{cyl}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared.
See also
DiskInertia() for alias.
CylinderSurfaceArea() for surface area of a cylinder.
CylinderVolume() for volume of a cylinder.
HoopThinInertia() for inertial tensor of a thin hoop.
HoopInertia() for inertial tensor of a hoop.
DiskThinInertia() for inertial tensor of a thin disk.
SphereInertia() for inertial tensor of a sphere.

◆ CylinderSurfaceArea()

template<typename T >
T EGXMath::CylinderSurfaceArea ( const T  radius,
const T  height 
)

Finds the surface area, \(A_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):

\[ A_{cyl}=2\pi r^2 + 2\pi r h \]

.

Parameters
radius\( r\ (m)\) Radius of cylinder in meters.
height\( r\ (m)\) Height of cylinder in meters.
Returns
\( A_{cyl}\ (m^2)\) Surface area of cylinder in meter squared.
See also
CylinderSurfaceArea() for surface area of a cylinder.
CylinderVolume() for volume of a cylinder.
CylinderInertia() for inertial tensor of cylinder.

◆ CylinderVolume()

template<typename T >
T EGXMath::CylinderVolume ( const T  radius,
const T  height 
)

Finds the volume, \(V_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):

\[ V_{cyl}=\pi r^2 h\]

.

Parameters
radius\( r\ (m)\) Radius of cylinder in meters.
height\( r\ (m)\) Height of cylinder in meters.
Returns
\( V_{cyl}\ (m^3)\) Volume of cylinder in meter cubed.
See also
CylinderSurfaceArea() for surface area of a cylinder.
CylinderVolume() for volume of a cylinder.
CylinderInertia() for inertial tensor of cylinder.