Pinch transform shapes

158 Views Asked by At

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

Like this image, enter image description here 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?