10
$\begingroup$

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".

$\endgroup$
  • 3
    $\begingroup$ "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[]? $\endgroup$ – J. M. will be back soon Jun 22 '12 at 14:09
  • $\begingroup$ @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. $\endgroup$ – Ian Hincks Jun 22 '12 at 14:17
  • 2
    $\begingroup$ 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. $\endgroup$ – rcollyer Jun 22 '12 at 14:27
11
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Glow[Yellow] has a nice look to it, imho. $\endgroup$ – DavidC Jun 22 '12 at 15:31
  • $\begingroup$ @jVincent, that looks really good, thanks! $\endgroup$ – Ian Hincks Jun 22 '12 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.