curve : improve "inside form" algo