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.

  • 1
    $\begingroup$ Add FaceForm[Opacity[1], Opacity[.8]] before Texture[..] in the definition of gr. $\endgroup$ – kglr May 28 '14 at 0:42
  • $\begingroup$ @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. $\endgroup$ – Sigur May 28 '14 at 0:47

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.

| improve this answer | |
  • $\begingroup$ 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? $\endgroup$ – Sigur May 28 '14 at 0:44
  • $\begingroup$ 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? $\endgroup$ – Jens May 28 '14 at 0:47
  • $\begingroup$ I'm using version 9 on Linux. $\endgroup$ – Sigur May 28 '14 at 0:48
  • 1
    $\begingroup$ 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. $\endgroup$ – Sigur May 28 '14 at 0:54
  • 1
    $\begingroup$ @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. $\endgroup$ – halirutan May 28 '14 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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