This paper presents a method to obtain the mathematical model of a free-form curve or a surface fitting a set of point coordinates by a rational B-spline (NURBS) formulation in the homogeneous R4 space. A method to evaluate the control points R4 coordinates is proposed by means of a two step process. In the first step, NURBS weights are evaluated by means of an optimization procedure making it possible to evaluate the best fitting parameterization as well. In the second step, the control point coordinates are computed by means of a linear least squares approach.