0

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

Mahoni
  • 793
  • It's really not a rounded rectangle since opposite sides are neither parallel or of equal size. It's more of a rounded trapezoid. – Dolma Apr 29 '13 at 09:47
  • 2
    What kind of "function"? Do you want some $f(t)$ which maps, say, $[0,1]$ to the points on the outline of your shape? Or maybe some $f(x,y)$ which is $1$ for all points within your shape and $0$ for those outside of it (i.e. the characteristic function of your shape as a set of points)? Or maybe a function $f(x,y)$ which maps $[0,1]\times[0,1]$ to your shape, i.e. $f(x,y)$ lies within the shape if and only if $x,y \in [0,1]$? – fgp Apr 29 '13 at 09:52
  • @fgp Another option would be a function $f(x, y)$ which is positive for all points $(x, y)$ inside the shape and negative for those outside (it's related to the characteristic function, but still different enough to warrant a mention, I'd think). – Arthur Apr 29 '13 at 10:06
  • Possible duplicate: http://math.stackexchange.com/questions/1279/what-is-the-name-for-a-shape-that-is-like-a-capsule-but-with-two-different-radi/1282#1282 – Samuel Apr 29 '13 at 10:19

1 Answers1

2

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.

Abel
  • 7,312