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?

  • $\begingroup$ 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) ... $\endgroup$ – Lee David Chung Lin Feb 16 at 22:26
  • $\begingroup$ ... 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. $\endgroup$ – Lee David Chung Lin Feb 16 at 22:26
  • $\begingroup$ @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. $\endgroup$ – Yasin Feb 21 at 7:39
  • $\begingroup$ 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. $\endgroup$ – Lee David Chung Lin Feb 21 at 14:01
  • $\begingroup$ @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. $\endgroup$ – Yasin Feb 23 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.