Creating mapping function for surfaces.