An Algorithm to Optimize the Micro-Geometrical Dimensions of Scaffolds with Spherical Pores