Are there any known examples of analytic, globally continuous functions $f(x,y): (x,y)\in\mathbb{R}\times\mathbb{R}\rightarrow\mathbb{R}$ such that

$$f(x,y)\lt 0\Leftrightarrow (x,y)\not\in\mathcal{P}$$
$$f(x,y)=0\Leftrightarrow (x,y)\in\partial\mathcal{P}$$
$$f(x,y)\gt 0\Leftrightarrow (x,y)\in\mathcal{P} \setminus\partial\mathcal{P}$$

where $\mathcal{P}$ is a connected region, whose boundary $\partial\mathcal{P}$ is a finite collection of disjoint simple polygons?

Without the requirement, that $f(x,y)$ has different sign inside and outside of $\mathcal{P}$, examples of such functions can be easily defined with $\sqrt{(x+\frac{l}{2})^2+y^2}+\sqrt{(x-\frac{l}{2})^2+y^2}-l)$ which serve as models for factors that vanish on a line segment of length $l$, but nowhere else

In view of the example that apparently isn't analytic, I have repeated the requirement that $f(x,y)$ be analytic and added the requirement, that it be globally continuous.

**Remark:**

The functions I am looking for with the relaxed condition of being $C^\infty$, zero on $\partial P$ and, positive in $P\setminus\partial P$ could also be used as testfunctions (cf e.g. http://en.wikipedia.org/wiki/Distribution_%28mathematics%29 ) for generalized functions on polygonal domains.