How can we define a 3D function where for all input values of $(x, y, z)$ for $f(x,y,z) = 0$ or approximately close to zero except for where the location of a spherical shell is located.
The visualization of this is a beach ball. I want a function that describes the location of the beach ball material when blown up. I want the function to return zero or very close to zero inside the ball and outside the ball, but equal to $1$ or close to $1$ where the material is located.
Another way to say this is that I desire a 3D scalar field that yields the value of $1$ at a radius $r$ from the origin but yields zero for all other points that's not at such radius. Also, I eventually want to find the vector field from this scalar field and have arrows pointing normal to this "surface" that I hope we can define.
I know that the equation of a sphere is $x^2+y^2+z^2 = r^2$, but this isn't what I desire because you get a non-zero number everywhere!
I tried to use the Gaussian function to help me out, $\exp[-(x^2+y^2+z^2)]$, but this didn't work either. In the origin, $(0, 0, 0)$, the function equals $1$ and the farther you go out it goes to zero.