Re: plotting contours on a sphere
- To: mathgroup at smc.vnet.net
- Subject: [mg119518] Re: plotting contours on a sphere
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Tue, 7 Jun 2011 08:14:10 -0400 (EDT)
My response only provided the replacement definition for p3. At a minimum, the OP's definition of f must also be used. f[\[Theta]_, \[Phi]_] = Sin[\[Theta] + \[Phi]]; p3 = SphericalPlot3D[1, {\[Phi], 0, Pi}, {\[Theta], 0, 2 Pi}, ColorFunctionScaling -> False, ColorFunction -> Function[{x, y, z, \[Theta], \[Phi], r}, ColorData["TemperatureMap"] [Rescale[f[\[Phi], \[Theta]], {-1, 1}]]], Mesh -> 9, MeshFunctions -> {Function[{x, y, z, \[Theta], \[Phi], r}, f[\[Phi], \[Theta]]]}, BoundaryStyle -> Transparent] $Version "8.0 for Mac OS X x86 (64-bit) (February 23, 2011)" Bob Hanlon ---- "Nasser M. Abbasi" <nma at 12000.org> wrote: ============= On 6/6/2011 3:23 AM, Bob Hanlon wrote: > p3 = SphericalPlot3D[1, {\[Phi], 0, Pi}, {\[Theta], 0, 2 Pi}, > ColorFunctionScaling -> False, > ColorFunction -> Function[{x, y, z, \[Theta], \[Phi], r}, > ColorData["TemperatureMap"] > [Rescale[f[\[Phi], \[Theta]], {-1, 1}]]], > Mesh -> 9, > MeshFunctions -> > {Function[{x, y, z, \[Theta], \[Phi], r}, > f[\[Phi], \[Theta]]]}] > > > Bob Hanlon > Hi Bob; what version of Mathematica did you use? on 8.0.1, windows 7, I get an error message. MeshFunctions::invmeshf: MeshFunctions->{At Line = 1, the input was:,p3=SphericalPlot3D[1,{\[Phi],0,Pi},{\[Theta],0,2Pi},ColorFunctionScaling->False, ColorFunction->Function[{x,y,z,\[Theta],\[Phi],r}, ColorData[TemperatureMap][Rescale[f[\[Phi],\[Theta]],{-1,1}]]], Mesh->9,MeshFunctions->{Function[{x,y,z,\[Theta],\[Phi],r},f[\[Phi], \[Theta]]]}],f[#5,#4]&} must be a pure function or a list of pure functions. >> here is a screen shot also fyi http://12000.org/tmp/june_5_2011/msg.png --Nasser -- Bob Hanlon