use path.removeFirst() instead of path.erase(path.begin())
tidy up the sphere generation a bit.