Sequence of smooth functions approximating a 2d cylinder step function

743 Views Asked by At

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...

Thanks in advance..

2

There are 2 best solutions below

0
On BEST ANSWER

You might want to try any of formulae 17 to 27 in the MathWorld page for the unit step function, since the function you're interested in is expressible as

$$1-H(x^2+y^2-1)$$

0
On

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)$.