# Sequence of smooth functions approximating a 2d cylinder step function

Let $f(x,y)=1$ if $(x,y)$ is in the unit disk and $f=0$ otherwise. I would like to approximate $f$ by a sequence of smooth functions. The functions need to be evaluated quickly so the results I'm getting from mollification are to awkward to deal with...

-
Wait... why did you remove the specific function? o_O –  Guess who it is. Oct 26 '10 at 7:04
Oh whoops... I was editing... that was a mistake... –  alext87 Oct 26 '10 at 7:05
That's better... –  alext87 Oct 26 '10 at 7:06

$$1-H(x^2+y^2-1)$$
You can convolve your function with a bivariate Gaussian density kernel, $\Phi(x,y; \sigma_x, \sigma_y)$, and obtain a smooth representation. Then you can let the variance parameters $\sigma_x$ and $\sigma_y$ go to zero to obtain arbitrarily accurate approximation to $f(x,y)$.