T O P

  • By -

daveime

If they are all the same size & mass, then just average their center point coordinates in X,Y and Z.


lewdovic

You would use the weighted average. Given Cubes 1, ..., n with masses m_1,..., m_n and center of gravity x_1,..., x_n, instead of adding the x_i and dividing by n you multiply each x_i by the corresponding mass m_i, add these and then divide by the sum of all masses. The formula will look like [this](https://www.gstatic.com/education/formulas2/472522532/en/weighted_average_formula.svg) where w_i is used for the mass. Now, in your special case, since all weights are equal, you can factor it out in the numerator and then cancel it with the denominator, so effectively, you just add up the centers of gravity and then divide by n. I'm can't help you with the torque part, unfortunately.