Mathematica Asked by Peeter Joot on February 4, 2021
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]
}]
If not, how can I render such a Graphics3D object in grayscale?
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]
With Lighting -> "Accent"
we get
Answered by kglr on February 4, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP