# Altering the center of mass with an iterative process

We have a system of $n$ particles, and the particle $i$ has a point mass $m_i$. The center of mass is then given by:

$$X = \frac{\sum_i^nm_ix_i}{\sum_i^nm_i}$$ $$Y = \frac{\sum_i^nm_iy_i}{\sum_i^nm_i}$$ $$Z = \frac{\sum_i^nm_iz_i}{\sum_i^nm_i}$$

Now imagine that we want to add a specific amount of extra mass $M_a$, to the existing particle system, in order to guide the center of gravity to a new position, $X', Y', Z'$. Taking into account that the number of particles can be a large number (e.g 1M), is there an algorithm (iterative or not) that I can use to find how to distribute the mass to the existing particles? The whole amount of $M_a$ must be used, and the initial mass $m_i$ of the $i$-th particle cannot be changed.

I'm thinking of starting with each particle having an equal amount of extra mass, e.g $M_a / n$, and then, through some iterative process (which I still have to figure out), guide the center of mass to the desired position.

• I think you'll have to quantify "as smoothly as possible" to make this a well-defined question -- there will typically be infinitely many solutions. Commented Mar 5, 2012 at 15:10
• I rephrased my question, since I cannot quantify smoothing at the moment.
– John
Commented Mar 5, 2012 at 15:22
• This cannot be done in general. Suppose you have three points that define a simplex, and they initially have equal mass. then the center of mass is the center of the simplex. If you now wish to move the center of mass to an edge of the simplex, you have to zero out the contribution of one of the points, which cannot be done with a finite addition of mass. Commented Mar 5, 2012 at 17:22
• @SureshVenkat well, in cases where the target would not be reachable, we cannot do much. In these cases, the hypothetical algorithm would terminate with an error message. Let's make the assumption that there is indeed a solution.
– John
Commented Mar 7, 2012 at 21:22
• Sounds like @joriki's answer takes care of it then. Commented Mar 7, 2012 at 21:25

For the purposes of determining the centre of mass, you can treat the entire mass $M=\sum_im_i$ of the existing particles as concentrated in the centre of mass $\vec R=(X,Y,Z)$. Now you want to add mass $M_a$ to move the centre of mass to $\vec R'=(X',Y',Z')$. This requires the additional mass $M_a$ to be added such that its centre of mass is at $\vec R_a$ with

$$\frac{M\vec R+M_a\vec R_a}{M+M_a}=\vec R'\;,$$

that is,

$$\vec R_a=\frac{(M+M_a)\vec R'-M\vec R}{M_a}=\vec R'+\frac M{M_a}\left(\vec R'-\vec R\right)\;.$$

This point lies beyond $\vec R'$ on the line from $\vec R$ to $\vec R'$. You can distribute the additional mass such that its centre of mass is at $\vec R_a$ if and only if this point lies in the convex hull of the positions $\vec r_i$ of the point masses. If so, then by definition $\vec R_a$ can be expressed as a convex combination $\vec R_a=\sum_i\mu_i\vec r_i$ with $\mu_i\ge0$ and $\sum_i\mu_i=1$, and you get the desired mass distribution by placing mass $\mu_iM_a$ at $\vec r_i$.

• @John: You're welcome. Commented Mar 7, 2012 at 21:56

Intuitively, there can be no guaranteed solution to the problem, given that there are no bounds to where the new X'Y'Z' is placed. Even a trivial example could show this, if you are constrained by only manipulating the mass of the existing particles and by the total amount of mass available to add.

Let $$M_i = {\sum_i^nm_i}.$$ Place $M_a$ at position ($X^a$, $Y^a$, $Z^a$) which is collinear with points ($X$, $Y$, $Z$) and ($X'$, $Y'$, $Z'$) and also satisfies the equation $$M_i*d_i = M_a*d_a.$$ Here $d_i$ is the distance between points ($X$, $Y$, $Z$) & ($X'$, $Y'$, $Z'$). Similarly $d_a$ is the distance between ($X'$, $Y'$, $Z'$) & ($X^a$, $Y^a$, $Z^a$).

• The mass must be distributed to the particle system and not added to a single point, which may not be part of the system.
– John
Commented Mar 5, 2012 at 16:31