In this work, we propose an original method of resolution of the shape from shading problem, which is accurate and converges with a few iterations. It relies on two simple ideas. On the one hand, we propose to model the scene by a 3D-spline. The key advantage is that boundary conditions are no longer required to make the problem well-posed. On the other hand, we introduce the concept of "useful domain", which allows us to widen the 3D-reconstruction to pixels whose greylevels are not in accordance with the assumptions of SFS. Our method is tailored to meet the two shape from shading formulations, corresponding to orthogonal projection and perspective projection. We can thus validate our method on both synthetic and real images. Keywords shape from shading, 3D reconstruction, spline, perspective projection.