3
$\begingroup$

Is it possible to apply HatchShading (a new Mathematica 12 option for Plot3D and friends) to a generic Graphics3D object (for example, spheres, tubes, and arrows), such as:

a = {0, 0, 0};
b = {1, 0, 0};
c = {0, 1, 0};
Graphics3D[{
   Arrowheads[0.2]
  , Arrow[ Tube[{a, b}, 0.05]]
  , Arrow[ Tube[{a, c}, 0.05]]
  , Sphere[a, 0.2]
  }]

some 3d graphics objects

If not, how can I render such a Graphics3D object in grayscale?

$\endgroup$
0

1 Answer 1

5
$\begingroup$

You can add the directives HatchShading[] and Lighting -> "Neutral" ("white light sources in default positions") or Lighting -> "Accent" ("a directional white light in default direction") before the graphics primitives:

Graphics3D[{Lighting -> "Neutral"
    , HatchShading[]
    , Arrowheads[0.2]
    , Arrow[ Tube[{a, b}, 0.05]]
    , Arrow[ Tube[{a, c}, 0.05]]
    , Sphere[a, 0.2]
    }, ImageSize -> Large] 

enter image description here

With Lighting -> "Accent" we get

![enter image description here

$\endgroup$

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.