  We solve the truncated K-moment problem when $K\subseteq R^n$ is the closure
of a, not necessarily bounded, open set (which includes the important cases
$K=R^n$ and $K=R^n_+$). That is, we completely characterize the interior of the
convex cone of finite sequences that have a representing measure on $K\subseteq
R^n$. It is in fact the domain of the Legendre-Fenchel transform associated
with a certain convex function. And so in this context, detecting whether a
sequence is in the interior of this cone reduces to solving a
finite-dimensional convex optimization problem. This latter problem is related
to maximum entropy methods for approximating an unknown density from knowing
only finitely many of its moments. Interestingly, the proposed approach is
essentially geometric and of independent interest, as it also addresses the
abstract problem of characterizing the interior of a convex cone C which is the
conical hull of a set continuously parametrized by a compact set $M\subset R^n$
or $M \subseteq S^{n-1}$, where $M$ is the closure of an open subset of $R^n$
(resp. $S^{n-1}$). As a by-product we also obtain a barrier function for the
cone C.
