How does one mathematically in closed form describe a valley or a wedge in 2D?

161 Views Asked by At

I wanted to describe a shape like the following:

enter image description here

with a single equation in a way that its differentiable.

Right now what I am doing is choosing a beforehand the region I want the wedge/dip and the adding a bunch of upside down Gaussians. This hack works visually but it has some issues:

  1. the bottom is probably not truly flat
  2. it does not extend to infinity and forces me to constraint where my region where the function is defined is
  3. I can't have the whole bottom of the wedge be at exactly -1 in any obvious way (since the number of Gaussians affects how far down it goes).

I thought of an upside down quadratic:

$$ f(w_1, w_2) = -k w^2_2 $$

but then I realized it does not flatten out at the edges like my figure, i.e. its just an upside down bowl instead of a dip/wedge that falls down. I then thought then maybe stitching it it by definining it piece-wise, i.e. at $f(w_1,w_2) = 0 $ for some region too far from the wedge. But then that looked ugly and I wanted the function $f(w_1,w_2)$ to ideally always have some slant towards the edge even if your far away (i.e. a region that is literally flat that is NOT inside the wedge is bad).

Does anyone have any idea how to do this or my hack with Gaussians is the best solution?

1

There are 1 best solutions below

2
On BEST ANSWER

$$f(w_1, w_2) = -e^{-w_2^2}$$ seems to match all your requirements, as far as I can tell. It's differentiable, exactly $-1$ on the line $w_2=0$ and defined for all values of $w_1$ and $w_2$.