Given the coordinates of n 3D joints (1kg each) connected by m rods. Assume rods have zero mass and joints with z=0 are fixed to the ground while others are free to move, will the shape be move or not? If not, will it be stable?
The totals force at each joint has to be zero for the shape to be stable. the force at each node is
- weight of the ball which is 1 x 9.8067
- tension force in the rods connecting that node.
How can the tension force be computed?
The general method builds a linear system expressing the balance of forces and examines that linear system.
Definitions. Let $$\begin{align} n &= 3 &&\text{dimension of the configuration space} \\ J &&&\text{total number of joints} \\ K &&&\text{total number of rods} \\ i,j &&&\text{indices $1,\ldots,J$ used for enumerating joints} \\ k &&&\text{index $1,\ldots,K$ used for enumerating rods} \\ \mathbf{q}_j &= \begin{pmatrix}q_{j.x}\\q_{j.y}\\q_{j.z}\end{pmatrix} &&\text{spatial position of joint $j$ in cartesian coords} \\ i_k, j_k &&&\text{joint index where rod $k$ begins resp. ends;} \\ &&&\text{this artificially distinguishes begin and end;} \\ &&&\text{such a distinction is already present in the input format;} \\ &&&\text{one may use the convention $i_k<j_k$ as well.} \\ \mathbf{v}_k &= \mathbf{q}_{j_k} - \mathbf{q}_{i_k} &&\text{vector giving length and direction of rod $k$} \\ \mathbf{e}_k &= \frac{1}{\|\mathbf{v}_k\|}\mathbf{v}_k &&\text{unit vector giving direction of rod $k$} \\ N_k &&&\text{axial force in rod $k$, positive when pulled apart} \\ \mathbf{N}_k &= N_k \mathbf{e}_k &&\text{force from rod $k$ on its begin joint; thus} \\ &&&\text{$-\mathbf{N}_k$ is the force from rod $k$ on its end joint} \\ n_k &= \frac{N_k}{\|\mathbf{v}_k\|} &&\text{thus $\mathbf{N}_k = n_k\mathbf{v}_k$} \\ \mathbf{F}_j &= \begin{pmatrix}F_{j.x}\\F_{j.y}\\F_{j.z}\end{pmatrix} &&\text{force on joint $j$ resulting from all adjacent rods} \\ g &\approx 9.81\frac{\mathrm{m}}{\mathrm{s}^2} &&\text{magnitude of gravitational field strength} \\ \mathbf{g}_j &= \begin{pmatrix}0\\0\\-g\end{pmatrix} &&\text{gravitational field strength vector at joint $j$} \\ m_j &&&\text{mass lumped at joint $j$} \\ \mathbf{R}_j &&&\text{support force on a grounded joint $j$} \end{align}$$
Example. The second testcase from the official problem statement describes a tetrahedron balancing on one of its vertices: $$\begin{align} J &= 4 &\mathbf{q}_1 &= \begin{pmatrix}0\\0\\0\end{pmatrix} &\mathbf{q}_2 &= \begin{pmatrix}-1\\-0.5\\1\end{pmatrix} &\mathbf{q}_3 &= \begin{pmatrix}1\\-0.5\\1\end{pmatrix} &\mathbf{q}_4 &= \begin{pmatrix}0\\1\\1\end{pmatrix} \\ m &= 1\,\mathrm{kg} & m_1 &= m & m_2 &= m & m_3 &= m & m_4 &= m \\ K &= 6 & (i_1,j_1) &= (1,2) & (i_2,j_2) &= (1,3) & (i_3,j_3) &= (1,4) \\& & (i_4,j_4) &= (2,3) & (i_5,j_5) &= (2,4) & (i_6,j_6) &= (3,4) \end{align}$$
Now consider a free body diagram for each joint. The official problem statement implies that the rods carry axial forces only and no moments of force; in particular, this means that the axis of the rod is the axis of the force it carries, and that we gain no additional information by considering balance of moments.
Using the information which rods are incident on which joints, we can describe the forces from the rods on the joints as follows. (Omitted matrix entries are zero.) $$\begin{pmatrix} F_{1.x}\\F_{1.y}\\F_{1.z} \\ F_{2.x}\\F_{2.y}\\F_{2.z} \\ F_{3.x}\\F_{3.y}\\F_{3.z} \\ F_{4.x}\\F_{4.y}\\F_{4.z} \end{pmatrix} = \begin{pmatrix} e_{1.x} & e_{2.x} & e_{3.x} \\ e_{1.y} & e_{2.y} & e_{3.y} \\ e_{1.z} & e_{2.z} & e_{3.z} \\-e_{1.x} & & & e_{4.x} & e_{5.x} \\-e_{1.y} & & & e_{4.y} & e_{5.y} \\-e_{1.z} & & & e_{4.z} & e_{5.z} \\ &-e_{2.x} & &-e_{4.x} & & e_{6.x} \\ &-e_{2.y} & &-e_{4.y} & & e_{6.y} \\ &-e_{2.z} & &-e_{4.z} & & e_{6.z} \\ & &-e_{3.x} & &-e_{5.x} &-e_{6.x} \\ & &-e_{3.y} & &-e_{5.y} &-e_{6.y} \\ & &-e_{3.z} & &-e_{5.z} &-e_{6.z} \end{pmatrix} \begin{pmatrix} N_1\\N_2\\N_3\\N_4\\N_5\\N_6 \end{pmatrix}$$ or equivalently, using $\mathbf{N}_k = N_k \mathbf{e}_k = n_k \mathbf{v}_k$: $$\begin{pmatrix} F_{1.x}\\F_{1.y}\\F_{1.z} \\ F_{2.x}\\F_{2.y}\\F_{2.z} \\ F_{3.x}\\F_{3.y}\\F_{3.z} \\ F_{4.x}\\F_{4.y}\\F_{4.z} \end{pmatrix} = \begin{pmatrix} v_{1.x} & v_{2.x} & v_{3.x} \\ v_{1.y} & v_{2.y} & v_{3.y} \\ v_{1.z} & v_{2.z} & v_{3.z} \\-v_{1.x} & & & v_{4.x} & v_{5.x} \\-v_{1.y} & & & v_{4.y} & v_{5.y} \\-v_{1.z} & & & v_{4.z} & v_{5.z} \\ &-v_{2.x} & &-v_{4.x} & & v_{6.x} \\ &-v_{2.y} & &-v_{4.y} & & v_{6.y} \\ &-v_{2.z} & &-v_{4.z} & & v_{6.z} \\ & &-v_{3.x} & &-v_{5.x} &-v_{6.x} \\ & &-v_{3.y} & &-v_{5.y} &-v_{6.y} \\ & &-v_{3.z} & &-v_{5.z} &-v_{6.z} \end{pmatrix} \begin{pmatrix} n_1\\n_2\\n_3\\n_4\\n_5\\n_6 \end{pmatrix}\tag{1}$$ Since joint $1$ is fixed to the ground, it has support forces acting on it which are unknown yet. So, for the moment, let us ignore those equations of $(1)$ that deal with $\mathbf{F}_1$. For the other joints, we know that the balance of forces requires $$\mathbf{F}_j = -m_j\mathbf{g}_j \quad\text{for}\quad j > 0$$ This leads to the following system of $9$ equations for $6$ unknowns $n_k$: $$\underbrace{\begin{pmatrix} -v_{1.x} & & & v_{4.x} & v_{5.x} \\-v_{1.y} & & & v_{4.y} & v_{5.y} \\-v_{1.z} & & & v_{4.z} & v_{5.z} \\ &-v_{2.x} & &-v_{4.x} & & v_{6.x} \\ &-v_{2.y} & &-v_{4.y} & & v_{6.y} \\ &-v_{2.z} & &-v_{4.z} & & v_{6.z} \\ & &-v_{3.x} & &-v_{5.x} &-v_{6.x} \\ & &-v_{3.y} & &-v_{5.y} &-v_{6.y} \\ & &-v_{3.z} & &-v_{5.z} &-v_{6.z} \end{pmatrix}}_{\mathbf{A}} \begin{pmatrix} n_1\\n_2\\n_3\\n_4\\n_5\\n_6 \end{pmatrix} = \underbrace{\begin{pmatrix} 0 \\ 0 \\ m g \\ 0 \\ 0 \\ m g \\ 0 \\ 0 \\ m g \end{pmatrix}}_{\mathbf{f}=mg\mathbf{f}^*}$$ Dividing by $mg$ and plugging in the numbers, we have $$\begin{pmatrix} 1 & & & 2 & 1 \\ 0.5 & & & 0 & 1.5 \\-1 & & & 0 & 0 \\ &-1 & &-2 & &-1 \\ & 0.5 & & 0 & & 1.5 \\ &-1 & & 0 & & 0 \\ & & 0 & &-1 & 1 \\ & &-1 & &-1.5 &-1.5 \\ & &-1 & & 0 & 0 \end{pmatrix} \begin{pmatrix} n_1^*\\n_2^*\\n_3^*\\n_4^*\\n_5^*\\n_6^* \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \\ 0 \\ 1 \\ 0 \\ 0 \\ 1 \end{pmatrix} \quad\text{where}\quad n_k^* = \frac{n_k}{m g}\tag{2}$$ The key to the official problem now lies in examining the system $(2)$.
Row reduction reveals that the system matrix $\mathbf{A}$ as well as the $9\times7$ concatenation $\mathbf{A}\|\mathbf{f}^*$ both have rank $6$, which is equal to the number $K$ of unkowns $n_k^*$. This means that there is a unique solution for the $n_k^*$.
Solving the linear system $(2)$ therefore gives you unique values for the $n_k^*$, from which you can determine the axial rod forces $$N_k = n_k \|\mathbf{v}_k\| = mg\,n_k^* \|\mathbf{v}_k\|$$
Once you have the $n_k$, you can plug them into those equations of $(1)$ that we have ignored so far. These give the forces from the rods on the grounded joints, in this case, $\mathbf{F}_j$ for $j=1$. These, together with the weight of the grounded joints, must be balanced by the support forces $\mathbf{R}_j$, thus we get $$\mathbf{R}_j = -(\mathbf{F}_j + m_j\mathbf{g}_j) \quad\text{for a grounded joint $j$}$$
But let us look at the system $(2)$ from a more general point of view. The fact that $(2)$ has a solution means that all forces can indeed be balanced. In the wording of the official problem statement, this means that the system is static.
However, suppose that a (small but otherwise arbitrary) combination of external forces is added to the right-hand side $\mathbf{f}$ of the system $(2)$. Since the number of rows of $\mathbf{f}$ is greater than the rank of the matrix $\mathbf{A}$, it is always possible to come up with an $\mathbf{f}$ that lies outside the image of $\mathbf{A}$. In other words, there certainly exists a combination of external forces for which the system has no solution. This means that not all forces can be guaranteed to be balanced if we allow perturbations of $\mathbf{f}$. But unbalanced forces cause acceleration of the affected joints. In the wording of the official problem statement, the structure is unstable.
You will have noticed by now that the official problem statement is not about solving $(2)$ for the $N_k$ or the ground support forces. It is only about the existence of a solution to $(2)$
Moreover, the official problem statement is not even interested in whether a solution to $(2)$ is unique. I will comment on that later.
In general, given a description of the structure in terms of $J,K$, joint positions $\mathbf{q}_j$, and incidence information $(i_k,j_k)$,
Row-reduce the $(nJ')\times (K+1)$ concatenation $\mathbf{A}\|\mathbf{f}^*$. This reveals both the rank of $\mathbf{A}$ and that of $\mathbf{A}\|\mathbf{f}$. We now consider the following cases:
Additional remarks: