Given a compact and densifiable metric space D, and a continuous function \(f:D\longrightarrow \mathbb {R}^{m}\) , we present a method to approximate f(D) by \(\Gamma _{n}([0,1])\) , where \(\Gamma _{n}:[0,1]\longrightarrow \mathbb {R}^{m}\) is certain single variable function. To be more precise, given \(\varepsilon >0\) , we can construct a function \(\Gamma _{n}\) such that \(d_{\textrm{HP}}\big ( f(D), \Gamma _{n}([0,1]) \big ) \le \varepsilon \) , where \(d_{\textrm{HP}}\) is the Hausdorff–Pompeiu metric. Our main tool are the so called \(\alpha \) -dense curves, which allow us to transform a multidimensional problem into a single variable one. Some numerical examples are provided as well as a brief discussion about the proposed method.