xref: /plan9-contrib/sys/src/cmd/postscript/postmd/README (revision 7dd7cddf99dd7472612f1413b4da293630e6b1bc)
1*7dd7cddfSDavid du Colombier
2*7dd7cddfSDavid du ColombierA program that displays a matrix as a gray scale image on PostScript
3*7dd7cddfSDavid du Colombierprinters. May be useful if you have a large matrix and want a simple
4*7dd7cddfSDavid du Colombierway to look for patterns. Expect a 600x600 matrix is an optimistic
5*7dd7cddfSDavid du Colombierupper limit on a 300 dpi printers using 5 shades of gray and 8.5x11
6*7dd7cddfSDavid du Colombierinch paper.
7*7dd7cddfSDavid du Colombier
8*7dd7cddfSDavid du ColombierMatrix elements are a series of floating point numbers arranged in
9*7dd7cddfSDavid du Colombierthe input file in row major order. By default each matrix is assumed
10*7dd7cddfSDavid du Colombierto be square and the number of rows (and columns) is set to the square
11*7dd7cddfSDavid du Colombierroot of the number of elements in the input file. White space, including
12*7dd7cddfSDavid du Colombiernewlines, is not used to determine the matrix dimensions. Each matrix
13*7dd7cddfSDavid du Colombierelement is mapped into an integer in the range 0 to 255 (254 by default)
14*7dd7cddfSDavid du Colombierand PostScript's image operator maps that integer into a gray scale
15*7dd7cddfSDavid du Colombierappropriate for the printer.
16*7dd7cddfSDavid du Colombier
17*7dd7cddfSDavid du ColombierThe mapping from floating point matrix elements to integers is controlled
18*7dd7cddfSDavid du Colombierby an interval list and grayscale map. The default interval list is
19*7dd7cddfSDavid du Colombier"-1,0,1" which partitions the real line into 7 regions. The default
20*7dd7cddfSDavid du Colombiergrayscale map gets darker as the regions move from left to right along
21*7dd7cddfSDavid du Colombierthe real line. The -i option changes the interval list and the -g option
22*7dd7cddfSDavid du Colombiermodifies the grayscale mapping. Check the man page for more details.
23*7dd7cddfSDavid du Colombier
24