Mathematica Question: Wrapping Density Plot on Sphere

Click For Summary
SUMMARY

This discussion focuses on creating a density plot on a sphere using Mathematica, specifically for visualizing white dwarf spherical harmonics. The user is attempting to combine a SphericalPlot3D with a DensityPlot to achieve a color blending effect that is not possible with the current implementation. The proposed solution involves using the Manipulate function to control the spherical harmonic parameters l and m while overlaying the density plot on a sphere of radius 3.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of spherical harmonics and their applications
  • Knowledge of 3D plotting techniques in Mathematica
  • Experience with the Manipulate function in Mathematica
NEXT STEPS
  • Explore the Manipulate function in Mathematica for interactive visualizations
  • Learn about SphericalHarmonicY function and its parameters in Mathematica
  • Research techniques for overlaying plots in 3D environments
  • Investigate color scaling methods in Mathematica for enhanced visual effects
USEFUL FOR

This discussion is beneficial for Mathematica users, particularly those interested in advanced 3D visualizations, physicists modeling spherical harmonics, and educators creating interactive learning tools in mathematics and physics.

dewood88
Messages
1
Reaction score
0
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},
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 news on Phys.org
You might want to shift this post to 'programming' section. May get more responses there
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K