5
$\begingroup$

I need to create some black and white illustrations for which I use Glow[White]. Unfortunately this makes soft edges disappear, so objects blend into the background. Is there a way to have Mathematica draw a black edge left and right of the yellow cylinder below?

Graphics3D[{Glow[Yellow], Black, EdgeForm[Thick], Cylinder[]}, Boxed -> False]

yellow barrel

$\endgroup$
4

1 Answer 1

3
$\begingroup$
h[et_] := Graphics3D[{Glow[Yellow], EdgeForm[et], Yellow, Cylinder[]},  Boxed -> False]
ImageMultiply[ h[Black], ColorNegate@EdgeDetect@h[None]]  

Mathematica graphics

$\endgroup$
2
  • $\begingroup$ +1 But does it function for other Graphics3D- primitives ? $\endgroup$
    – eldo
    Oct 3, 2014 at 21:24
  • $\begingroup$ @eldo It's a quick and dirty solution, as I don't know how "general" the OP wants it. Let's see if s/he explains further. $\endgroup$ Oct 3, 2014 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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