How to construct a smooth curve whose range is dense in $\mathbb R^2$? How to construct a smooth curve $f: \mathbb R \to \mathbb R^2$   whose range is dense in $\mathbb R^2$?
Space-filling curves are well-known, but they cannot be smooth.   The image of a smooth function  $f: \mathbb R \to \mathbb R^2$ is a countable union of curves of finite length, so it has zero area.
Here, a smooth function is a function which has derivatives of all orders. Roughly, this curve has no sharp corners.

This example works for all $\mathbb R^n$, $n\ge 2$. 
Pick a countable dense subset of $\mathbb R^n$, call it $\{x_n:n\in\mathbb Z\}$. For each $n\in\mathbb Z$, choose an oriented line segment with midpoint at $x_n$;  call it $I_n$. Map $[4n-1,4n+1]$ onto $I_n$ by an affine map $f$, so that $f(4n)=x_n$. Also map $[4n+1,4n+3]$ onto the line segment connecting the end of $I_n$ to the beginning of $I_{n+1}$. We now have a continuous function $f:\mathbb R\to\mathbb R^n$. 
Then mollify  $f$ to $g=f*\phi$, where $\phi$ is a symmetric bump supported on $[-1,1]$. Observe that 
$$
g(4n) = \int_{-1}^1 f(4n-t)\phi(t)\,dt = f(4n) = x_n
$$
because integration against the even function $\phi$ kills the linear term in $f(4n-t)$. 
Thus, $g$ is $C^\infty$ smooth and its image contains $D$.
