%!PS % Combined automottling background and vignette utilities % ======================================================= % by Don Lancaster %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright c 2005 by Don Lancaster & Synergetics, Box 809, Thatcher, AZ, 85552 % (928) 428-4073 Email: don@tinaja.com Website: http://www.tinaja.com % Consulting services available http://www.tinaja.com/info01.html % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 2.1 % This is an expanding set of universal bitmap imaging utilities that % potentially offer ultra fancy calculated image manipulation possibilities. % Certain XY mnipulations may be 5X slower and increase with the resolution square. % A minimum of 250 megabytes of system RAM is recommended with no other programs active. % Image must be EXTERNALLY converted to/from .JPG or other non .BMP format. % presently setup for background mottling % NOTE THAT ALL PS FILENAME STRINGS !!!DEMAND!!! DOUBLE REVERSE SLASHES. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % approximate roll cacluator /india 2.00 store /thick 0.005 store /turns 200 store /rolllength 0 store /curpos 0 store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /showtime true store % make timings visible? % IMPORTANT NOTE: Don Lancaster's file gonzo.ps is recommended but not % required for this program. % After obvious location mods, uncomment ONE of the following two lines: % (C:\\Documents and Settings\\don\\Desktop\\gonzo\\gonzo.ps) run % use internal % (A:\\gonzo.ps) run % use external gonzo % NOTE THAT ALL PS FILENAME STRINGS !!!DEMAND!!! DOUBLE REVERSE SLASHES. % GONZO20A Guru Gonzo PostScript power tools (Interim release) % Includes gonzo justification and layout utilities. % Copyright c 1990, 1996, 2005 by Don Lancaster and Synergetics, Box 809, % Thatcher Arizona, 5552 (928) 428-4073 don@tinaja.com support % via http://www.tinaja.com All commercial rights and all electronic % media rights **FULLY** reserved. Reposting is expressly forbidden. % ======== /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def % guru % optionally activate gonzo utilities % ========= % gonzo excerpts /mt {moveto} store /black {0 setgray} store % timing utilities. use stopwatchon and stopwatchoff for simple % one shot timing. For multiple time totals, use resettimer % starttimer stoptimer ... starttimer stoptimer reporttimer /stopwatchoff {stoptimer reporttimer} def % for single shots /stopwatchon {resettimer starttimer} def % for single shots /reporttimer {mytime 1000 div (\nElapsed time: ) print 20 string cvs print ( seconds.\n) print flush} def % to host /resettimer {/mytime 0 def} def % reset timer /starttimer {usertime /mytimenow exch def} def % add to time so far /stoptimer {usertime mytimenow sub /mytime exch mytime add def} def % for multiple timing intervals % mergestr merges the two top stack strings into one top stack string /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def % [yourarray] makestring converts an array to a string... /makestring {dup length string dup % new string of right size /NullEncode filter % make a file out of string 3 -1 roll {1 index exch write} forall pop } def /random {rand 65536 div 32768 div mul cvi} def % as in -- 6 random -- %%%%%%%%% end gonzo excerpts /padprint {/hominy exch store dup length hominy exch sub exch print { ( ) print} repeat } store /totlen 0 store /pi 3.1415926 store /curlen 0 store /curdia india store (\n\n\n) print (turn # diameter length in inches length in feet\n) print /curcum india pi mul store 0 1 turns { /curturn exch store (\n) ( ) print curturn 10 lt {( ) mergestr } if % pretty print curturn 100 lt {( ) mergestr } if curturn 20 string cvs mergestr 15 padprint % the current turn number curdia 20 string cvs 15 padprint % the current turn diameter /curcum curdia pi mul store curcum 20 string cvs 15 padprint % the current turn circumference in inches totlen 12 div 20 string cvs 15 padprint % total accumulated length in feet /totlen totlen curcum add store /curdia curdia thick add store } for (\n\n\n) print % EOF