I am trying to plot a density plot on a surface of a sphere, where the density function Sqrt[1-x^2]Sqrt[1-x^2]
is symmetric around 00
. (There, x=Sin[[Theta]] Cos[[Phi]].x=Sin[θ] Cos[ϕ]
).
So far I have:
ParametricPlot3D[{Sin[[Theta]] Cos[[Phi]], Sin[[Theta]] Sin[[Phi]], Cos[[Theta]]}, {[Theta], 0, [Pi]}, {[Phi], 0, 2 [Pi]}, ColorFunction -> Function[{x, y, z, [Theta], [Phi]}, ColorData["Rainbow"][Sqrt[1 - x^2]]]]
ParametricPlot3D[{Sin[θ] Cos[ϕ],
Sin[θ] Sin[ϕ], Cos[θ]}, {θ, 0, π}, {ϕ, 0, 2 π}, ColorFunction -> Function[{x, y, z, θ, ϕ}, ColorData["Rainbow"][Sqrt[1 - x^2]]]]
But somehow when the plot is outputteddisplayed, values for x=1the colors at x=1
and x=-1 are differentx=-1
do not match. SomethingDoes it have something to do with ColorFunctionthe ColorFunction
?