Wolfram Language

Volume Visualization

Use Opacity to See Function

Focus on different structures in a volume by giving the interval of values that should be the most opaque.

show complete Wolfram Language input
In[1]:=
Click for copyable input
cf = (Blend[{XYZColor[0.3651259694591164, 0.5882434929515259, 0.08575524579794143], XYZColor[0.44154536812995837, 0.22482156190870056, 0.041237128840346395], XYZColor[0.24982301302021226, 0.24942975572041332, 0.7394759844029367]}, #] &);
In[2]:=
Click for copyable input
func = Sum[ Cos[5 Norm[{x, y, z} - {Sin[\[Theta]], Cos[\[Theta]], 0}]], {\[Theta], 0., 2 \[Pi] - (2 \[Pi])/3, (2 \[Pi])/3}];
In[3]:=
Click for copyable input
Grid[Partition[ Table[DensityPlot3D[func, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, OpacityFunction -> Interval[{a, a + .1}], ColorFunction -> cf, PlotTheme -> "Web"], {a, 0, .9, .2}], 2]]
Play Animation
Stop Animation

Related Examples

de es fr ja ko pt-br ru zh