# Pinch transform shapes

I'm looking for an algorithm that can pinches a shape in a way to become pointy on both ends.

Like this image, transforming the shape on the left to the right. The result is literally similar to intersection Boolean of two circles but I'm looking for a transform function that can do it.

Any ideas how to go about it?

• In your application, how is the shape defined? Is it the set of point $\{x,y\}$ such that $f_n(x) < y < f_p(x)$ where here $f_p(x) = \sqrt{1 - x^2}$ with $p$ standing for "positive" and $f_n(x) = -\sqrt{1 - x^2}$ with $n$ for "negative". In this case, the pinched shape would just have a different pair of $f_p$ and $f_n$.... (to be continued) ... – Lee David Chung Lin Feb 16 at 22:26
• ... OR do you want to map the each point within the shape $\{x, y \} \mapsto \{x', y' \}$? For example, if there are 100 regularly spaced grid points in the original disk, then there should still be 100 points in the pinched shape. However, the "grid points" are no longer regularly spaced, but they should maintain the relative neighboring structures. – Lee David Chung Lin Feb 16 at 22:26
• @LeeDavidChungLin Sorry for the delay in getting back to you. It's the latter option of what you mentioned, meaning pinching the grid points, because the shape can be arbitrary. – Yasin Feb 21 at 7:39
• If the desired outcome is the maintain the profile of "outer part" of the boundary, then the point-wise transformation has to be customized for each given. The mapping that leaves a circular outline intact is going to to be different from the mapping that leaves a rectangular outline intact. I'm afraid there can be a transformation that works only for a family of shapes (e.g. elliptical, which includes circle) but not arbitrary shapes. – Lee David Chung Lin Feb 21 at 14:01
• @LeeDavidChungLin Thanks. Yeah I understand it would work for specific set of shapes although most of them are supposed to be circles indeed. But regardless of input shape, as long as there is a transformation that can pinch the grid points like that, it would totally suffice my case. – Yasin Feb 23 at 6:09