Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Question: Wrapping Density Plot on Sphere

  1. Jul 5, 2008 #1
    I am new to Mathematica and I am trying to make models of white dwarf spherical harmonics similar to the ones on this site: http://whitedwarf.org/education/vis/index.html. So far the closest thing I have is this:

    SphericalPlot3D[3, {\[Theta], 0, \[Pi]}, {\[Phi], 0, 2 \[Pi]},
    Mesh -> None,
    ColorFunction ->
    Function[{x, y, z, \[Theta], \[Phi], r},
    1, \[Theta], \[Phi]]], {-\[Pi], \[Pi]}]]],
    ColorFunctionScaling -> False, PlotPoints -> 35]

    However, the color scaling does not allow a blending of the two colors, so instead I would like to wrap a density plot like this one:

    Re[SphericalHarmonicY[l, m, \[Theta], \[Phi]]], {\[Theta],
    0, \[Pi]}, {\[Phi], 0, 2 \[Pi]},
    FrameLabel -> {\[Theta], \[Phi]}], {l, 1, 10, 1}, {m, 0, 10, 1}]

    over a sphere of radius 3 and be able to control the l and m values with sliders ("Manipulate"). Does anyone know a simple way to do this? Any helpful hints would be greatly appreciated! :)
  2. jcsd
  3. Jul 9, 2008 #2
    You might want to shift this post to 'programming' section. May get more responses there
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook