%! % Revised fattail utilities Gurugram #124 New Series % ============================================================== % Copyright c 2018 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 % Linking welcome. Reposting expressly forbidden. % All commercial rights and all electronic media rights ~fully~ reserved. % Linking usually welcome. Reposting expressly forbidden. Version 1.1 % This is a revision of the fattail utilities of GuruGram 117. The new code is more % compact, relative for all but the tips, offset oriented, and includes optional controls % and web friendly color access. The Gonzo Utilities are not needed for the basic % fattail code but remain extremely useful for demos and general fattail apps % Gonzo utilities per % Gonzo tutorial per % much of the following code is retained for future GuruGram use and is not % specifically necessary for this particular GuruGram. %%%%%%%%% % This comment is a reminder that Distiller needs an //acrodist.exe /F to use disk files %%%%%%%%% % Define and alter your full gonzo.ps path reminder here It might be % C:/Users/don/Desktop/Dist-FR/gonzo.ps % Preplace gonzo.ps from http://www.tinaja.com/post01.shtml#gonzo to above directory % Make sure there are no previously active instances of distiller. % Then run distiller ONLY from % //acrodist.exe /F run % Then drag and drop this file into Distiller. %%%%%%%%% % Set Directory Headers %%%%%%%% % /gonzodirectory (C:/Users/Don/Desktop/Ghost/gonzo.psl) run % use internal ) store % dbl rvse slashes for ps /imagelocaldirectory (C:/Users/don/Desktop/canal/images/) store % sin fwd slashes for win /imageremotedirectory (http://www.tinaja.com/canal/images/) store % sin fwd slashes for chrome % 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 %%%%%%%%% % This code activates gonzo utilities for this document %%%%%%%%% % Required preload of gonzo.ps and adjusted for your machine per above. % gonzodirectory (gonzo.ps) mergestr run % double reverse slashes in PS! (C:/Users/Don/Desktop/Ghost/gonzo.psl) run /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def guru % activate gonzo utilities %%%%%%%%%% % This code locks pdfmark commands out of a PostScript printer. %%%%%%%%%% /pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse %%%%%%%%%% % This code changes the page size to smaller %%%%%%%%%% [/CropBox [0 0 520 620] % set the weird size in points X Y. /PAGES pdfmark %%%%%%%%%% % This code is needed for the automatic url placer %%%%%%%%%% % Requires a defined name for the url below % Activate with text text |/surl urlname |/eurl text text % /surl "start url" marks the beginning of a text sequence to be urled. % It also paints the text blue... /surl {mark /blue cvx 0.33 /setgray cvx % change text to blue /currentpoint cvx % remember box start /urly /exch cvx /store cvx /urlx /exch cvx /store cvx ] cvx % complete deferred command printlist exch 3 index exch put % stuff into gonzo printlist exch 1 add exch % increment gonzo list count } def % /eurl "end url" unmarks the end of a text sequence and sets up % the pdfmark needed to define the Acrobat web link. /eurl {mark % start deferred proc exch % position url string % /black cvx 0 /setgray cvx % turn blue marker off % maintextcolor /setrgbcolor cvx % reset to main text color??? /aqua cvx /black cvx /makeurl cvx % defer call of url builder ] cvx % complete deferred proc printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } def % /makeurl generates the pdfmark, receiving a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /urlover 0.2 def % fraction of hot area over bounds /makeurl { /cururlname exch store % save the url string mark % start pdfmark currentfont /ScaleMatrix get 3 get /fsize exch store % guess height /Rect [ urlx fsize urlover mul sub % set box left x urly fsize urlover mul sub % set box left y currentpoint exch fsize urlover mul add exch fsize add ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def % /makeurlx generates the box specific pdfmark, receiving % a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /makeurlx { /cururlnamex exch store % save the url string mark % start pdfmark /Rect [ xpos % set box left x ypos 0.9 sub % set box left y xpos 2.8 add % box right x ypos 0.9 sub 2.8 add % box right y ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def %%%%%%%%%% % This code changes the page size to smaller %%%%%%%%%% [/CropBox [0 0 520 620] % set the weird size in points X Y. /PAGES pdfmark %%%%%%%%%%% % This code inserts color effects mid line %%%%%%%%%% %%%%%%%%%%%%%% COMPACT VERSION OF COLORIZER II %%%%%%%%%%%%%%%%%%%%%% /settint {dup /currenttint exch store 5.999 mul dup floor cvi /&cbar exch store dup floor sub /&cwt exch store [ {/setgray [ /dup cvx 0.3 &cwt 0.59 mul add /ge cvx [1 /exch cvx &cwt 0.59 mul 0.30 add /sub cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx ] cvx [ &cwt 0.59 mul 0.3 add /div cvx /dup cvx &cwt /mul cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub 0.3 mul add /ge cvx [1 &cwt sub 0.3 mul 0.59 add /sub cvx &cwt 0.3 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx /exch cvx 1 /exch cvx] cvx [1 &cwt sub 0.3 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 &cwt 0.11 mul add /ge cvx [&cwt 0.11 mul 0.59 add /sub cvx 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx 1 /exch cvx] cvx [0 /exch cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub mul 0.11 add /ge cvx [1 &cwt sub 0.59 mul 0.11 add /sub cvx &cwt 0.59 mul 0.30 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx 1] cvx [0 /exch cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.11 &cwt 0.30 mul add /ge cvx[&cwt 0.30 mul 0.11 add /sub cvx 1 &cwt sub 0.30 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx 1] cvx [ &cwt 0.30 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx /exch cvx 0 /exch cvx ] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} {/setgray [ /dup cvx 0.30 1 &cwt sub 0.11 mul add /ge cvx[ 1 /exch cvx 1 &cwt sub 0.11 mul 0.30 add /sub cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx ] cvx [ 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx 0 /exch cvx] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} ] &cbar get exec exec} bind def /beige {0.11 settint} def % examples of convenience operators /aqua {0.52 settint} def /blue {0.67 settint} def /lime {0.44 settint} def %%%%%%%%%%% % This code converts a .JPG image into a PS image %%%%%%%%%%% /jpegimageprocwithlink { % hoffset voffset hres vres urlfrom urlto save /snap2 exch def /inurllink exch store % grab link filename /infilename exch store % grab passed pix file /photoscale exch store /vpixels exch store /hpixels exch store % (\nvpixels = )print vpixels == % (\nhpixels = )print hpixels == % (\photoscale = ) print photoscale == % (\ninurllink = ) print inurllink == % (\ninfilemane = ) print infilename == translate % adjust position for final figure ??? inurllink setareaurl % autolink sizing /DeviceRGB setcolorspace % pick color model 0 0 translate % set page position hpixels vpixels scale % magnify unit square photoscale dup scale /infile infilename (r) file def % establish input read file /Data {infile /DCTDecode filter} def % define a data source << % start image dicationary /ImageType 1 % always one /Width hpixels % JPEG width in pixels /Height vpixels % JPEG height in pixels /ImageMatrix [hpixels 0 0 vpixels neg 0 vpixels ] /DataSource Data % proc to get filtered JPEG /BitsPerComponent 8 % color resolution /Decode [0 1 0 1 0 1] % per red book 4.10 >> image % call the image operator ypos snap2 restore /ypos exch def } def /setareaurl { % for auto include routine /cururlname exch store mark % start pdfmark /Rect [ 0 0 hpixels photoscale mul vpixels photoscale mul ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def %%%%%%%%%%% % This code inserts a PS figure proc into a fixed location %%%%%%%%%%% %%%%%%%%%%% % This code autopositions a PS figure proc %%%%%%%%%%% %%%%%%%%%%% % This image code for sequential pages %%%%%%%%%%% /startnewpage { black beige 0.35 setgray 21 -2.5 (|3\320|j|j) ggnum 40 string cvs mergestr (|j |j) mergestr pagenum 10 string cvs mergestr (|j|j\320) mergestr cc aqua showpage %% start next page /pagenum pagenum 1 add store 30 setwebtint 50 50 10 setgrid % create grid setpagefonts font1 textleft texttop } def %%%%%%%%%%% % These code snippets do various things %%%%%%%%%%% /tinton1 {mark 0.33 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tintoff {mark 0 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /to {tinton1 aqua font6} store /tx {tintoff black font1} store /su {surl} store /webtintmat [ 0 1 5 {/a exch store 0 1 5 % webtint color array {/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 % set 215 colors exch 3 mul 3 getinterval aload pop setrgbcolor} def /makered { mark 5 /setwebtint cvx ] cvx printlist exch 3 index exch put exch 1 add exch } store /makeblack { mark 0 /setwebtint cvx ] cvx printlist exch 3 index exch put exch 1 add exch } store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% document specific resources start here %%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%% % define url's to be generated ... ---> zzzzz <---- search marker %%%%%%%%% << %%% these have been redefined below all should now be 1fn or higher rather than fn1. /gilariver (https://en.wikipedia.org/wiki/Gila_River) /discoveryfn1 (http://www.tinaja.com/canal/field_notes/discoveryfn1.pdf) /ownership (http://gis.azland.gov/webapps/parcel/?loc=-109.7461,32.8033,12&layers=2,1,0) /goatfn1 (http://www.tinaja.com/canal/field_notes/goatfn1.pdf) /ledfordfn1 (http://www.tinaja.com/canal/field_notes/ledfordfn1.pdf) /marijildafn1 (http://www.tinaja.com/canal/field_notes/marijildafn1.pdf) /roperfn1 (http://www.tinaja.com/canal/field_notes/roperfn1.pdf) /kmlx (http://www.tinaja.com/canal/mapimage2.kml) /tbwestfn1 (http://www.tinaja.com/canal/field_notes/tbwestn1.pdf) /lowerfryeconstructfn1 (http://www.tinaja.com/canal/field_notes/lowerfryeconstructfn1.pdf) /deadmanfn1 (http://www.tinaja.com/canal/field_notes/deadmanfn1.pdf) /sandcanalfn1 (http://www.tinaja.com/canal/field_notes/sandcanalfn1.pdf) /fryecomplexfn1 (http://www.tinaja.com/canal/field_notes/fryecomplexfn1.pdf) /bluepondsfn1 (http://www.tinaja.com/canal/field_notes/bluepondsfn1.pdf) /hsfn1 (http://www.tinaja.com/canal/field_notes/hsfn1.pdf) /robinsonfn1 (http://www.tinaja.com/canal/field_notes/robinsonfn1.pdf) /allenfn1 (http://www.tinaja.com/canal/field_notes/allenfn1.pdf) /riggsmesafn1 (http://www.tinaja.com/canal/field_notes/riggsmesafn1.pdf) /golfcoursefn1 (http://www.tinaja.com/canal/field_notes/golfcoursefn1.pdf) /longviewfn1 (http://www.tinaja.com/canal/field_notes/longviewfn1.pdf) /freemanfn1 (http://www.tinaja.com/canal/field_notes/freemanfn1.pdf) /tranquilityfn1 (http://www.tinaja.com/canal/field_notes/tranquilityn1.pdf) /marijildafn1 (http://www.tinaja.com/canal/field_notes/marijildafn1.pdf) /mceniry (https://www.tinaja.com/glib/mtso.pdf) /allendamfail (http://www.tinaja.com/glib/allendam.pdf) /acme (http://www.mapper.acme.com/) /googleearth (https://www.google.com/earth/) /tranquility (http://www.azhotmineralspring.com/) /cottonclouds (http://www.cottonclouds.com/index.asp) /tbeastfn1 (http://www.tinaja.com/canal/field_notes/tbeastfn1.pdf) /mudspringsfn1 (http://www.tinaja.com/canal/field_notes/mudspringsfn1.pdf) /ockham (https://en.wikipedia.org/wiki/Occam%27s_razor) /blm (https://www.blm.gov/office/safford-field-office) /azstateland (https://land.az.gov) /anasazai (https://en.wikipedia.org/wiki/Ancient_Pueblo_peoples) /aqueduct (https://en.wikipedia.org/wiki/Aqueduct_(water_supply)) /AZrepublic (http://www.azcentral.com/news/articles/20130223arizona-hanging-canal-mystery.html) /bajada (https://en.wikipedia.org/wiki/Bajada_(geography)) /cnf (http://www.fs.usda.gov/coronado/) /association (https://en.wikipedia.org/wiki/Archaeological_association) /ccc (https://en.wikipedia.org/wiki/Civilian_Conservation_Corps) /glyphspair (http://www.tinaja.com/canal/cansum1.pdf) /grids (http://www.uapress.arizona.edu/Books/bid1582.htm) /gurgrm01 (http://www.tinaja.com/gurgrm01.shtml) /hohokam (https://en.wikipedia.org/wiki/Hohokam) /hunt (http://www.jstor.org/discover/10.2307/40035308?uid=3739552&uid=2&uid=4&uid=3739256&sid=21103435122901) /joanna (www.azcentral.com/opinions/articles/20130226editorial-admiring-our-forebears.html) /lefthand (http://www.tinaja.com/glib/lefthand.pdf) /maildon (mailto:don@tinaja.com) /mailneely (mailto:neelyja@utexas.edu) /mimbres (https://en.wikipedia.org/wiki/Mimbres_culture#Mimbres_culture) /mongollon (https://en.wikipedia.org/wiki/Mogollon_culture) /murphy (http://www.tinaja.com/glib/neely1.pdf) /newhang3 (http://www.tinaja.com/canal/newhang3.pdf) /tinsamp1 (http://www.tinaja.com/tinsamp1.shtml) /newhangshow3 (http://www.tinaja.com/canal/newhangshow3.pdf) /pinalino (https://en.wikipedia.org/wiki/Pinale%C3%B1o_Mountains) /prebajada (http://www.tinaja.com/glib/prebajada.pdf) /safford (https://en.wikipedia.org/wiki/Safford,_Arizona) /salado (https://en.wikipedia.org/wiki/Salado_culture) /scs (https://en.wikipedia.org/wiki/Natural_Resources_Conservation_Service) /stratigraphy (https://en.wikipedia.org/wiki/Stratigraphy) /tinaja (http://www.tinaja.com) /usatoday (http://www.usatoday.com/story/news/nation/2013/02/24/hanging-canals-whet-appetite-for-ancient-history/1941797) /waterlevel (http://en.wikipedia.org/wiki/Water_level) /whtnu15 (http://www.tinaja.com/whtnu15.shtml) /whtnu17 (http://www.tinaja.com/whtnu17.shtml) >> {mark exch /eurl cvx ] cvx def} forall %%%%%%%%%% % define fonts and main document gonzo params %%%%%%%%%% /setpagefonts { /cstretch 0.015 def /sstretch 0.015 def /font0 /StoneSans-Bold 1.6 gonzofont /font1 /StoneSans 0.95 gonzofont /font2 /StoneSans [0.95 0 0.25 0.95 0 0 ] gonzofont /font4 /StoneSans 0.85 gonzofont /font3 /StoneSans-Bold 0.85 gonzofont /font6 /StoneSans-Bold 0.85 gonzofont /font7 /StoneSans-Bold 1.05 gonzofont % subheaders /font8 /StoneSans-Bold [0.65 0 0 0.65 0 0.4] gonzofont /font9 /StoneSans-Bold 1.05 gonzofont /txtwide 36 store /yinc 1.2 store /kern 0.1 store /texttop 51 store /textleft 3 store /amacro {(zy0) stringmacro /ypos ypos ypara add def} def % start drop cap /bmacro {(iFy1) stringmacro /ypos ypos ypara add def} def % finish drop cap } store /nogrid {true} store /ggnum (Tugood Canal Field Notes (rev 1)) store % header for pagenumber /pagenum 1 def % initial pagenumber %%%%%%%%%%%%%% % Image common code for sequential pages %%%%%%%%%%%%%% /imagecommoncode { /font6 /StoneSans [2.4 0 0 2.8 0 0 ] gonzofont /font7 /StoneSans 1.2 gonzofont /green { 0 0.4 0 setrgbcolor} store /black { 0 0 0 setrgbcolor } store % text image link [ /Rect [2.0 42.2 39 44.2] /Action << /Subtype /URI /URI imageurl >> /Border [0 0 0] /Color [1 1 1] /Subtype /Link /ANN pdfmark % gps image link [ /Rect [2.0 40.1 39 42.1] /Action << /Subtype /URI /URI acmegpsurl >> /Border [0 0 0] /Color [1 1 1] /Subtype /Link /ANN pdfmark % image image link [ /Rect [2 13.7 39 38.6] /Action << /Subtype /URI /URI imageurl >> /Border [0 0 0] /Color [1 1 1] /Subtype /Link /ANN pdfmark /blue {0 0 1 setrgbcolor} store % not sure why these are needed here /setblue {mark 0 0 1 /setrgbcolor cvx ] cvx printlist exch 3 index exch put exch 1 add exch} store /setblack {mark 0 0 0 /setrgbcolor cvx ] cvx printlist exch 3 index exch put exch 1 add exch} store 0 47.5 (|6|/green ) imagename mergestr cl 0 45 (|7|/green ) imagetitle mergestr cl blue 3 42.8 (|7|/setblue ) imageurl mergestr cl 3 40.6 (|7|/setblue ) imagegps mergestr cl black } store %%% Page Navigation Utilities %%%% % requires gonzo utilities from http://www.tinaja.com/gonzo.psl /kern 0.1 store /navpagenum 1 store /prevpage 1 store /lastpage false store /baux { save /ssnap exch store /sym exch store translate 0 0 mt 2 pu 2 pr 2 pd closepath gsave 0.94 0.94 0.98 setrgbcolor fill grestore 0.8 dup dup setrgbcolor line2 stroke 0.5 dup dup setrgbcolor /font1 /Helvetica 1.5 gonzofont font1 1 0.5 sym cc ssnap restore} store black /glyphnext { 53 (>) baux } store /glyphprev {53 (<) baux } store /glyphone { 53 (1) baux} store /glyphback {53 (<|k|k|k<) baux} store /aaaa { [ /Rect [0 53 2 55] /Page/Next /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /bbbb { [ /Rect [0 53 2 55] /Page /Prev /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page 1 /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [5 53 7 55] /Page/Next /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [7.5 53 9.5 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /cccc { [ /Rect [0 53 2 55] /Page /Prev /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [2.5 53 4.5 55] /Page 1 /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark [ /Rect [5 53 7 55] /Page prevpage /View [/XYZ null null null] /Border [0 0 0 ] /Subtype /Link /ANN pdfmark } store /addpagenav { navpagenum 1 eq { 0 glyphnext 2.5 glyphback aaaa} if navpagenum 1 ne lastpage not and {0 glyphprev 2.5 glyphone 5 glyphnext 7.5 glyphback bbbb} if lastpage {0 glyphprev 2.5 glyphone 5 glyphback cccc} if /prevpage pagenum store /navpagenum navpagenum 1 add store} store % ///////// (A) WEB FRIENDLY COLOR UTILITIES ///////////// % tintmat is a self-generating list of 216 triple color values /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 accepts a color number 0 to 215 and then % sets the PostScript color generator for later use... /setwebtint { abs cvi 216 cvi mod % restrict range webtintmat exch 3 mul 3 getinterval % get values from table aload pop setrgbcolor} def % and set them %%%%%%%%%%%%%%%% begin kml experiment %%%%%%%%%%%%%%%%%%%%%%%%%%% % this still needs a way for Chrome to go directly to Google Earth. % presently opens kml textfile instead. Chrome extensions not helping. % presently usable with this manual workaround: Do a save as from the % clicked kml text. Then click on the saved kml file. /clickforkml { true { save /ksnap exch store 34 53 translate 0 0 mt 2 pu 7.2 pr 2 pd closepath gsave 0.94 0.94 0.98 setrgbcolor fill grestore 0.8 0.8 0.8 setrgbcolor line2 stroke 0.6 0.6 (|6|/surl Click for KML |/kmlx ) cl ksnap restore } if } store % end kml link %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% actual page content starts here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% % notebox uses modified roundpath %%%%%%%%%%%%% /notebox { % hpos vpos hsize vsize corrad titsize title body save /boxsnap exch store /body exch store /title exch store /titsize exch store /corrad exch store /hsize exch store /vsize exch store translate hsize 2 div 0 moveto 0 0 0 vsize corrad arct 0 vsize hsize vsize corrad arct hsize vsize hsize 0 corrad arct hsize 0 0 0 corrad arct closepath gsave 141 setwebtint fill grestore 54 pop 48 setwebtint line3 stroke hsize 2 div vsize titsize sub moveto 0 vsize titsize sub lineto 0 vsize hsize vsize corrad arct hsize vsize hsize vsize titsize sub corrad arct hsize vsize titsize sub lineto closepath 54 pop 48 setwebtint fill white font3 hsize 2 div vsize 1.5 sub title cc 1 2 3 4 black font3 hsize 2 div vsize titsize sub 1.5 sub body cc boxsnap restore } store %%% retained samples of map link and photo link /imageurl (http://mapper.acme.com/?ll=32.80914,-109.87128&z=15&t=H&marker0=32.80908%2C-109.87122%2C11.4%20km%20WxSW%20of%20Thatcher%20AZ&marker1=32.81222%2C-109.87053%2C10.2%20km%20SxSW%20of%20Pima%20AZ&marker2=32.81434%2C-109.86932%2C9.9%20km%20SxSW%20of%20Pima%20AZ&marker3=32.81715%2C-109.86763%2C9.6%20km%20SxSW%20of%20Pima%20AZ&marker4=32.81987%2C-109.86670%2C9.3%20km%20SxSW%20of%20Pima%20AZ&marker5=32.81805%2C-109.86694%2C9.5%20km%20SxSW%20of%20Pima%20AZ&marker6=32.81162%2C-109.87075%2C10.3%20km%20SxSW%20of%20Pima%20AZ&marker7=32.80267%2C-109.87311%2C11.3%20km%20SxSW%20of%20Pima%20AZ&marker8=32.80169%2C-109.87352%2C11.1%20km%20N%20of%20Mount%20Graham%20AZ&marker9=32.80101%2C-109.87374%2C11.1%20km%20N%20of%20Mount%20Graham%20AZ&marker10=32.80006%2C-109.87454%2C11.0%20km%20N%20of%20Mount%20Graham%20AZ&marker11=32.79884%2C-109.87523%2C10.8%20km%20N%20of%20Mount%20Graham%20AZ&marker12=32.79651%2C-109.87776%2C10.6%20km%20N%20of%20Mount%20Graham%20AZ) store % goto remote image /imagelocalsource imagelocaldirectory (tugood_map.jpg) mergestr store % comes from local file { gsave 8.3 5.7 % page translate ( data for jpegimageprocwithlink ) 859 864 % hpixels and vpixels 0.1 0.28 mul % photoscale imagelocalsource % local jpg source imageurl % image url on clickthru jpegimageprocwithlink grestore } pop % bot image { /imageurl imageremotedirectory (/tugood2a.jpg) mergestr store % goto remote image /imagelocalsource imagelocaldirectory (tugood2a.jpg) mergestr store % comes from local file 5 3.5 (|/to |9TUGOOD2a \261 |/tx A second Tugood Canal view seen from the initial discovery area. Portions are somewhat over a meter wide. Flat terrain in light brush permitted low energy constructs with no hanging portions or deep cuts yet known. The view is to the north near |/to N 32.81812 W 109.86716|/tx . ) cl 11 6 % page translate ( data for jpegimageprocwithlink ) 996 786 % hpixels and vpixels 0.1 0.25 mul % photoscale imagelocalsource % local jpg source imageurl % image url on clickthru jpegimageprocwithlink } pop %% oktohere % retained page sampler with nav % addpagenav % clickforkml % only for canal! % startnewpage /setred {mark 1 0 0 /setrgbcolor cvx ] cvx printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } store /setblack { mark 0 0 0 /setrgbcolor cvx ] cvx printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } store /kern 0.1 store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /ggnum (New fattail utilities) store /brownify {black beige 0.35 setgray} store %%%%%%%%%%%%%% % first page %%%%%%%% %%%%%%%%%%%%%% /tabs [1.5 3.2] store 50 50 10 setgrid false {40 160 showgrid} if setpagefonts beige % really a colorizer green? % special directories for canals omitted here but in tugoodcan1fn.psl etc... % specific directory for this file here... << /ggsamp1 (https://www.tinaja.com/ggsamp1.shtml) /muse112 (https://www.tinaja.com/glib/muse112.pdf) /muse113 (https://www.tinaja.com/glib/muse113.pdf) /pseudo01 (https://www.tinaja.com/pseudo01.shtml) /patnt01 (https://www.tinaja.com/patnt01.shtml) /fourpaw (https://www.tinaja.com/whtnu17.shtml#d11.14.17) /notwrong (https://en.wikipedia.org/wiki/Not_even_wrong) /pffix (https://www.schneider-electric.com.tw/documents/Event/2016_electrical_engineering_seminar/IEEE_STD_519_1992vs2014.pdf) /bogus (https://www.tinaja.com/glib/magic_lamp_bogus.pdf) /blatblog (https://www.tinaja.com/whtnu17.shtml#d10.11.17) /muse125 (https://www.tinaja.com/glib/muse125.pdf) /color6 (http://www.americanradiohistory.com/Archive-Radio-News/50s/Radio-News-1957-10-R.pdf) /bulblife (http://www.lamptech.co.uk/Images/Illustrations/IN%20Nomograph.jpg) /mjorig (https://www.youtube.com/watch?v=ZUno-5FO7NU) /pseudo (https://www.tinaja.com/psusamp1.shtml) /magsn (https://www.tinaja.com/mssamp1.shtml) /ebay (https://www.ebay.com/sch/abeja/m.html?_nkw=&_armrs=1&_from=&_ipg=25&_trksid=p2047675) /fpxx (http://www.dictionary.com/browse/faux-pas) /fourpaw (http://www.dictionary.com/browse/faux-pas) /electfant (https://www.tinaja.com/h2gas01.shtml) /marcia (https://www.tinaja.com/glib/marcia.pdf) /bagweed (https://www.youtube.com/watch?v=NpS4ebEtLUE) /bruno (https://www.tinaja.com/whtnu16.shtml#d09.30.16) /nmex (https://www.tinaja.com/whtnu16.shtml#d08.05.16) /maildon (mailto:don@tinaja.com) /yogi (http://en.wikipedia.org/wiki/Yogi_Berra) /abbey (http://www.tinaja.com/books/bkabbey.asp) /marcia (https://www.tinaja.com/glib/marcia.pdf) /puns (https://www.tinaja.com/whtnu16.shtml#d07.24.16) /brian (https://www.youtube.com/watch?v=NpS4ebEtLUE) % added for GG124 fattail rev /ebooksamp (https://www.tinaja.com/ebksamp1.shtml) /fattail.psl (http://www.tinaja.com/psutils/fattail.psl) /level12.pdf (http://www.tinaja.com/glib/level2.pdf) /gonzotut.pdf (http://www.tinaja.com/glib/gonzotut.pdf) /postsamp (https://www.tinaja.com/pssamp1.shtml) /cubemath.pdf (http://www.tinaja.com/glib/cubemath.pdf) /distlang.pdf (http://www.tinaja.com/glib/distlang.pdf) /ggsamp1 (https://www.tinaja.com/ggsamp1.shtml) /pssamp (https://www.tinaja.com/pssamp1.shtml) /info01 (https://www.tinaja.com/info01.shtml) /oldfatpdf (https://www.tinaja.com/glib/fattail.pdf) /oldfatpsl (https://www.tinaja.com/glib/fattail.psl) /oldfatutil (https://www.tinaja.com/psutils/fattail1.psl) /newfatpdf (https://www.tinaja.com/glib/fattail2.pdf) /newfatpsl (https://www.tinaja.com/glib/fattail2.psl) /newfatutil (https://www.tinaja.com/psutils/fattailutil2.psl) /pssamp (https://www.tinaja.com/pssamp1.shtml) /ggsamp (https://www.tinaja.com/ggsamp1.shtml) /webcolor (https://www.tinaja.com/psutils/webcolor.pdf) /dcmicro1 (https://www.tinaja.com/glib/demlev2r.pdf) >> {mark exch /eurl cvx ] cvx def} forall /tabs [8 11] store /cmacro {aqua 0.25 setgray (znhL7) stringmacro} store /dmacro {black (pL1hz) stringmacro } store /autofig2 { /figadvance 12 store save /snap2 exch store xpos 2 add ypos figadvance sub translate figure2.118 snap2 restore /ypos ypos figadvance sub yinc sub store } store %%%%%%%%%%%% extractable new fattaill utilities %%%%%%%%%%%%% % format tipx tipy arrlen tailoff tipthk tailthk tipsiz tipwid /mt {moveto} store % if not redundant /dot { currentpoint newpath 0.150 0 360 arc fill } def % if not redundant /grab {gsave aload pop /tipsiz exch store % collect data from input array /tipwid exch store /tailthk exch store /tipthk exch store /tailoff exch store /arrlen exch store /body arrlen tipsiz sub store tailoff 0 lt {/tailthk tailthk -1 mul store } if % always down on outside translate } store /showpoint {wantpoints {2 copy save /spsave exch store 5 setwebtint mt dot spsave restore} if} store /wantpoints true store /tailtension 2.5 pop 2 store % default = 2.5 /tiptension 1.5 pop 2 store % default =1.5 use 0.2 for twist! /strarrow { rotate 0 0 mt tipwid 2 div neg tipsiz neg rlineto % draw the point tipwid 0 rlineto closepath fill tipthk 2 div tailoff 0 lt {neg} if % repair negative offset tipsiz neg showpoint mt % position arrow right tipthk 2 div tailoff 0 lt {neg} if % repair negative offset body tiptension div tipsiz add neg showpoint % control 1 tailoff tailthk 2 div add arrlen neg body tailtension div add showpoint % control 2 tailoff tailthk 2 div add arrlen neg showpoint % tail right dest curveto tailthk neg 0 rlineto % tail bottom wantpoints {currentpoint showpoint} if tailoff tailthk 2 div sub arrlen neg body tailtension div add showpoint % control 3 tipthk 2 div neg tailoff 0 lt {neg} if % repair negative offset body tiptension div neg tipsiz sub showpoint % control 4 tipthk 2 div neg tailoff 0 lt {neg} if % repair negative offset tipsiz neg showpoint curveto % position arrow left fill grestore} store % fill arrow body /rtarrow { rotate 0 0 mt tipwid 2 div neg tipsiz neg rlineto % draw the point tipwid 0 rlineto closepath fill tipthk 2 div tipsiz neg showpoint mt % position arrow right tipthk 2 div arrlen tiptension div tipsiz add neg showpoint % control 1 arrlen neg arrlen tiptension div add tailoff tailthk 2 div add neg showpoint % control 2 arrlen neg tailoff tailthk 2 div add neg showpoint % tail lower destt curveto 0 tailthk rlineto wantpoints {currentpoint showpoint} if % tail top dest arrlen neg arrlen tiptension div add tailoff tailthk 2 div sub neg showpoint % control 3 tipthk 2 div neg arrlen tiptension div tipsiz add neg showpoint % control 4 tipthk 2 div neg tipsiz neg showpoint % position arrow left curveto fill grestore} store % fill arrow body % points /ftailsn {grab 0 strarrow} store /ftailew {grab 90 strarrow} store /ftailns {grab -1 1 scale 180 strarrow} store /ftailwe{grab 1 -1 scale -90 strarrow} store /rtailwn {grab 0 rtarrow} store /rtailen {grab -1 1 scale 0 rtarrow} store /rtailws {grab -1 1 scale 180 rtarrow} store /rtailes {grab 180 rtarrow} store /rtailne {grab -90 rtarrow} store /rtailsw {grab 90 rtarrow} store /rtailse {grab -1 1 scale 90 rtarrow} store /rtailnw {grab -1 1 scale -90 rtarrow} store %%%%%%%%%%%%%%%%% figures start here %%%%%%%%%%%% /figure2.124 {gsave 0 0 translate % format tipx tipy arrlen tailoff tipthk tailthk tipsiz tipwid 0 0 mt 39 pr 12 pu 39 pl closepath 213 setwebtint fill black 39 12 showgrid black 192 setwebtint [ 13 1 9 4 1 4 2 1 ] ftailns % ns, positive offset 92 setwebtint [ 16 1 9 -4 1 4 2 1 ] ftailns % ns, negative offset 53 setwebtint [ 23 10 9 4 1 4 2 1 ] ftailsn % sn positive offset 96 setwebtint [ 26 10 9 -4 1 4 2 1 ] ftailsn % sn negative offset 143 setwebtint [ 1 4 8 4 1 4 2 1 ] ftailew % ew positive offset 196 setwebtint [ 1 7 8 -4 1 4 2 1 ] ftailew % ew negative offset 22 setwebtint [ 38 4 8 4 1 4 2 1 ] ftailwe % ew positive offset 129 setwebtint [ 38 7 8 -4 1 4 2 1 ] ftailwe % ew negative offset font9 86 setwebtint 2 8.5 (EW-) cc 7.2 10.5 (EW+) cc 12.0 10.5 (NS-) cc 17 10.5 (NS+) cc 23 10.5 (SN-) cc 26 10.5 (SN+) cc 32 10.5 (WE+) cc 37 8.5 (WE-) cc grestore } store /figure3.124 {gsave 0 0 translate % format tipx tipy arrlen tailoff tipthk tailthk tipwid tipsiz 0 0 mt 32 pr 13 pu 32 pl closepath 213 setwebtint fill black 32 13 showgrid black 192 setwebtint [ 7 12 5 3 1 4 2 1 ] rtailwn % nw, positive offset 129 setwebtint [ 7 1 5 3 1 4 2 1 ] rtailws % ws, positive offset 22 setwebtint [ 10 12 5 3 1 4 2 1 ] rtailen % en, positive offset 196 setwebtint [ 10 1 5 3 1 4 2 1 ] rtailes % es, positive offset 92 setwebtint [24 8 4 4 1 4 2 1 ] rtailnw % nw, positive offset 53 setwebtint [24 5 4 4 1 4 2 1 ] rtailsw % sw positive offset 143 setwebtint [23 5 4 4 1 4 2 1 ] rtailse % sw positive offset 165 setwebtint [23 8 4 4 1 4 2 1 ] rtailne % sw positive offset font9 86 setwebtint 4.5 0.7 (WS+) cc 4.5 11.3 (WN+) cc 12.5 0.7 (ES+) cc 12.5 11.3 (EN+) cc 18 4.5 (SE+) cc 18 8 (NE+) cc 29.5 4.5 (SW+) cc 29.5 8 (NW+) cc grestore } store /figure4.124 { 0 0 mt 10 pr 10 pu 10 pl closepath 213 setwebtint fill black 10 10 showgrid 92 setwebtint % format tipx tipy arrlen tailoff tipthk tailthk tipsiz tipwid [3 5 3 4 0.8 2.5 0 0 ] ftailsn [ 6 7 2 3 0.8 0.8 3 1 ] rtailse } store %%%%%%%%% /figure1.124 { gsave 0 0 translate 0 0 mt 30 pr 22 pu 30 pl closepath 213 setwebtint fill black 30 setwebtint 30 22 showgrid black % format tipx tipy arrlen tailoff tipthk tailthk tipwd tipsiz 196 setwebtint 12345 srand /cx {215 rand setwebtint} store cx [ 6 2 3 3.5 1 2 3 1 ] rtailne cx [2 9 8 3 1 4 3 1 ] ftailns cx [10 17 13 -3.5 1 4 3 1] ftailsn cx [1 19.5 2.5 14 1 3 3 1] rtailsw cx [19 15 10 4.5 1 2 3 1] rtailes cx [16 15 5 -2.5 1 3 3 1] ftailwe cx [9 2 5 8 1 4 3 1 ] ftailew cx [ 13 2 4 4 1 3 3 1]rtailnw cx [ 25 7 3 3 1 2 3 1 ] rtailen cx [ 24 12 5 9 1 3 3 1 ] rtailwn cx [ 22 14 7 5 1 4 3 1 ] rtailse cx [ 28 10 5 4 1 3 3 1 ] rtailws } store /figure1.118 {} store % used for early degub /figure2.118 {} store % used for early degub %%%%%%%%%%%% page content starts here %%%%%%%%%%%%%% /ggray {60 0 {eq {1}{0} ifelse} setscreen 205 setwebtint } def % ancient-- needed web color update save /snarf exch store gsave 8.5 10.7 translate 0.8 dup scale /wantpoints false store figure1.124 grestore snarf restore /tabs [10] store 20 48.3 0.7 add % 1 sub (|/to |0Some|j New |j"Fat Tail")cc 20 46.3 0.7 add % 1 sub (|/to |0Arrow |jUtilities) cc black font1 textleft 44.3 (|/to |6Don Lancaster|/tx Synergetics, Box 809, Thatcher, AZ 85552 copyright c2017 repub 12/17 as |/surl |6GuruGram #123|/ggsamp1 |1 All rights reserved. |/surl |6http://www.tinaja.com|/tinaja |/surl don@tinaja.com|1|/maildon |/to (928) 428-4073|/tx |8 |/to |0P|/tx |1|kresented here is an improved version of our |/to Fat Tail Utilities|/tx that were found in |/surl |6GuruGram #117|/ggsamp |1. Original files remain |/surl |6here|/oldfatpdf |1 as .pdf; |/surl |6here|/oldfatpsl |1 as .psl sourcecode, and |/surl |6here|/oldfatutil |1as extractable |/surl |6PostScript|/pssamp |1 And the corresponding latest files are found |/surl |6here|/newfatpdf , |/surl |6here|/newfatpsl |1, and |/surl |6here|/newfatutil |1. |h Here's a group portrait for most of the new candidates\274 As before, the method is based on using single "fairly weak" |/su |6cubic splines|1|/cubemath.pdf for the sides and straight line segments for the ends. It turns out there might be |/to twenty|/tx possible arrangements of end orientations for fat tailed arrows of this type. Twelve of these are |/to straight arrows|/tx of chosen positive, zero, and negative tail offsets. An additional eight are |/to right arrows|/tx , which are always assumed to have positive or "absolute" offsets. |h Now included are much shorter files, relative data values for all but the head tips, newly being offset oriented, optional control point plots for debugging, and full |j ) cl addpagenav % clickforkml % (canal stuff only) startnewpage black /burple {190 setwebtint} store textleft 51 (|1|h |/surl |6web friendly|/webcolor |1 color access. The tip and tail tensions are newly adjustable for any unusual needs. The |/su |6Gonzo Utilities|/gonzotut.pdf |1 are not needed for the new code but remain extremely useful for demos and general fattail apps. In the demos, our gridding has been "web friendly" upgraded as well. |h It is our custom to normally work at a 10X magnification as this makes data values less cumbersome and discourages excess precision. |h In updating some of our |/su |6eBooks|1|/ebooksamp to |/su |6Level II|/level12.pdf |1, I decided I needed a fairly simple way to programatically create and enter these arrows. One older but detailed fattail demo appears |/su |6here|/dcmicro1 |1. |h The |/surl |6new arrow sourcecode|/newfatpsl |1 is easily extracted and inserted into your |/su |6PostScript|/newfatpsl |1 textfile routine . It can then be sent to Acrobat Distiller or GhostScript to create your final .PDF file. But note a secret gotcha: |/to Distiller arrives from the factory |/to with most disk access locked|/tx . If you are using our |/su |6Gonzo Utilities|/gonzotut.pdf |1 or otherwise want disk access, always run Distiller |/to from the command line|/tx using the magic and top secret |/to //acrodist /F|/tx |1 incantation. |h Each fattail arrow command consists of an eight element array followed by a "cardinal" key using this format\274 |h |/burple |3 [ tipx tipy arrlen tailoff tipthk tailthk tipwd tipsiz ] fatcommand |h |/black |/black |1And here are the actual commands used in the above demo\274 |h|3|/burple |t [ 6 2 3 3.5 1 2 3 1 ] rtailne |h |t [ 2 9 8 3 1 4 3 1 ] ftailns |h |t [10 17 13 -3.5 1 4 3 1 ] ftailsn |h |t [1 19.5 2.5 14 1 3 3 1 ] rtailsw |h |t [19 15 10 4.5 1 2 3 1 ] rtailes |h |t [16 15 5 -2.5 1 3 3 1 ] ftailwe |h |t [ 9 2 5 8 1 4 3 1 ] ftailew |h |t [ 13 2 4 4 1 3 3 1 ] rtailnw |h |t [ 25 7 3 3 1 2 3 1 ] rtailen |h |t [ 24 12 5 9 1 3 3 1 ] rtailwn |h |t [ 22 14 7 5 1 4 3 1 ] rtailse |h |t [ 28 10 5 4 1 3 3 1 ] rtailws |h|/black |1 Here are the names and offsets of the "straight" fattail arrows. |/to The offset value |/to is positive if east, north, or zero|/tx . The offset is negative if south or west. The offset is the distance from the tip to the center of the tail\274 ) cl addpagenav % clickforkml % (canal stuff only) startnewpage save /snarf exch store 5 23 translate 1.02 1 scale /wantpoints true store figure3.124 grestore snarf restore save /snarf exch store gsave 5 41.5 translate 0.83 dup scale /wantpoints true store figure2.124 grestore snarf restore save /snarf exch store gsave 16 6 translate 1 dup scale /wantpoints true store figure4.124 grestore snarf restore textleft 41.5 (|h|1|/black |1Here are the names and offsets of the "right" fattail arrows. Note the offset is the distance from the tip to the center of the tail. Be sure to also note that |/to the right |/to arrows always spec their offset as a positive or "absolute" value|/tx \274 |c Getting |jFancy |d|/black A sneaky trick can greatly expand your fat arrow possibilities. One that lets you do arrows like this one\274 |h Note that we can make any arrowhead "disappear" by setting both |/to tipsiz|/tx and |/to tipwid|/tx to zero. So, what we have done above is place a "tipless" fattail arrow immediately |/to below|/tx a "regular" fattail arrow. Giving us two splines on each side. And greatly extending the possibilities of just where the tip is allowed to be with respect to the tail. The coding might look something like this\274 ) cl addpagenav % clickforkml % (canal stuff only) startnewpage /tabs [8] store textleft 51.5 (|h|1|/black |h |h|3|/burple |t[ 3 5 3 4 0.8 2.5 0 0 ] ftailsn |h |t[ 6 7 2 3 0.8 0.8 3 1 ] rtailse |h|/black |1 |c For |jMore |jHelp |d Additional examples and tutorials appear in our |/su |6GuruGram|1|/ggsamp1 and |/su |6PostScript|1|/postsamp libraries. Sourcecode for this GuruGram can be found |/su |6here|1|/newfatpsl . |h Seminars, training, |/su |6consulting|1|/info01 , and direct PostScript programming projects are available. You can |/su |6email me|1|/maildon or call (928) 428-4073 for more details. ) cl /lastpage true store addpagenav % clickforkml % (canal stuff only) startnewpage % EOF