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 might be doing something stupid, but I can't see what it is. This simple example shows that I'm trying to hide the Box, but failing. (I tried it just once, in different positions, too.) The code is a little weird, so that might be the problem...

splot1 = SphericalPlot3D[
   Cos[\[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, Pi}, Mesh -> None, 
   Boxed -> False, PlotPoints -> 80];

aGraphicsComplex = splot1[[1]];

Graphics3D[{Boxed -> False, 
  Lighting -> {{"Point", RGBColor[1, .9, .9], {2, 2, 4}}}, 
  Boxed -> False,
  aGraphicsComplex /. GraphicsComplex[pts_, objs__] :> 
    GraphicsComplex[
     With[{r = 4 Sin[11 (ArcTan[#[[1]], #[[2]]] + #[[3]] )]},
        {r, r, 2} #] & /@ pts, objs]}]

the box that won't go away

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

This should work as you need to feed the option Boxed -> False to Graphics3D and option should be given after the argument in a function.

splot1 = SphericalPlot3D[
Cos[\[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, Pi}, Mesh -> None, 
PlotPoints -> 80];
aGraphicsComplex = splot1[[1]];
Graphics3D[{Lighting -> {{"Point", RGBColor[1, .9, .9], {2, 2, 4}}}, 
aGraphicsComplex /. 
GraphicsComplex[pts_, objs__] :> 
GraphicsComplex[
 With[{r = 4 Sin[11 (ArcTan[#[[1]], #[[2]]] + #[[3]])]}, {r, r, 
      2} #] & /@ pts, objs]}, Boxed -> False]

enter image description here

share|improve this answer
    
Right! Thanks for correcting.. –  PlatoManiac Mar 2 '12 at 10:07
    
@PlatoManiac Thanks! –  cormullion Mar 2 '12 at 11:30
add comment

Boxed -> False is an option of Graphics3D so it must come after the first argument, not as part of it in a list.

Graphics3D[{...}, Boxed -> False]

This is valid for the other options too, just move them to the end.

share|improve this answer
    
Thanks. I suppose I must have thought that both Mesh and Box options would make their way through from SphericalPlot3D to Graphics3D... –  cormullion Mar 2 '12 at 11:30
    
@cormullion They won't because you are specifically picking out the graphics objects only without any options when you do splot1[[1]] –  Szabolcs Mar 2 '12 at 11:42
add comment

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.