<p>I guess your question is how to compute the inertia tensor automatically. A parametric equation may not be always possible, but we could write a program to avoid hand calculations as much as possible.</p>
<p>The inertia tensor <span class="math-container">$\mathbf{I}$</span> is defined as an integral over the object domain <span class="math-container">$\Omega$</span> (see <a href="https://en.wikipedia.org/wiki/Moment_of_inertia#Inertia_tensor" rel="nofollow noreferrer">Inertia tensor</a>):
<span class="math-container">$$
\newcommand{\V}[1]{\mathbf{#1}}
\begin{align}
\V{I} &amp;= \int_\Omega \rho (\V{r}\cdot\V{r} \delta - \V{r}\V{r}^T)\,dV
\end{align}
$$</span>
where <span class="math-container">$\V{r}$</span> is the position relative to the center of mass (COM),<span class="math-container">$\rho$</span> is the density, and <span class="math-container">$\delta$</span> is the identity matrix.</p>
<p>Note that <span class="math-container">$\text{tr}(\V{r}\V{r}^T) = \V{r}\cdot \V{r}$</span>, the above definition  can be rearranged as
<span class="math-container">$$
\begin{align}
\V{T} &amp;= \V{r}\V{r}^T \\
\V{I} &amp;= \int_\Omega \rho (\text{tr} \V{T} \delta - \V{T})\,dV
\end{align}
$$</span></p>
<h2>Analytic object</h2>
<p>For analytic objects you can substitute their equations into the integral and do symbolic integration. This step can be automated with any symbolic computing software.</p>
<h2>Object in tetrahedral mesh</h2>
<p>We assume the object is simple and has a closed boundary.
An analytic solution is not possible in this case because we do not have an explicit equation for the object. But we could compute the inertia tensor numerically.
The only integral we have to compute is
<span class="math-container">$$
\begin{align}
\V{C} &amp;=
\int_\Omega \rho \V{r}\V{r}^T\,dV
\end{align}
$$</span></p>
<p>To compute this integral, <a href="http://number-none.com/blow/inertia/" rel="nofollow noreferrer">this paper</a> could be helpful.
The general idea is to compute <span class="math-container">$\V{C}_t$</span> for each tetrahedron <span class="math-container">$t$</span>, and sum <span class="math-container">$\V{C}_t$</span> to get <span class="math-container">$\V{C}$</span>.
We first compute the integral for a canonical tetrahedron <span class="math-container">$t0$</span> whose vertices are
<span class="math-container">$(0,0,0)$</span>, <span class="math-container">$(1,0,0)$</span>, <span class="math-container">$(0,1,0)$</span>, and <span class="math-container">$(0,0,1)$</span>.</p>
<p>In maple, this canonical integral <span class="math-container">$\V{C}_{t0}$</span> is (assume <span class="math-container">$\rho$</span> constant)</p>
<pre><code>r:=&lt;x,y,z&gt;; 
                                                    [x]
                                                    [ ]
                                               r := [y]
                                                    [ ]
                                                    [z]

with(LinearAlgebra):                                
rrt:=r.Transpose(r);
                                             [ 2               ]
                                             [x      x y    x z]
                                             [                 ]
                                      rrt := [        2        ]
                                             [x y    y      y z]
                                             [                 ]
                                             [               2 ]
                                             [x z    y z    z  ]

seq(seq(int(int(int(rrt[i,j],x=0..1-y-z),y=0..1-z),z=0..1),i=1..3),j=1..3);
                      1/60, 1/120, 1/120, 1/120, 1/60, 1/120, 1/120, 1/120, 1/60
</code></pre>
<p>Then the integral <span class="math-container">$\V{C}_t$</span> can be computed by a change of variable.
Assume the coordinates of a world space tetrahedron can be represented as <span class="math-container">$\V{r}=\V{F}\V{r}_0 + \V{x}$</span>, where <span class="math-container">$\V{F}$</span> and <span class="math-container">$\V{x}$</span> are constant.
We have
<span class="math-container">$$
\begin{align}
\V{C}_t &amp;= \rho \int_{\Omega_t} \V{r}\V{r}^T\,dV \\
&amp;= \rho \int_{\Omega_{t0}} (\V{F}\V{r}_0 + \V{x})(\V{F}\V{r}_0+\V{x})^T \det \V{F} \,dV_0 \\
&amp;= \rho \int_{\Omega_{t0}} (\V{F}\V{r}_0\V{r}_0^T\V{F}^T + \V{x}\V{x}^T + \V{F}\V{r}_0\V{x}^T + \V{x}\V{r}_0^T\V{F}^T) \det \V{F} \,dV_0 \\
&amp;= \det(\V{F}) \V{F}\V{C}_{t0}\V{F}^T + \det(\V{F}) m \V{x}\V{x}^T + \det(\V{F}) m \V{\bar{r}}\V{x}^T + \det(\V{F}) m \V{x}\V{\bar{r}}^T
\end{align}
$$</span>
where <span class="math-container">$\V{\bar{r}}$</span> is the COM and <span class="math-container">$m$</span> is the mass.</p>
<h2>Objects in other form</h2>
<p>I did not use Inventor before but I suspect the part produced by it may have other formats, such as Bezier surface. For now I would suggest tetrahedralize the object and apply the above method.</p>

CC BY-SA 4.0
2019-02-22T02:22:54.087Z
2019-02-22T02:22:54.087Z
2020-06-18T08:32:12.800Z
TheBusyTypist
<p>Whenever you make a part in inventor, the software calculates de properties of the whole body given a constant density. Then, automatically,  it shows the inertial tensor. As you can recall from math, the inertia equation is <span class="math-container">$I_x= \rho\int(y^2+z^2)dV$</span>
for the x axis. So, clearing rho, how can I get the right hand of the equation that is been solved in the underlying algorithm without doing any hand calculations?</p>

<algorithm><mathematics><geometry>
How to obtain a parametric equation out of a part designed in Autodesk Inventor?
Jesús Treviño
# How to obtain a parametric equation out of a part designed in Autodesk Inventor?

(Asked by: username_0 on 2018-01-15)

Whenever you make a part in inventor, the software calculates de properties of the whole body given a constant density. Then, automatically, it shows the inertial tensor. As you can recall from math, the inertia equation is $I\_x= \rho\int(y^2+z^2)dV$
for the x axis. So, clearing rho, how can I get the right hand of the equation that is been solved in the underlying algorithm without doing any hand calculations?

**Tags:** algorithm, mathematics, geometry


---

## 1 answers

### Answer by username_1 on 2019-02-22. Score: 1

I guess your question is how to compute the inertia tensor automatically. A parametric equation may not be always possible, but we could write a program to avoid hand calculations as much as possible.

The inertia tensor $\mathbf{I}$ is defined as an integral over the object domain $\Omega$ (see [Inertia tensor](https://en.wikipedia.org/wiki/Moment_of_inertia#Inertia_tensor)):
$$
\newcommand{\V}[1]{\mathbf{#1}}
\begin{align}
\V{I} &= \int\_\Omega \rho (\V{r}\cdot\V{r} \delta - \V{r}\V{r}^T)\,dV
\end{align}
$$
where $\V{r}$ is the position relative to the center of mass (COM),$\rho$ is the density, and $\delta$ is the identity matrix.

Note that $\text{tr}(\V{r}\V{r}^T) = \V{r}\cdot \V{r}$, the above definition can be rearranged as
$$
\begin{align}
\V{T} &= \V{r}\V{r}^T \\
\V{I} &= \int\_\Omega \rho (\text{tr} \V{T} \delta - \V{T})\,dV
\end{align}
$$

## Analytic object

For analytic objects you can substitute their equations into the integral and do symbolic integration. This step can be automated with any symbolic computing software.

## Object in tetrahedral mesh

We assume the object is simple and has a closed boundary.
An analytic solution is not possible in this case because we do not have an explicit equation for the object. But we could compute the inertia tensor numerically.
The only integral we have to compute is
$$
\begin{align}
\V{C} &=
\int\_\Omega \rho \V{r}\V{r}^T\,dV
\end{align}
$$

To compute this integral, [this paper](http://number-none.com/blow/inertia/) could be helpful.
The general idea is to compute $\V{C}\_t$ for each tetrahedron $t$, and sum $\V{C}\_t$ to get $\V{C}$.
We first compute the integral for a canonical tetrahedron $t0$ whose vertices are
$(0,0,0)$, $(1,0,0)$, $(0,1,0)$, and $(0,0,1)$.

In maple, this canonical integral $\V{C}\_{t0}$ is (assume $\rho$ constant)

```
r:=<x,y,z>; 
                                                    [x]
                                                    [ ]
                                               r := [y]
                                                    [ ]
                                                    [z]

with(LinearAlgebra):                                
rrt:=r.Transpose(r);
                                             [ 2               ]
                                             [x      x y    x z]
                                             [                 ]
                                      rrt := [        2        ]
                                             [x y    y      y z]
                                             [                 ]
                                             [               2 ]
                                             [x z    y z    z  ]

seq(seq(int(int(int(rrt[i,j],x=0..1-y-z),y=0..1-z),z=0..1),i=1..3),j=1..3);
                      1/60, 1/120, 1/120, 1/120, 1/60, 1/120, 1/120, 1/120, 1/60

```

Then the integral $\V{C}\_t$ can be computed by a change of variable.
Assume the coordinates of a world space tetrahedron can be represented as $\V{r}=\V{F}\V{r}\_0 + \V{x}$, where $\V{F}$ and $\V{x}$ are constant.
We have
$$
\begin{align}
\V{C}\_t &= \rho \int\_{\Omega\_t} \V{r}\V{r}^T\,dV \\
&= \rho \int\_{\Omega\_{t0}} (\V{F}\V{r}\_0 + \V{x})(\V{F}\V{r}\_0+\V{x})^T \det \V{F} \,dV\_0 \\
&= \rho \int\_{\Omega\_{t0}} (\V{F}\V{r}\_0\V{r}\_0^T\V{F}^T + \V{x}\V{x}^T + \V{F}\V{r}\_0\V{x}^T + \V{x}\V{r}\_0^T\V{F}^T) \det \V{F} \,dV\_0 \\
&= \det(\V{F}) \V{F}\V{C}\_{t0}\V{F}^T + \det(\V{F}) m \V{x}\V{x}^T + \det(\V{F}) m \V{\bar{r}}\V{x}^T + \det(\V{F}) m \V{x}\V{\bar{r}}^T
\end{align}
$$
where $\V{\bar{r}}$ is the COM and $m$ is the mass.

## Objects in other form

I did not use Inventor before but I suspect the part produced by it may have other formats, such as Bezier surface. For now I would suggest tetrahedralize the object and apply the above method.


---

