Setup
I recently started to work with Unity. I want to generate a custom terrain at runtime. To do this i take a grid with a variable amount of squares. For each of the squares i calculate the height with a exchangeable height function. The height function takes the X and Z coordinate as arguments. X and Z range between 0 and 1.
I wrote some height function using perlin noise and random numbers.
Problem
I want to generate a hill. The hilltop (height 1.0) should be in the center (coordinate 0.5, 0.5). And the edges mark the bottom of the hill (height 0.0).
My best bet was a gaussian like function. The result is quite what i am looking for. A smooth top and leveled at the edges. The problem is that the edges are always a bit raised. You can reduce that by scaling X and Z but this results in a smaller hill.
I also tried other functions. But they all have shortcomings like sharp edges or raised edges.
Can anyone help me pick an appropriate function? Or maybe a combination of functions?

Here is a simple possibility:
Let $p(t) = (1-t)^2(1+t)^2$ and $f(x,y) = p(\min(1,\sqrt{x^2+y^2}))$.
This gives a hill of height $1$ at the origin and zero outside $[-1,1]^2$.
Looks like:
To get a hill that peaks at $({1\over 2},{1 \over 2})$ and is zero outside $[0,1]^2$, use $g(x,y) = f(2x-{1 \over 2}, 2y-{1 \over 2})$.