%! (/home/pjb/ps/lib/colours.ps) run (/home/pjb/ps/lib/line_drawing.ps) run % measurements taken from pastel self-portrait /forehead { 272 mm 752 mm } def /eye { 325 mm 580 mm } def /lash { 274 mm 598 mm } def /eyefold { 320 mm 590 mm } def /bridge { 246 mm 577 mm } def /nose { 193 mm 471 mm } def /nostrill { 221 mm 457 mm } def /nostrilr { 256 mm 464 mm } def /mouth { 270 mm 384 mm } def /lips { 318 mm 395 mm } def /throat { 500 mm 90 mm } def /collar { 441 mm 38 mm } def /buttonsl { 460 mm 0 mm } def /buttonsr { 475 mm 0 mm } def /lapel { 704 mm 121 mm } def /neck { 704 mm 314 mm } def /hairback { 704 mm 360 mm } def /shoulder { 281 mm 0 mm } def /earlobe { 550 mm 461 mm } def /sideburn { 558 mm 517 mm } def /eartop { 632 mm 568 mm } def /hairleavespage { 704 mm 940 mm } def /bottomright { 704 mm 0 mm } def /bottomleft { 0 mm 0 mm } def /topright { 704 mm 1010 mm } def /topleft { 0 mm 1010 mm } def 1 3.78 div dup scale 50 mm 16 mm translate 0.8 mm setlinewidth % derived points /a_i_eyebrow bridge 0.4 lash 0.4 forehead 0.2 interpolate3 pointdef /a_s_eyebrow bridge 0.4 lash 0.4 forehead 0.35 interpolate3 pointdef /p_eyebrow eartop 0.06 eye 0.72 forehead 0.22 interpolate3 pointdef /alab nostrilr 2 mm -14 mm pointadd pointdef /alat alab 0.7 eye .30 interpolate2 pointdef % colourscheme /lightshirt_rgb red 0.8 mediumgrey 0.2 rgbmix rgbdef /darkshirt_rgb lightshirt_rgb 0.5 black 0.5 rgbmix rgbdef /upperlip_rgb red 0.5 lightgrey 0.5 rgbmix rgbdef /lowerlip_rgb red 0.5 white 0.5 rgbmix rgbdef /lightskin_rgb paleorange 1.0 brown 0.0 rgbmix rgbdef /darkskin_rgb paleorange 0.4 brown 0.6 rgbmix rgbdef /mediumskin_rgb lightskin_rgb 0.5 darkskin_rgb 0.5 rgbmix rgbdef /eyebrow_rgb mediumskin_rgb 0.4 darkgrey 0.6 rgbmix rgbdef /vdarkskin_rgb darkskin_rgb 0.5 black 0.5 rgbmix rgbdef /lighthair mediumgrey 0.4 darkgrey 0.6 rgbmix rgbdef /darkhair darkgrey 0.6 black 0.4 rgbmix rgbdef % curves % profile /lowerneck { 55 4 47 -6 } def /upperneck { 38 -6 10 23 33 6 13 -6 20 -38 53 -8 } def /chin { 22 -10 25 30 35 22 32 4 15 -45 17 -1 14 42 } def /lowerlip { 30 42 } def /mouth2teeth { 3 9 } def /abovelowerlip { 12 -9 31 11 } def /lowervermilion { 70 6 } def /underupperlip { 43 -6 3 -500 6 -3 } def /aboveupperlip { 12 -19 12 19 35 -13 2 -250 8 24 } def /upperlip { 10 -2 10 9 10 70 } def /beneathnose { 4 70 32 -6 10 -130 12 9 15 40 10 19 17 42 } def /abovenose { 13 25 90 3 16 -30 } def /lowerbrow { 10 -35 8 -1 8 1 15 45 23 2 12 -13 } def /upperbrow { 8 1 20 11 40 3 } def /alab2alat { 20 -28 25 -43 10 -28 } def % hair /hairleavespage2top { 150 -1 45 -4 } def /topofhair2brow { 45 -4 360 -1 80 -20 160 -2 } def /hairmeetsbrow2forehead { 8 1 20 9 40 3 } def /forehead2sideburn { 20 -6 20 80 185 -3 25 40 45 -2 15 -50 85 -4 40 40 } def /eartop2hairback { 110 10 20 -55 100 -2 } def % shirt /sc1_to_shoulder { 110 -3 30 15 77 -5 } def /neck2throat { 20 -10 80 2 20 -8 60 3 50 20 } def /throat2lapel { 15 -4 /nearthroat 50 -4 15 5 /llapelshadow 25 5 20 -10 20 -55 50 -5 55 4 } def % paths constructed round the frame and the four major areas /framepath { bottomleft moveto topleft lineto topright lineto bottomright lineto closepath } def /shirtpath { neck moveto [ neck2throat ] throat longcurveto [ lowerneck ] shirtmeetsneck longcurveto [ 26 -6 ] sc1 longcurveto [ sc1_to_shoulder ] shoulder longcurveto bottomright lineto closepath } def /hairpath { hairleavespage moveto [ hairleavespage2top /topofhair topofhair2brow ] hairmeetsbrow longcurveto [ hairmeetsbrow2forehead ] forehead longcurveto [ forehead2sideburn ] sideburn longcurveto eartop lineto [ eartop2hairback ] hairback longcurveto } def % profile newpath throat moveto [ lowerneck /shirtmeetsneck upperneck /underchin chin /underlip lowerlip ] mouth longcurveto [ mouth2teeth /teeth abovelowerlip ] lips longcurveto [ underupperlip ] teeth longcurveto mouth moveto [ upperlip /philtrum beneathnose ] nose longcurveto [ abovenose ] bridge longcurveto [ lowerbrow /hairmeetsbrow upperbrow ] forehead longcurveto % construct the current path all round the foreground ... gsave newpath hairleavespage moveto [ hairleavespage2top /topofhair topofhair2brow ] hairmeetsbrow longcurveto [ hairmeetsbrow2forehead ] forehead [ lowerbrow upperbrow ] reversecurve bridge longcurveto [ abovenose ] reversecurve nose longcurveto [ upperlip beneathnose ] reversecurve mouth longcurveto [ upperneck chin lowerlip ] reversecurve shirtmeetsneck longcurveto % [ 26 -6 ] sc1 longcurveto [ sc1_to_shoulder ] shoulder longcurveto % sc1 ? shoulder lineto bottomright lineto closepath % and paint the background bottomleft /bottom_y exch def /left_x exch def topright /top_y exch def /right_x exch def /green_y bottom_y .7 mul top_y .3 mul add def /delta 20 mm def /y bottom_y def { y top_y ge { exit } if /background_blue { [ bottom_y 1 .87 .6 green_y .8 1 .9 top_y .75 .85 1 ] y rgbinterpolate } def /x left_x def { x delta add right_x ge { exit } if x y infill not x delta add y delta add infill not or x delta add y infill not or x y delta add infill not or { background_blue setrgbcolor x y delta dup rectfill } if /x x delta add def } loop /y y delta add def } loop grestore % colour the face gsave newpath % fill face with lightskin_rgb throat moveto [ lowerneck upperneck chin ] underlip longcurveto [ abovelowerlip ] lips longcurveto [ underupperlip ] teeth longcurveto mouth lineto [ upperlip beneathnose ] nose longcurveto [ abovenose ] bridge longcurveto [ lowerbrow upperbrow ] forehead longcurveto hairleavespage lineto bottomright lineto closepath lightskin_rgb setrgbcolor fill grestore gsave % shade side of nose newpath lash moveto nostrill lineto nostrilr lineto 8 mm 0 rlineto closepath darkskin_rgb lightskin_rgb 17 mm fuzzyrgbfill newpath nostrilr moveto alab lineto [ alab2alat ] alat longcurveto -8 mm 5 mm rlineto closepath darkskin_rgb setrgbcolor fill grestore gsave newpath % paint upper lip mouth moveto [ mouth2teeth ] teeth longcurveto [ underupperlip ] reversecurve lips longcurveto [ aboveupperlip ] philtrum longcurveto [ upperlip ] reversecurve mouth longcurveto closepath upperlip_rgb setrgbcolor fill grestore gsave newpath % paint teeth teeth moveto [ underupperlip ] reversecurve lips longcurveto [ abovelowerlip ] reversecurve lips longcurveto closepath white setrgbcolor fill grestore gsave newpath % paint lower lip underlip moveto [ lowerlip ] mouth longcurveto [ abovelowerlip ] lips longcurveto [ lowervermilion ] underlip longcurveto closepath lowerlip_rgb setrgbcolor fill grestore gsave newpath % shadow under jawbone throat moveto [ lowerneck /shirtmeetsneck upperneck /underchin chin /underlip lowerlip ] mouth longcurveto topright lineto bottomright lineto closepath clip newpath underchin moveto [ 100 -1 40 -10 85 -1 ] eartop longcurveto darkskin_rgb lightskin_rgb 20 mm 100 mm fuzzyrgbstroke grestore gsave newpath % shade back of neck framepath clip newpath 690 mm 20 mm moveto 690 mm 500 mm lineto darkskin_rgb lightskin_rgb 20 mm 100 mm fuzzyrgbstroke grestore gsave newpath % smile-creases /topofcrease1 nostrilr .76 earlobe .24 lips 0 interpolate3 pointdef /botofcrease1 nostrilr .38 earlobe .25 underchin .37 interpolate3 pointdef /topofcrease2 nostrilr .60 earlobe .4 lips .1 interpolate3 pointdef /botofcrease2 nostrilr .32 earlobe .38 underchin .30 interpolate3 pointdef topofcrease1 moveto [ 20 -13 35 11 ] botofcrease1 longcurveto topofcrease2 moveto [ 15 -9 30 11 ] botofcrease2 longcurveto mediumskin_rgb lightskin_rgb 2 mm 5 mm fuzzyrgbstroke grestore stroke gsave newpath % eyebrow a_i_eyebrow moveto a_s_eyebrow lineto p_eyebrow lineto a_i_eyebrow lineto closepath eyebrow_rgb setrgbcolor fill grestore % shirt /throat2cc1 { 30 -12 55 -25 } def /cc12collar { 7 -28 30 -2 10 65 5 9 } def /buttons { 50 -25 /sb1 15 -25 25 8 } def newpath throat moveto [ throat2cc1 /cc1 cc12collar ] collar longcurveto cc1 moveto [ 67 6 /sc1 26 6 ] shirtmeetsneck longcurveto sc1 moveto [ sc1_to_shoulder ] shoulder longcurveto neck moveto [ neck2throat ] throat longcurveto [ throat2lapel ] lapel longcurveto gsave newpath shirtpath lightshirt_rgb setrgbcolor fill grestore gsave newpath throat moveto [ buttons ] buttonsl longcurveto newpath collar moveto sb1 lineto darkshirt_rgb lightshirt_rgb 5 mm 20 mm fuzzyrgbstroke newpath throat moveto [ throat2cc1 /cc1 cc12collar ] collar longcurveto sb1 lineto [ 65 25 ] throat longcurveto closepath darkshirt_rgb setrgbcolor fill grestore gsave newpath nearthroat moveto [ buttons ] buttonsr longcurveto 40 mm 0 rlineto [ 40 30 40 -30 ] llapelshadow longcurveto [ 50 4 ] nearthroat longcurveto closepath darkshirt_rgb setrgbcolor fill grestore gsave newpath shirtpath clip newpath neck moveto [ neck2throat ] throat longcurveto darkshirt_rgb lightshirt_rgb 5 mm 20 mm fuzzyrgbstroke grestore stroke % nose newpath nostrill moveto [ 20 2 7 100 13 4 ] nostrilr longcurveto [ 22 2 8 85 6 4 ] nostrill longcurveto closepath darkhair setrgbcolor fill newpath alab moveto [ alab2alat ] alat longcurveto vdarkskin_rgb setrgbcolor stroke % eye /eye2top_of_pupil { 31 -3 } def /corneafront { 22 -80 4 230 } def /corneaback { 20 -9 } def /bot_of_pupil2eye { 4 -520 30 -10 } def newpath black setrgbcolor eye moveto [ eye2top_of_pupil /top_of_pupil 9 -3 pushxy 12 35 ] lash longcurveto moveto [ 10 220 33 8 ] eyefold longcurveto top_of_pupil moveto [ corneafront /bot_of_pupil bot_of_pupil2eye ] eye longcurveto gsave newpath % fill cornea bot_of_pupil moveto [ corneaback ] top_of_pupil longcurveto [ corneafront ] bot_of_pupil longcurveto closepath darkgrey setrgbcolor fill grestore gsave newpath % fill white of eye eye moveto [ eye2top_of_pupil ] top_of_pupil longcurveto [ corneaback ] reversecurve bot_of_pupil longcurveto [ bot_of_pupil2eye ] eye longcurveto closepath white setrgbcolor fill grestore stroke gsave newpath % lines under eye bot_of_pupil 0.9 top_of_pupil 0.0 bridge 0.1 interpolate3 moveto [ 13 -180 /frontoflowerlid 23 -43 30 -3 ] eye longcurveto frontoflowerlid moveto 290 [ 8 2 /midlowerlid 10 90 ] longcurve eye moveto [ 14 1 pushxy 8 1 ] eye 0.9 eartop 0.03 earlobe 0.07 interpolate3 longcurveto moveto [ 40 35 ] midlowerlid longcurveto % currentlinewidth 0.5 mul setlinewidth vdarkskin_rgb setrgbcolor stroke grestore % ear newpath eartop moveto [ 80 9 20 25 15 6 30 -3 10 50 ] earlobe longcurveto 180 [ 25 70 15 -20 12 25 ] longcurve gsave hairleavespage lineto closepath lightskin_rgb setrgbcolor fill grestore gsave newpath sideburn 0.4 eartop 0.6 hairback 0.0 interpolate3 moveto [ 20 2 60 20 17 40 20 -60 14 25 18 130 35 -5 ] sideburn longcurveto closepath darkskin_rgb lightskin_rgb 5 mm fuzzyrgbfill grestore stroke % hair newpath hairpath gsave closepath lighthair setrgbcolor fill % shade back of hair newpath hairpath clip newpath neck moveto -50 mm 0 rmoveto hairleavespage lineto darkhair lighthair 50 mm 280 mm fuzzystroke newpath hairmeetsbrow .4 topofhair .3 eartop .4 interpolate3 moveto 350 [ 30 mm 10 ] longcurve darkhair lighthair 4 mm 30 mm fuzzystroke newpath hairmeetsbrow .35 topofhair .0 eartop .65 interpolate3 moveto 320 [ 30 mm -10 ] longcurve darkhair lighthair 4 mm 30 mm fuzzystroke newpath hairmeetsbrow moveto [ hairmeetsbrow2forehead ] forehead longcurveto darkhair lighthair 6 mm 50 mm fuzzystroke grestore darkhair setrgbcolor stroke showpage