Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
"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
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
up vote 11 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:

      Sphere[{x, y, z}, 0.2], 
      {x, -1, 1},{y, -1, 1}, {z, -1, 1}
    Sphere[{1, 0, 1}, 0.25]

Mathematica graphics

share|improve this answer
Glow[Yellow] has a nice look to it, imho. – DavidC Jun 22 '12 at 15:31
@jVincent, that looks really good, thanks! – Ian Hincks Jun 22 '12 at 15:34

Your Answer


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.