code that finds the center of a red ball (probably badly, but whatevs)