In the case of image processing or understanding, one of the common important tasks is to fit closed curves (e.g., circles, ellipses, etc.) to the underlying image. In higher-dimensional situations, the problem of modeling clusters as closed curves remains even more challenging.To deal with this problem we introduce a new probability distribution, which models complicated closed curves with the use of Fourier series. Then, a mixture of such distributions is constructed, leading to our model MCEC. It is shown that MCEC can be effectively trained in the case of closed curves in Rn.MCEC was evaluated in clustering, curve fitting, and image segmentation tasks. We compare it in particular to classical GMM, Hough transform, and Snakes algorithm. In each task, we consistently obtain or outperform the current SOTA.