measureCenterOfMass = (...geometries) => {
  geometries = flatten(geometries)

  const results = geometries.map((geometry) => {
    // NOTE: center of mass for geometry path2 is not possible
    if (geom2.isA(geometry)) return measureCenterOfMassGeom2(geometry)
    if (geom3.isA(geometry)) return measureCenterOfMassGeom3(geometry)
    return [0, 0, 0]
  })
  return results.length === 1 ? results[0] : results
}
Measure the center of mass for the given geometries.
@param {...Object} geometries - the geometries to measure
@return {Array} the center of mass for each geometry, i.e. [X, Y, Z]
@alias module:modeling/measurements.measureCenterOfMass

@example
let center = measureCenterOfMass(sphere())