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:(adsbygoogle = window.adsbygoogle || []).push({});

SphericalPlot3D[3, {\[Theta], 0, \[Pi]}, {\[Phi], 0, 2 \[Pi]},

Mesh -> None,

ColorFunction ->

Function[{x, y, z, \[Theta], \[Phi], r},

Evaluate[

Hue@Rescale[

Arg@Re[SphericalHarmonicY[3,

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:

Manipulate[

DensityPlot[

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! :)

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica Question: Wrapping Density Plot on Sphere

**Physics Forums | Science Articles, Homework Help, Discussion**