5

I would like to make the lines opaque for a plot of form similar to:

Graphics3D[{Opacity[0.1], Line[RandomVariate[
    MultinormalDistribution[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}], 1000]]}]

enter image description here

Using opacity here doesn't seem to produce a similar effect to using an equivalent for a 2d ListPlot, where it is easier to see the layering.

ListLinePlot[
 RandomVariate[MultinormalDistribution[{0, 0}, {{1, 0}, {0, 1}}], 
 1000], PlotStyle -> {Opacity[0.4], Black}]

Does anyone know how I can recreate this similar type of effect with the 3D plot of a line?

enter image description here

ben18785
  • 3,167
  • 15
  • 28
  • 2
    Works fine for me on MMA 10.0.1.0. You'll probably need to add some info about your system. – N.J.Evans Jan 19 '16 at 21:17
  • Maybe I should try updating my Mathematica. At the moment am using: "10.0 for Microsoft Windows (64-bit) (September 9, 2014)" – ben18785 Jan 19 '16 at 21:19

1 Answers1

8

This also works for me in 10.1.0 under Windows 7 x64. Take a look at your rendering settings; referencing Graphics3D: Opacity limitations this is affected by DepthPeelingLayers for example.

plot = Graphics3D[{Opacity[0.1], 
    Line[RandomVariate[
      MultinormalDistribution[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}], 1000]]}];

Table[
   Show[plot, BaseStyle -> RenderingOptions -> {"DepthPeelingLayers" -> n}],
   {n, {1, 5, 10, 20, 40, 80}}
] ~Partition~ 3 // Grid

enter image description here

Perhaps your rendering hardware simply doesn't support this method, or perhaps "Software" rendering is being used. Try specifically:

Table[
  Show[plot, BaseStyle -> RenderingOptions ->
   {"Graphics3DRenderingEngine" -> method}],
 {method, {"HardwareDepthPeeling", "BSPTree", "Software"}}
]

enter image description here

Note that on my system "Software" produces a result not too dissimilar to the one you are experiencing.

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371