add collisions between spheres rectanges and segments