Numerical minimization of geometrical type problems related to calculus of variations