Wolfram 언어

입체 시각화

메가 밀도 플롯

극한의 부분이 가장 불투명한 함수의 3D 밀도 플롯을 생성합니다.

In[1]:=
Click for copyable input
density = DensityPlot3D[ Sin[\[Pi] x] Sin[\[Pi] y] Sin[\[Pi] z], {x, -2, 2}, {y, -2, 1}, {z, -2, 1}, ColorFunction -> (Blend[{RGBColor[1, 0, 0], RGBColor[ 1, 1, 0]}, #] &), OpacityFunction -> Function[f, If[Abs[f] > .5, .22, .01]], OpacityFunctionScaling -> False, PlotTheme -> "Minimal"]
Out[1]=

영역을 슬라이스하는 면 상에서 같은 함수를 플롯합니다.

In[2]:=
Click for copyable input
slices = SliceDensityPlot3D[ Sin[\[Pi] x] Sin[\[Pi] y] Sin[\[Pi] z], {z == y, x == y, x == -y}, {x, -2, 2}, {y, -2, 1}, {z, -2, 1}, BoundaryStyle -> Directive[GrayLevel[1, .5], AbsoluteThickness[1]], ColorFunction -> (Abs[#] &), PlotPoints -> 60, PlotTheme -> "Minimal"]
Out[2]=

두개의 플롯을 함께 조합하여 메가 밀도 플롯을 만듭니다.

In[3]:=
Click for copyable input
Rasterize[Show[density, slices, ImageSize -> 400]]
Out[3]=

관련 예제

de en es fr ja pt-br ru zh