Cookie pot

Hey guys, i need to crate some algorithm that can turn any form into a “cookie pot”.
I am triyng to do it but when i use more complex form it dosent work so well.
Is there a easy way to do it?

No easy way for sure. Are your input shapes guaranteed to be closed meshes?