I need to define a function, let's say b(x), that defines the projection of a 3D sphere of radius r centred on the origin - onto a line.

I'm a bit lost as to how I should start this to be perfectly honest. Involved algebra, integration of x^2 + y^2 + z^2 = r^2, something else entirely?

There is a bunch of stuff involving Fourier transforms and such thereafter for multiple spheres but if anyone might be able to give me a pointer for this...