K-convexity is a generalization of the concept of convexity in the context of \( \mathbb{R}^n \). While traditional convexity refers to a set \( S \subset \mathbb{R}^n \) being convex if for any two points \( x, y \in S \), the line segment connecting \( x \) and \( y \) (i.e.