# Different Mesh color in multiple Plot3D

I'm plotting two functions in Mathematica:

pp = 100;

z = x + I y;
w[z_] := z + 1/z;

Plot3D[{Re[w[z]], Im[w[z]]},
{x, -1, 1}, {y, -1, 1},
MeshFunctions -> {#3 &},
MeshStyle -> {Blue, Red},
BoxRatios -> {1, 1, 1},
PlotStyle -> Opacity[0.5],
PlotPoints -> pp,
ImageSize -> Large
]


I would like to have two different mesh line color, one for every function, so that every function has his own contour lines distinguished from the other's. So, for example, my plot is:

while I would like that the blue surface to have red contour lines. I would also prefer not to have the two plot separated with the Show function, if it is possible I would like to make the whole plot in the same command Plot3D[...].

# EDIT:

At the same time it would be nice also to know how to change the color of the two surfaces, still inside the Plot3D[...].

With a bit of functional programming you can write only one Plot3D function and map it over the parameters. Read the Pure Functions tutorial and Related Tutorials found there.

With pp, z, and w as defined then OP.

Plot3D[#1[w[z]], {x, -1, 1}, {y, -1, 1},
MeshFunctions -> {#3 &},
MeshStyle -> #2,
PlotRange -> {-5, 5},
PlotStyle -> Opacity[.5, #2],
BoxRatios -> {1, 1, 1},
PlotStyle -> Opacity[0.5],
PlotPoints -> pp,
ImageSize -> Large] & @@@ {{Re, Blue}, {Im, Red}} // Show


Hope this helps.