Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13324

sphericalplot3d colorfunction

From sjlukacs@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject sphericalplot3d colorfunction
Date 2013-02-01 01:45 +0000
Message-ID <kef6ol$k8e$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

sphericalplot3d colorfunction sjlukacs@gmail.com - 2013-02-01 01:45 +0000

csiph-web