Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I discovered this excellent answer which contains a so beautiful plot.

I just copied the whole code and tried to reproduce the result but the contour plot used as texture looks like flipped, that is, when I see the plot from above the result is

enter image description here

and if I see it from below the result is

enter image description here

How to fix this? I mean, how to put the white color visible from the top?

I'm using Mathematica 9.

share|improve this question
Add FaceForm[Opacity[1], Opacity[.8]] before Texture[..] in the definition of gr. –  kguler May 28 at 0:42
@kguler, it does not work. Your code just make the bottom white color transparent so that I can see from bottom to top; and the top gray color becomes the same. –  Sigur May 28 at 0:47

1 Answer 1

up vote 7 down vote accepted

Whenever you have an object in a three-dimensional scene that needs to be displayed independently of the lighting conditions, it's a good idea to give that object a Glow. From the docs:

Glow is a color component independent of simulated illumination.

This is what I use in the definition of gr (last line before Show in the answer linked in the question):

gr = Graphics3D[{Glow[White], Texture[contourPotentialPlot1], 
    Polygon[{{-400, -300, level}, {400, -300, level}, {400, 300, 
       level}, {-400, 300, level}}, 
     VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}, 
   Lighting -> "Neutral"];

Everything else can stay the same, and you now have the two-dimensional plot appearing bright in all directions.

share|improve this answer
Ow, thanks! It works perfectly now. Do you know why I got a different result from you or maybe there is a typo on the linked code so that plots does not correspond to that code? –  Sigur May 28 at 0:44
It's true, I get the darker appearance in the bottom view, not the top view, when no Glow is added. I'm using Mathematica version 8, what are you using? –  Jens May 28 at 0:47
I'm using version 9 on Linux. –  Sigur May 28 at 0:48
Well, I restarted the software but no progress. Your suggestion to use Glow works nice and I also used the Opacity as suggested by kguler so now I can see from bottom to top. Thanks. –  Sigur May 28 at 0:54
@Jens Have V9 and Linux too and it is not lighted from upside down. My first guess was that he messed with the Lighting options too. If not, the issue is really mysterious. –  halirutan May 28 at 1:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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