Numerical methods for chemical analysis of complex surfaces