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.

Is there an easy way to draw an outline around a sphere? Is there something like EdgeForm[] that will work?

I'm looking for perhaps a thick red line; I'm making a plot with many spheres of different colors and opacities, and I need a way of visually distinguishing the ones that are "in use" from the ones that are "inert".

share|improve this question
3  
"I need a way of visually distinguishing the ones that are 'in use' from the ones that are 'inert'." - maybe a job for Lighter[], Darker[], and Glow[]? –  J. M. Jun 22 '12 at 14:09
    
@J.M., Yeah, I may end up settling for this. There are just a lot of spheres in a 3D array (diamond lattice, actually), and I wouldn't mind something a bit more striking. –  Ian Hincks Jun 22 '12 at 14:17
2  
I tend to color the different planes differently. (I've used red, blue, and green in the past.) This allows instant identification of the plane the atoms lay in. But, in viewing the unit cell, I just use Lighter and Darker to highlight specific atoms and visually subdue the others. –  rcollyer Jun 22 '12 at 14:27
add comment

1 Answer 1

up vote 10 down vote accepted

This will produce an outline around the sphere which makes it stand out a bit in a plot of many, however it also adds an overlay over it, so it's by no means optimal:

Graphics3D[
  {
    Table[
      Sphere[{x, y, z}, 0.2], 
      {x, -1, 1},{y, -1, 1}, {z, -1, 1}
    ],
    Glow[Blue], 
    Black, 
    FaceForm[Opacity[0.2]], 
    Sphere[{1, 0, 1}, 0.25]
  }
 ] 

Mathematica graphics

share|improve this answer
    
Glow[Yellow] has a nice look to it, imho. –  David Carraher Jun 22 '12 at 15:31
    
@jVincent, that looks really good, thanks! –  Ian Hincks Jun 22 '12 at 15:34
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.