1

By default the

f[z_] = ((z^2 - 1)*((z - 2 - I)^2)) / (z^2 + 2 + 2*I) 
ComplexPlot3D[f[z], {z, 10}]

will output AbsArg 3d plot (because by default the MeshFunctions -> {Abs[#2] &, Arg[#2] &})

But I want ReIm 3d plot like here https://mathematica.stackexchange.com/a/125633/86077

https://i.stack.imgur.com/spLJ7.png

But there should be easier way

But when I try MeshFunctions -> {Re[#2] &, Im[#2] &} it doesnt work, it still shows AbsArg plot

  1. WHY?
  2. How MeshFunctions work? how the output is used?

enter image description here enter image description here

cvgmt
  • 72,231
  • 4
  • 75
  • 133
srghma
  • 123
  • 5

1 Answers1

3
f[z_] = ((z^2 - 1)*((z - 2 - I)^2))/(z^2 + 2 + 2*I);
Block[{z = x + I*y}, 
 Plot3D[Re@f[z], {x, -5, 5}, {y, -5, 5}, 
  ColorFunction -> 
   Function[{x, y}, ColorData["TemperatureMap"][Im@f[z]]], 
  ColorFunctionScaling -> True]]

enter image description here

We can add Mesh and the same time.

f[z_] = ((z^2 - 1)*((z - 2 - I)^2))/(z^2 + 2 + 2*I);
Block[{z = x + I*y}, 
 Plot3D[Re@f[z], {x, -5, 5}, {y, -5, 5}, 
  ColorFunction -> 
   Function[{x, y}, ColorData["TemperatureMap"][Im@f[z]]], 
  MeshFunctions -> Function[{x, y}, Im@f[z]], 
  ColorFunctionScaling -> True]]

enter image description here

cvgmt
  • 72,231
  • 4
  • 75
  • 133