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.

So I can create a 2D image that looks like

contourplot = 
 ContourPlot[
  Sin[ x/2] Cos[y], {x, -4 \[Pi], 4 \[Pi]}, {y, -4 \[Pi], 4 \[Pi]}, 
  PlotRange -> All, BaseStyle -> 30]

enter image description here

Notice there is no frame around the image as a whole. Now I want to use this in a 3D plot using the following command

backgroundimage = 
  Graphics3D[{Texture[contourplot], 
    Style[Polygon[{{-1000, -500, -500}, {-1000, 500, -500}, {-1000, 
        500, 500}, {-1000, -500, 500}}, 
      VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}], 
     Lighting -> {{"Ambient", White}}]}];


Show[backgroundimage, Boxed -> False, ImageSize -> 800, 
 ViewPoint -> {2, -2, .3}]

enter image description here

A black border has been added around the 3D object. How can I remove this border? Or is there some way to just make it white?

Thanks

share

1 Answer 1

up vote 4 down vote accepted

Use EdgeForm@None for your Polygon:

backgroundimage = Graphics3D[
     {Texture[contourplot],
      Style[{EdgeForm@None,
             Polygon[{{-1000, -500, -500}, {-1000, 500, -500}, {-1000, 500, 500}, 
                      {-1000, -500, 500}}, 
            VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]
     },
     Lighting -> {{"Ambient", White}}
     ]}];


Show[backgroundimage, Boxed -> False, ImageSize -> 800, ViewPoint -> {2, -2, .3}]

enter image description here

share
1  
Thanks! I noticed that even with EdgeForm set to None, there is what appears to be a dashed line at the bottom, visible in your image. I think this is where the Texture meets the Box surrounding the Graphics3D. I was able to make this go away by replacing None with White. –  Jason B Oct 1 '13 at 17:09
    
@JasonB That's great you've got what you need :) –  Kuba Oct 1 '13 at 18:16

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .