2
$\begingroup$

If I plot a surface with mesh lines, they show up fine (of course). However, if the surface is even just a little transparent, they get quite rough. Compare this to setting the Opacity to 1:

  ParametricPlot3D[{4 + (3 + Cos[v]) Sin[u], 4 + (3 + Cos[v]) Cos[u], 
   4 + Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, 
   PlotStyle -> Opacity[.99],
   MeshStyle -> Thickness[.005], 
   ImageSize -> 800,
   Axes -> False, Boxed -> False]

Here are the results:

rough lines smooth lines

How can I get proper smooth lines and use Opacity at the same time?

UPDATE (Aug. 9, 2014): Wolfram tells me that "this is an issue with rendering transparent 3D objects on Linux systems using Intel graphics hardware." It has to do with "depth peeling".

$\endgroup$
7
  • $\begingroup$ Works fine for me on Mathematica 9.0.1 on Mac. What's your version and platform? $\endgroup$
    – user484
    Jul 11, 2014 at 6:38
  • $\begingroup$ Works great from me also. V9 and V10. Win8.1 $\endgroup$ Jul 11, 2014 at 7:09
  • 1
    $\begingroup$ This problem must be oddly system-dependent, because I can reproduce it with Mathematica 9.0.1 on a 2012 MacBook Air running OS X 10.9.3. $\endgroup$ Jul 11, 2014 at 8:55
  • $\begingroup$ I am using MMA 9.0.1.0 on Linux x86 (32-bit). $\endgroup$
    – Russ Lyons
    Jul 11, 2014 at 15:35
  • $\begingroup$ I just downloaded MMA 10.0.0 (on Linux). It has the same problem (though the default colors have changed considerably). I will ask Wolfram about this bug. $\endgroup$
    – Russ Lyons
    Jul 13, 2014 at 5:20

1 Answer 1

3
$\begingroup$

This is not an answet, but an extended comment with graphics.

Running V9 on OS X, your code with PlotStyle -> Opacity[.8], gives me this:

torus

I experience no noticeable performance hit. What's not to like about it? Well, I'd add Mesh -> Full to fill in the missing mesh circle at u = 0.

$\endgroup$
3
  • $\begingroup$ Thanks for the tip on the missing mesh part! $\endgroup$
    – Russ Lyons
    Jul 11, 2014 at 15:36
  • $\begingroup$ How does one get a Full Mesh while also using a non-default number of lines? Without Full, it will not give the lines at 0 (or 2Pi). I have posted this as a regular question at mathematica.stackexchange.com/questions/54744/… $\endgroup$
    – Russ Lyons
    Jul 13, 2014 at 19:51
  • $\begingroup$ For completeness: The answer to that question is to use BoundaryStyle (see the answer to the above post). $\endgroup$
    – Russ Lyons
    Jul 14, 2014 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.