A growing self-organizing network for reconstructing curves and surfaces