center = (options, ...objects) => {
  const defaults = {
    axes: [true, true, true],
    relativeTo: [0, 0, 0]
  // TODO: Add additional 'methods' of centering: midpoint, centroid
  }
  const { axes, relativeTo } = Object.assign({}, defaults, options)

  objects = flatten(objects)
  if (objects.length === 0) throw new Error('wrong number of arguments')
  if (relativeTo.length !== 3) throw new Error('relativeTo must be an array of length 3')

  options = { axes, relativeTo }

  const results = objects.map((object) => {
    if (path2.isA(object)) return centerGeometry(options, object)
    if (geom2.isA(object)) return centerGeometry(options, object)
    if (geom3.isA(object)) return centerGeometry(options, object)
    return object
  })
  return results.length === 1 ? results[0] : results
}
Center the given objects using the given options.
@param {Object} options - options for centering
@param {Array} [options.axes=[true,true,true]] - axis of which to center, true or false
@param {Array} [options.relativeTo=[0,0,0]] - relative point of which to center the objects
@param {...Object} objects - the objects to center
@return {Object|Array} the centered object, or a list of centered objects
@alias module:modeling/transforms.center

@example
let myshape = center({axes: [true,false,false]}, sphere()) // center about the X axis