MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

sphericalplot3d colorfunction


hello one and all,

if i have a colorfunction:

color[\[CurlyTheta]_, \[CurlyPhi]_, infxn_] := 
  RGBColor[(Sign[Re[infxn]] + 1)/2, 0, (-Sign[Re[infxn]] + 1)/2, .75];

when i plot using:
ParametricPlot3D[
  Evaluate[{Cos[\[CurlyPhi]] Sin[\[CurlyTheta]], 
     Sin[\[CurlyPhi]] Sin[\[CurlyTheta]], Cos[\[CurlyTheta]]} sh[[
     4]]], {\[CurlyTheta], 0, Pi}, {\[CurlyPhi], 0, 2 Pi}, 
  ColorFunction -> 
   Function[{x, y, z, \[CurlyTheta], \[CurlyPhi]}, 
    color[\[CurlyTheta], \[CurlyPhi], sh[[4]]]], 
  ColorFunctionScaling -> False, PlotRange -> All]),

if plots fine.  but when i try to plot the same function using sphericalplot3d and remove the x,y,z transformations the colorfunction doesn't work correctly anymore.

SphericalPlot3D[
 sh[[4]], {\[CurlyTheta], 0, Pi}, {\[CurlyPhi], 0, 2 Pi}, 
 ColorFunction -> (color[#4, #5, sh[[4]]] &), 
PlotRange -> All]

any suggestions as to why colorfunction just stop working correctly?  why is is different under parametricplot3d?

thank you in advance.  lucas



  • Prev by Date: RowBox disappearing Lines
  • Next by Date: Re: Setting parameters via Manipulate?
  • Previous by thread: RowBox disappearing Lines
  • Next by thread: Re: Euclidean distance of all pairwise combinations (redundants)