%!PS % Title here check knob math 1 % ======= % Author and date % Function % Details % ====== % Gonzo utilities of http://www.tinaja.com/gonzo.psl are presently NOT % built in for immediate use. This adds 90K to the file size. A tutorial % can be found at http://www.tinaja.com/glib/gonzotut.pdf % If, instead, Gonzo is to be run as a diskfile for the much shorter code here, % Distiller MUST be run from the command line as this or similar % "C:/Program Files (x86)/Adobe/Acrobat 11.0/Acrobat/acrodist.exe" /F run % Projects at http://www.tinaja.com/pssamp1.shtml % ======= % Uncomment and modify to use disk based Gonzo. ( or other disk access ) (C:/Users/Don/Desktop/Ghost/gonzo.psl) run % use internal % 20 20 10 setgrid % 57 75 showgrid % ============== gonzo enhancements /webtintmat [ 0 1 5 {/a exch store 0 1 5 {/b exch store 0 1 5 {5 div b 5 div a 5 div} for }for } for ] def /setwebtint { abs cvi 216 cvi mod webtintmat exch 3 mul 3 getinterval aload pop setrgbcolor} def % comparing knob texturing using a pseudo log technique instead of a true cosine. % While not quite "accurate" it looks better, especially where low angles could % get into turf fights with pixellation. % The technique is easily integrated into Paint. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%% log version %%%%%%%%%%%%% 20 20 10 setgrid 57 14 showgrid /myscale 0.3 store /numsamps 30 store /posat 1 store /logarray [ 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 ] store 0 1 logarray length 1 sub {/curlog exch store curlog == curlog cvi 2 mod 0 eq { 0 1 0 setrgbcolor} {0 0 0 setrgbcolor } ifelse /curwidth logarray curlog get myscale mul store posat 1 mt 6 pu curwidth pr 6 pd closepath fill /posat posat curwidth add store } for %%% redo debug (\n\n\n\redo start )print /myscale 2.2876 store /numsamps 26 store /posat 1 store /deginc 90 numsamps div store 0 1 numsamps 1 sub { /curstripe exch store /curang deginc curstripe mul store curang cos myscale mul /curwidth exch store curstripe cvi 2 mod 0 eq { 1 1 0 setrgbcolor} {0 0 0 setrgbcolor } ifelse curstripe == curang == curwidth == posat 7 mt 6 pu curwidth pr 6 pd closepath fill /posat posat curwidth add store } for /kern 0.1 store /cstretch 0.05 store /sstretch 0.5 store /font1 /FilsonSoftHeavy 1.6 gonzofont font1 42 3.5 (Pseudo Log) cl 42 9.5 (T|krue Cosine) cl showpage % EOF