HatchShading

HatchShading[]

is a three-dimensional graphics directive specifying that objects that follow are to be drawn with closely spaced parallel lines.

HatchShading[d]

uses the density d of shading.

HatchShading[col]

uses lines with the specified color col.

HatchShading[d,col]

uses lines with the specified color col and density d.

Details

  • HatchShading is also known as cross-hatching.
  • HatchShading is typically used to create tonal effects with closely spaced parallel lines.
  • HatchShading[d,col] specifies that lines of color col should vary with overall density d.
  • The density of lines is driven by the luminosity of the surface. Less dense areas are where there is high luminosity.
  • The density d is between 0 and 1. A higher value indicates more lines per area.
  • The color col can be defined by RGBColor, Hue or any other color specification.
  • In HatchShading[d], the color of lines is taken to be Black.
  • HatchShading[col] uses a density of 0.5.
  • HatchShading[] is effectively equivalent to HatchShading[0.5,Black].
  • The setting Lighting"Accent" uses a directional light and faithfully reproduces colors on the surface.

Examples

open allclose all

Basic Examples  (4)

Apply hatch shading to the unit sphere with a directional light:

Use hatch shading to show a knot:

Style a surface in a plot:

A cross-hatching portrait of Beethoven:

Scope  (11)

Basic Uses  (5)

Apply hatch shading to a graphics primitive:

Apply hatch shading to a plot:

Apply hatch shading to a chart:

Apply hatch shading to a 3D object:

Summary box:

Specification  (3)

HatchShading with no arguments uses gray tones:

Apply hatch shading to the unit sphere with different densities:

Use colorized hatch shading:

Lighting  (3)

HatchShading works with all types of lights:

Use colored lights:

Use "Accent" lighting to faithfully reproduces colors on the surface:

Possible Issues  (2)

The default light scheme uses several colored light sources:

Use a single directional light to get the standard hatch shading effect:

No shading effect is applied to faces of polygons or filled graphic objects:

Wolfram Research (2020), HatchShading, Wolfram Language function, https://reference.wolfram.com/language/ref/HatchShading.html.

Text

Wolfram Research (2020), HatchShading, Wolfram Language function, https://reference.wolfram.com/language/ref/HatchShading.html.

CMS

Wolfram Language. 2020. "HatchShading." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HatchShading.html.

APA

Wolfram Language. (2020). HatchShading. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HatchShading.html

BibTeX

@misc{reference.wolfram_2024_hatchshading, author="Wolfram Research", title="{HatchShading}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/HatchShading.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_hatchshading, organization={Wolfram Research}, title={HatchShading}, year={2020}, url={https://reference.wolfram.com/language/ref/HatchShading.html}, note=[Accessed: 21-November-2024 ]}