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 have the following code example:

cylinder = ContourPlot3D[y^2 + z^2 == 32, {x, 0, 5}, {y, -6, 6}, {z, -8, 8}, 
                         Mesh -> 1, ContourStyle -> FaceForm[{White, Red}, Opacity[0.0]], 
                         AxesLabel -> {"x", "y", "z"}];
areaR = ContourPlot3D[{1, 0, 0}.({x, y, z} - {0, 1.5, 1.5}) == 0, 
                      {x, 0, 5}, {y, -6, 8}, {z, -6, 8}, 
                      ContourStyle -> Directive[White], Mesh -> False];
Show[cylinder, areaR]

enter image description here

Can anyone tell me how I get the plane areaR to be White?

share|improve this question

2 Answers 2

The lighting will always introduce deviations from the intended surface color. If you don't want this, you can override the lighting by adding Glow to the color. I'm doing this for the areaR object which represents the plane:

cylinder = 
  ContourPlot3D[y^2 + z^2 == 32, {x, 0, 5}, {y, -6, 6}, {z, -8, 8}, 
   Mesh -> 1, ContourStyle -> FaceForm[{White, Red}, Opacity[0.0]], 
   AxesLabel -> {"x", "y", "z"}];
areaR = ContourPlot3D[{1, 0, 0}.({x, y, z} - {0, 1.5, 1.5}) == 0, {x, 
    0, 5}, {y, -6, 8}, {z, -6, 8}, ContourStyle -> Directive[
     Glow[White]
     ],
   Mesh -> False];
Show[cylinder, areaR,
 Background -> Lighter[Gray],
 Lighting -> "Neutral"]

glow

The options Background -> Lighter[Gray] and Lighting -> "Neutral" aren't really necessary but I added them for clarity.

share|improve this answer
    
I should have thought about Glow, thanks, +1. –  Kuba Aug 7 '13 at 22:37

It is White :)

Show[cylinder, areaR, Lighting -> "Neutral"]

enter image description here

share|improve this answer
    
Somehow gray ?! :) Ok, I understand it is a problem of Show and Lighting. Is there a way to combine both graphs and use different lightings for both objects (Cylinder, areaR). Something like this for the areaR: Lighting -> {{"Ambient", White}} and for the cylinder Lighting->Automatic –  user8905 Aug 6 '13 at 9:41
    
@user8905 I do not think so :/ but I might be wrong. –  Kuba Aug 6 '13 at 9:45
    
Thanks for your Help Kuba. –  user8905 Aug 6 '13 at 13:15

Your Answer

 
discard

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.