[Date Index]
[Thread Index]
[Author Index]
color in SphericalPlot3D
*To*: mathgroup at smc.vnet.net
*Subject*: [mg47997] color in SphericalPlot3D
*From*: "Maurits Haverkort" <Haverkort at ph2.uni-koeln.de>
*Date*: Wed, 5 May 2004 08:11:03 -0400 (EDT)
*References*: <c778ms$hf7$1@smc.vnet.net> <200405041103.HAA02766@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Dear All
I have a complex function R(t_,f_) of wich I would like to plot
R*Conjugate[R] in 3D. So far no problem, SphericalPlot3D does this for me.
But I want to conserve phase information, wich I want to put in the color.
(positive red, negative blue, complex purple). For Real functions R(t_,f_) I
made the folowing notebook that does not work. It should plot first the
function for R>0 in red and then the part for R<0 in blue. After combining
the two plots with show everything is blue. Has this problem been solved
before? Does anybody know how to asign a color to the surface of a Spherical
3D plot?
Needs["Graphics`ParametricPlot3D`"];
R = FullSimplify[SphericalHarmonicY[2, 2, t, f] + SphericalHarmonicY[2, -2,
t, f]];
plotpos = SphericalPlot3D[If[R >= 0, R Conjugate[R], 0], {t, 0, \[Pi]}, {f,
0, 2\[Pi]}, LightSources -> {{{1, 1, 1}, RGBColor[1, 0, 0]}}];
plotneg = SphericalPlot3D[If[R <= 0, R Conjugate[R], 0], {t, 0, \[Pi]}, {f,
0, 2\[Pi]}, LightSources -> {{{1, 1, 1}, RGBColor[0, 0, 1]}}];
Show[plotneg, plotpos]
Thanks,
Maurits Haverkort
Prev by Date:
**RE: Do Modules Produce Side Effects?**
Next by Date:
**Re: Derivative of Sum**
Previous by thread:
**Re: Do Modules Produce Side Effects?**
Next by thread:
**Re: color in SphericalPlot3D**
| |