Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

sphericalplot3d colorfunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129630] sphericalplot3d colorfunction
  • From: sjlukacs at gmail.com
  • Date: Thu, 31 Jan 2013 20:46:41 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

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)