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$ Commented 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$ Commented Oct 3, 2014 at 21:42

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.