def centralize_chunk(points):
    """In-place centralize a chunk"""
    assert points.ndim == 2 and points.shape[1] >= 3
    chunk_min = points[:, 0:3].min(0)
    chunk_max = points[:, 0:3].max(0)
    points[:, 0:2] -= 0.5 * (chunk_min + chunk_max)[0:2]
    points[:, 2] -= chunk_min[2]
    return points