09-15 Hatch

Agenda

  • Class visitor announcement: Iskra Velitchkova on 9/27; Licia He on 9/29.
  • 1:30-2:00pm: Plot your line exercises G & H; magnet-pin them to the whiteboards.
  • 2:00-2:30pm: Visit from Lenore Edman, creator of the AxiDraw
  • 2:30-3:00pm: Discussion of exercises on the whiteboards + projection
  • 3:00-3:15pm: Break
  • 3:15-3:30pm: Hatching exercise
  • 3:30-3:45pm: Hatching and dithering algorithms, discussion.
  • 3:45-4:30pm: Work session.

Hatching

 

Possibilities for dwell-time hatching:


Dithering

Dithering is the problem of rendering a continuous-tone (or high bit-depth) raster image with fewer bits.

Some easy ones are: Threshold; Random; Bayer. (How do they work?)

Floyd-Steinberg is the most common dithering method. it works by using error diffusion, meaning it propagates (adds) the residual quantization error of a given pixel onto its neighboring pixels, to be dealt with later.

for each y from top to bottom do
    for each x from left to right do
        oldpixel := pixels[x][y]
        newpixel := find_closest_palette_color(oldpixel)
        pixels[x][y] := newpixel
        quant_error := oldpixel - newpixel
        pixels[x + 1][y    ] := pixels[x + 1][y    ] + quant_error × 7/16
        pixels[x - 1][y + 1] := pixels[x - 1][y + 1] + quant_error × 3/16
        pixels[x    ][y + 1] := pixels[x    ][y + 1] + quant_error × 5/16
        pixels[x + 1][y + 1] := pixels[x + 1][y + 1] + quant_error × 1/16

Dithering resources

If you enjoy this topic, here are two fantastic articles with lots of code for dithering: