Changeset 2012


Ignore:
Timestamp:
Nov 17, 2007, 4:02:56 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added a bunch of 8×8 matrix results.
Location:
www/study
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • www/study/part2.html

    r2010 r2012  
    124124</p>
    125125
    126 <p> This 4×4 cluster dot matrix creates dot patterns that mimic the
    127 halftoning techniques used by newspapers: </p>
     126<p> This is an 8×8 Bayer matrix, recursively created from the 4×4 version: </p>
     127
     128<p style="text-align: center;">
     129  <img src="fig2-3-2b.png" width="240" height="240"
     130       class="matrix" alt="4×4 Bayer matrix" />
     131  <img src="out2-3-1b.png" width="256" height="256"
     132       class="inline" alt="4×4 Bayer dithering" />
     133  <img src="grad2-3-1b.png" width="32" height="256"
     134       class="inline" alt="4×4 Bayer dithering gradient" />
     135</p>
     136
     137<p> This 4×4 cluster dot matrix creates dot patterns: </p>
    128138
    129139<p style="text-align: center;">
     
    136146</p>
    137147
     148<p> This 8×8 cluster dot matrix mimics the halftoning techniques used by
     149newspapers: </p>
     150
     151<p style="text-align: center;">
     152  <img src="fig2-3-3b.png" width="240" height="240"
     153       class="matrix" alt="4×4 cluster dot matrix" />
     154  <img src="out2-3-2b.png" width="256" height="256"
     155       class="inline" alt="4×4 cluster dot dithering" />
     156  <img src="grad2-3-2b.png" width="32" height="256"
     157       class="inline" alt="4×4 cluster dot dithering gradient" />
     158</p>
     159
    138160<p> This unusual 5×3 matrix creates artistic vertical line artifacts: </p>
    139161
  • www/study/study.py

    r2011 r2012  
    198198     [ 11,  3,  2,  8],
    199199     [ 15, 10,  9, 14]]
     200DITHER_CLUSTER88 = \
     201    [[ 24, 10, 12, 26, 35, 47, 49, 37],
     202     [  8,  0,  2, 14, 45, 59, 61, 51],
     203     [ 22,  6,  4, 16, 43, 57, 63, 53],
     204     [ 30, 20, 18, 28, 33, 41, 55, 39],
     205     [ 34, 46, 48, 36, 25, 11, 13, 27],
     206     [ 44, 58, 60, 50,  9,  1,  3, 15],
     207     [ 42, 56, 62, 52, 23,  7,  5, 17],
     208     [ 32, 40, 54, 38, 31, 21, 19, 29]]
    200209DITHER_LINE53 = \
    201210    [[ 13,  7,  0,  4, 10],
     
    219228test23x(gradient256bw, DITHER_BAYER44).save("grad2-3-1.png")
    220229
     230test23x(lenna256bw, DITHER_BAYER88).save("out2-3-1b.png")
     231test23x(gradient256bw, DITHER_BAYER88).save("grad2-3-1b.png")
     232
    221233test23x(lenna256bw, DITHER_CLUSTER44).save("out2-3-2.png")
    222234test23x(gradient256bw, DITHER_CLUSTER44).save("grad2-3-2.png")
     235
     236test23x(lenna256bw, DITHER_CLUSTER88).save("out2-3-2b.png")
     237test23x(gradient256bw, DITHER_CLUSTER88).save("grad2-3-2b.png")
    223238
    224239test23x(lenna256bw, DITHER_LINE53).save("out2-3-3.png")
Note: See TracChangeset for help on using the changeset viewer.