home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
251_01
/
list3.ps
< prev
next >
Wrap
Text File
|
1987-10-29
|
896b
|
30 lines
%!
% Produce Figure 4
/inch {72 mul} def
/width 4.54 inch def
50 400 translate
width width scale % make square image of desired width
/printerresolution
72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
def
/screen printerresolution 16 div def
screen 127 gt {/screen 127 def} if
screen currentscreen 3 -1 roll pop setscreen
/n width screen mul 72 div 2 sqrt mul 0.99 add cvi def % number of cells
across image
/nx n 2 mul def
/ny n 2 idiv def
/fbase 0.5 n mul 1.0 nx div exp def
/fa 360 nx div fbase ln div def
/c 1 def
/cbase 0.003 1.0 ny div exp def
/S nx string def
nx ny 8 [nx 0 0 ny 0 0]
{/c c cbase mul def /f fa def
0 1 nx 1 sub{S exch f sin c mul 1.0 add 126.5 mul cvi put /f f fbase mul
def}for
S}
image
showpage