Artificial intelligent assistant

Function to create long rounded rectangles Is it possible to describe with a function the following shape or would that result in a too cumbersome approach? I am looking for something like this, because I would like to keep the length, width, etc. variable. !enter image description here

To me your shape looks like the convex hull of two circles. As such it can be parametrised as follows:

Suppose the circles are centred at $\mathbf{x}_1$ and $\mathbf{x}_2$ and have radii $r_1$ and $r_2$ respectively.

Let $$f\colon[0,\pi]\times[0,1]\to\mathbb{R}^2\colon(\theta,\lambda)\mapsto \lambda\mathbf{x}_1+(1-\lambda)\mathbf{x}_2+\lambda r_1(\cos(\phi+\theta),\sin(\phi+\theta))+(1-\lambda)r_2(\cos(\phi-\theta),\sin(\phi-\theta)),$$

where $\phi$ is $\frac{\pi}{2}$ plus the angle $\mathbf{x}_2-\mathbf{x}_1$ makes with the horizontal axis.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 0dbdb801064c1e60c6feaaadf5880afd