A three-dimensional model for solar prominences