My doubts here are related to the construction of 3D plots of Multivariable functions. As a consequence of that, I am going to keep these questions in this single post rather than creating several posts on the same topic.
It should be remarked that I have also read Mathematica's documentation and previous questions of Mathematica stack exchange. However, these latter did not help me.
With that said, suppose that we have the following multivariable function
$\displaystyle \psi(x,y)=\frac{-((2 (132 + 56 x^4 - 382 y + 394 y^2 - 171 y^3 + 26 y^4 + 6 x^3 (-47 + 31 y) + x^2 (608 - 782 y + 240 y^2) + x (-602 + 1130 y - 716 y^2 + 153 y^3)))}{((16 + 4 x^2 + 8 x (-2 + y) - 16 y + 5 y^2)^2 (5 x^2 + (3 - 2 y)^2 + x (-6 + 4 y))^2))}$
Based on the above, I ask the following questions:
- How may I construct a 3D plot of $\psi(x,y)$ so that positive values are represented by red colors and negative values are regarded to blue colors?
Here, I have tried to use the Plot3D command as follows,
Plot3D[-((2 (132 + 56 x^4 - 382 y + 394 y^2 - 171 y^3 + 26 y^4 +
6 x^3 (-47 + 31 y) + x^2 (608 - 782 y + 240 y^2) +
x (-602 + 1130 y - 716 y^2 + 153 y^3)))/((16 + 4 x^2 +
8 x (-2 + y) - 16 y + 5 y^2)^2 (5 x^2 + (3 - 2 y)^2 +
x (-6 + 4 y))^2)), {x, -1, 4}, {y, -1, 3}, ColorFunction -> Function[{x, y, z}, If[z > 0, Red, Blue]], AxesLabel -> (Style[#, Black, 20, Bold] & /@ {"x", "y",
"\[CapitalPsi]"}), TicksStyle -> Directive[Bold, Black],Epilog -> {Black, PointSize@Large, Point[{2, 1, 0}]}]
In this code, I have considered the ColorFunction command to represent the positive and negative values of $\psi(x,y)$. However, I am not quite sure whether this is indeed correct. As we may see, $\psi(x,y)$ is a negative function. Hence, should not we observe a predominantly blue color in the 3D plot of $\psi$?
Is there a way to determine whether or not $\psi(x,y)$ is symmetric using Mathematica? That is to say, is the Swap command applicable to multivariable functions like $\psi$ ?
How may one insert the point $(2,1)$ in the 3-D plot of $\psi(x,y)$? Here, I have applied the Epilog command, as one may see above. However, the point is not visiable.
Thanks and I look forward to hearing from you.
LogisticSigmoid[]
+Blend[]
in theColorFunction
; using a simpler example:Plot3D[Sin[x + Sin[y]], {x, -3, 3}, {y, -3, 3}, ColorFunction -> (Blend[{Blue, Gray, Red}, LogisticSigmoid[15 #3]] &), ColorFunctionScaling -> False]
$\endgroup$