[Date Index]
[Thread Index]
[Author Index]
Re: color in SphericalPlot3D
*To*: mathgroup at smc.vnet.net
*Subject*: [mg48017] Re: color in SphericalPlot3D
*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
*Date*: Fri, 7 May 2004 04:29:37 -0400 (EDT)
*Organization*: Universitaet Leipzig
*References*: <c778ms$hf7$1@smc.vnet.net> <200405041103.HAA02766@smc.vnet.net> <c7am2k$hdv$1@smc.vnet.net>
*Reply-to*: kuska at informatik.uni-leipzig.de
*Sender*: owner-wri-mathgroup at wolfram.com
Hi,
Needs["Graphics`ParametricPlot3D`"];
SphericalPlot3D[
{Abs[SphericalHarmonicY[2, -2, t, f]],
SurfaceColor[Hue[Arg[SphericalHarmonicY[2, -2, t, f]/(2Pi) +
0.1]]]},
{t, 0, \[Pi]}, {f, 0, 2\[Pi]}, PlotPoints -> {16, 64}]
Regards
Jens
Maurits Haverkort wrote:
>
> 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:
**Problems with Latex (Windows) and Mathematica 5.0**
Next by Date:
**RE: color in SphericalPlot3D**
Previous by thread:
**color in SphericalPlot3D**
Next by thread:
**Re: Do Modules Produce Side Effects?**
| |