%!PS-Adobe-3.0 EPSF-3.0 XG710-7N
%%BoundingBox: 70 83 795 587

%START PDFDE011.EPS
/pdfmark07 where {pop} {userdict /pdfmark07 /cleartomark load put} ifelse
/languagelevel where {pop languagelevel} {1} ifelse
2 lt { userdict (<<) cvn ([) cvn load put
       userdict (>>) cvn (]) cvn load put} if
[ /Title (PostScript pictures: http://130.149.60.45/~farbmetrik/XG71/)
  /Author (compare K. Richter "Computergrafik ...": ISBN 3-8007-1775-1)
  /Subject (goto: http://farbe.li.tu-berlin.de
   or http://130.149.60.45/~farbmetrik)
  /Keywords (image reproduction, colour devices)
  /Creator (klaus.richter@me.com)
  /CreationDate (D:2014100112000)
  /ModDate (D:2014100112000)
/DOCINFO pdfmark07
[ /View [ /FitB ]
/DOCVIEW pdfmark07
%END  PDFDE011

%SETCMYK_OLV.PS
/setcmyk_olvcolor %transfer cmyk to olv
{/ncolor exch def /ycolor exch def
 /mcolor exch def /ccolor exch def
 ncolor 0 eq {1 ccolor sub
              1 mcolor sub
              1 ycolor sub setrgbcolor
             }
             {ccolor 0 eq
              mcolor 0 eq and
              ycolor 0 eq and {%only black n
                               1 ncolor sub
                               dup
                               dup
                               setrgbcolor
                              }
                              {%cmy and black n
                               1 ccolor sub 1 ncolor sub mul
                               1 mcolor sub 1 ncolor sub mul
                               1 ycolor sub 1 ncolor sub mul
                               setrgbcolor
                              } ifelse
             } ifelse
} bind def

% !AUSTAUSCH Times-Roman -> Times-Roman-ISOLatin1=Times-I

/Times-Roman findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/Times-ISOL1 exch definefont pop

/Times-Italic findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/TimesI-ISOL1 exch definefont pop

/Times-Bold findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/TimesB-ISOL1 exch definefont pop

/Times-BoldItalic findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/TimesBI-ISOL1 exch definefont pop


/Courier findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/Courier-ISOL1 exch definefont pop

/Courier-Bold findfont dup length dict  begin
{1 index /FID ne {def} {pop pop} ifelse }forall
/Encoding ISOLatin1Encoding def
currentdict end

/CourierB-ISOL1 exch definefont pop


/FS {findfont exch scalefont setfont} bind def
/MM {72 25.4 div mul} def /str {8 string } bind def

/TS {200 /Times-ISOL1 FS} bind def
/TK {250 /Times-ISOL1 FS} bind def
/TM {300 /Times-ISOL1 FS} bind def
/TG {350 /Times-ISOL1 FS} bind def

/TIS {200 /TimesI-ISOL1 FS} bind def
/TIK {250 /TimesI-ISOL1 FS} bind def
/TIM {300 /TimesI-ISOL1 FS} bind def
/TIG {350 /TimesI-ISOL1 FS} bind def

/TBS {200 /TimesB-ISOL1 FS} bind def
/TBK {250 /TimesB-ISOL1 FS} bind def
/TBM {300 /TimesB-ISOL1 FS} bind def
/TBG {350 /TimesB-ISOL1 FS} bind def

/TBIS {200 /TimesBI-ISOL1 FS} bind def
/TBIK {250 /TimesBI-ISOL1 FS} bind def
/TBIM {300 /TimesBI-ISOL1 FS} bind def
/TBIG {350 /TimesBI-ISOL1 FS} bind def

/SS {200 /Symbol FS} bind def
/SK {250 /Symbol FS} bind def
/SM {290 /Symbol FS} bind def
/SG {350 /Symbol FS} bind def

/CSS {115 /Courier-ISOL1 FS} bind def
/CSK {140 /Courier-ISOL1 FS} bind def
/CS {200 /Courier-ISOL1 FS} bind def
/CK {250 /Courier-ISOL1 FS} bind def
/CM {300 /Courier-ISOL1 FS} bind def
/CG {350 /Courier-ISOL1 FS} bind def

/CBSS {115 /CourierB-ISOL1 FS} bind def
/CBSK {140 /CourierB-ISOL1 FS} bind def
/CBS {200 /CourierB-ISOL1 FS} bind def
/CBK {250 /CourierB-ISOL1 FS} bind def
/CBM {300 /CourierB-ISOL1 FS} bind def
/CBG {350 /CourierB-ISOL1 FS} bind def

/ns {350 /Times-ISOL1 FS  show} bind def
/ks {350 /TimesI-ISOL1 FS  show} bind def
/bs {350 /TimesB-ISOL1 FS  show} bind def
/js {350 /TimesBI-ISOL1 FS  show} bind def
/ss {350 /Symbol FS  show} bind def
/is {300 /Times-ISOL1 FS 0 -90 rmoveto show 0   90 rmoveto} bind def
/es {300 /Times-ISOL1 FS 0 200 rmoveto show 0 -200 rmoveto} bind def
/ib {300 /TimesB-ISOL1 FS 0 -90 rmoveto show 0   90 rmoveto} bind def
/eb {300 /TimesB-ISOL1 FS 0 200 rmoveto show 0 -200 rmoveto} bind def
/ip {300 /Times-ISOL1 FS 50 50 rmoveto (\267) show 50 -50 rmoveto} bind def

%20% kleiner
/ns2 {300 /Times-ISOL1 FS  show TM} bind def
/ks2 {300 /TimesI-ISOL1 FS  show TM} bind def
/bs2 {300 /TimesB-ISOL1 FS  show TM} bind def
/js2 {300 /TimesBI-ISOL1 FS  show TM} bind def
/ss2 {300 /Symbol FS  show TM} bind def
/is2 {250 /Times-ISOL1 FS 0 -70 rmoveto show 0 70 rmoveto TM} bind def
/es2 {250 /Times-ISOL1 FS 0 160 rmoveto show 0 -160 rmoveto TM} bind def
/ib2 {250 /TimesB-ISOL1 FS 0 -70 rmoveto show 0 70 rmoveto TM} bind def
/eb2 {250 /TimesB-ISOL1 FS 0 160 rmoveto show 0 -160 rmoveto TM} bind def
/ip2 {250 /Times-ISOL1 FS 40 40 rmoveto (\267) show 40 -40 rmoveto TM} bind def

%40% kleiner
/ns4 {250 /Times-ISOL1 FS  show TK} bind def
/ks4 {250 /TimesI-ISOL1 FS  show TK} bind def
/bs4 {250 /TimesB-ISOL1 FS  show TK} bind def
/js4 {250 /TimesBI-ISOL1 FS  show TK} bind def
/ss4 {250 /Symbol FS  show TK} bind def
/is4 {200 /Times-ISOL1 FS 0 -60 rmoveto show 0 60 rmoveto TK} bind def
/es4 {200 /Times-ISOL1 FS 0 130 rmoveto show 0 -130 rmoveto TK} bind def
/ib4 {200 /TimesB-ISOL1 FS 0 -60 rmoveto show 0 60 rmoveto TK} bind def
/eb4 {200 /TimesB-ISOL1 FS 0 130 rmoveto show 0 -130 rmoveto TK} bind def
/ip4 {200 /Times-ISOL1 FS 30 30 rmoveto (\267) show 30 -30 rmoveto TK} bind def

%XCHA01.PS BEG
/rec %x, y width heigth
  {/heigth exch def /width exch def
   moveto width 0 rlineto 0 heigth rlineto width neg 0 rlineto
   closepath } bind def

/colrecfi %x y width heigth c m y k
  {setcmyk_olvcolor rec fill} bind def

/colrecst %x y width heigth c m y k
  {setcmyk_olvcolor rec stroke} bind def

/rem %x, y width heigth
  {/heigth exch 0.5 mul def /width exch 0.5 mul def
   /yleftb exch heigth 0.5 mul add def
   /xleftb exch width  0.5 mul add def
   xleftb yleftb
   moveto width 0 rlineto 0 heigth rlineto width neg 0 rlineto
   closepath } bind def

/colremfi %x y width heigth c m y k
  {setcmykcolor rem fill} bind def

/colremst %x y width heigth c m y k
  {setcmykcolor rem stroke} bind def

/tzr {0.0 1.0 1.0 0.0} bind def %Reproduktionsfarben
/tzg {1.0 0.0 1.0 0.0} bind def
/tzb {1.0 1.0 0.0 0.0} bind def
/tzc {1.0 0.0 0.0 0.0} bind def
/tzm {0.0 1.0 0.0 0.0} bind def
/tzy {0.0 0.0 1.0 0.0} bind def

/tzn {0.0 0.0 0.0 1.00} bind def %Graureihe
/tzd {0.0 0.0 0.0 0.75} bind def
/tzz {0.0 0.0 0.0 0.50} bind def
/tzh {0.0 0.0 0.0 0.25} bind def
/tzw {0.0 0.0 0.0 0.00} bind def

/tfr {0.0 1.0 1.0 0.0 setcmyk_olvcolor} bind def %Reproduktionsfarben
/tfg {1.0 0.0 1.0 0.0 setcmyk_olvcolor} bind def
/tfb {1.0 1.0 0.0 0.0 setcmyk_olvcolor} bind def
/tfc {1.0 0.0 0.0 0.0 setcmyk_olvcolor} bind def
/tfm {0.0 1.0 0.0 0.0 setcmyk_olvcolor} bind def
/tfy {0.0 0.0 1.0 0.0 setcmyk_olvcolor} bind def

/tfrz {0.0 1.0 1.0 0.5 setcmyk_olvcolor} bind def %Reproduktionsfarben
/tfgz {1.0 0.0 1.0 0.5 setcmyk_olvcolor} bind def
/tfbz {1.0 1.0 0.0 0.5 setcmyk_olvcolor} bind def
/tfcz {1.0 0.0 0.0 0.5 setcmyk_olvcolor} bind def
/tfmz {0.0 1.0 0.0 0.5 setcmyk_olvcolor} bind def
/tfyz {0.0 0.0 1.0 0.5 setcmyk_olvcolor} bind def

/tfn {0.0 0.0 0.0 1.00 setcmyk_olvcolor} bind def %Graureihe
/tfd {0.0 0.0 0.0 0.75 setcmyk_olvcolor} bind def
/tfz {0.0 0.0 0.0 0.50 setcmyk_olvcolor} bind def
/tfh {0.0 0.0 0.0 0.25 setcmyk_olvcolor} bind def
/tfw {0.0 0.0 0.0 0.00 setcmyk_olvcolor} bind def

/cvishow {cvi 10 string cvs show} def
/cvsshow1 {10 mul cvi 0.1 mul 10 string cvs show} def
/cvsshow2 {100 mul cvi 0.01 mul 10 string cvs show} def
/cvsshow3 {1000 mul cvi 0.001 mul 10 string cvs show} def
/cvsshow4 {10000 mul cvi 0.0001 mul 10 string cvs show} def

%0
%1
%2
%max 2800 sample pairs with 10 data per line = minimum 28000 data
/WData0 28000 array def
/WData0
[
%VCD_datasets_0100_Wang_MX.txt, 20150216, from ME17AG/Melgosa_15: TCD_datasets.xlsx
%Reference White, Sample 1, Sample 2, Vis. Dif, TCD_datasets, Export Tabstop separated txt
%X0      Y0        Z0        X1       Y1       Z1       X2       Y2       Z2       dV
94.8109  100.0000  107.3048  18.3050  19.2582  20.1675  18.3215  19.2220  20.0539  0.5105
94.8109  100.0000  107.3048  18.3050  19.2582  20.1675  18.2611  19.2685  20.1007  0.4853
94.8109  100.0000  107.3048  18.3050  19.2582  20.1675  18.0269  18.9807  19.8700  0.4573
94.8109  100.0000  107.3048  18.3077  19.2780  20.0223  18.3111  19.2428  20.0996  0.4492
94.8109  100.0000  107.3048  18.3077  19.2780  20.0223  18.2724  19.1925  20.1231  0.5278
94.8109  100.0000  107.3048  18.3741  19.1807  20.1253  18.3633  19.2410  20.1995  0.5278
94.8109  100.0000  107.3048  18.2124  19.2077  20.1851  18.6138  19.6035  20.5858  0.5540
94.8109  100.0000  107.3048  18.8719  19.8680  20.8447  18.5033  19.4799  20.4029  0.4853
94.8109  100.0000  107.3048  18.5033  19.4799  20.4029  18.1870  19.1551  20.0370  0.4659
94.8109  100.0000  107.3048  17.6596  18.6052  19.4958  18.0269  18.9807  19.8700  0.4853
94.8109  100.0000  107.3048  56.2576  59.3797  61.5876  57.1815  60.4140  62.7296  0.4492
94.8109  100.0000  107.3048  56.2576  59.3797  61.5876  55.1783  58.2728  60.5824  0.4263
94.8109  100.0000  107.3048  56.3282  59.3693  62.1932  56.0506  59.1955  61.7962  0.4414
94.8109  100.0000  107.3048  56.1185  59.3298  62.0039  55.9641  59.2070  62.3875  0.4414
94.8109  100.0000  107.3048  56.2055  59.3642  62.1887  56.3975  59.5484  61.9301  0.3888
94.8109  100.0000  107.3048  56.2055  59.3642  62.1887  57.3652  60.6337  63.5301  0.4968
94.8109  100.0000  107.3048  55.1783  58.2728  60.5824  56.3975  59.5484  61.9301  0.4414
94.8109  100.0000  107.3048  56.4442  59.6471  62.3894  56.3975  59.5484  61.9301  0.4190
94.8109  100.0000  107.3048  56.4442  59.6471  62.3894  57.3652  60.6337  63.5301  0.4263
94.8109  100.0000  107.3048  54.7278  57.8225  60.6181  55.5930  58.6864  61.5438  0.4414
94.8109  100.0000  107.3048  12.8847  9.7032  6.0335  12.9744  9.6818  5.9193  0.4042
94.8109  100.0000  107.3048  13.0754  9.7701  5.8525  13.1860  9.8321  6.0097  0.4492
94.8109  100.0000  107.3048  13.4167  10.0247  6.1298  13.1860  9.8321  6.0097  0.4042
94.8109  100.0000  107.3048  13.4167  10.0247  6.1298  13.2548  9.9597  6.1870  0.4492
94.8109  100.0000  107.3048  13.1860  9.8321  6.0097  13.1305  9.8738  6.1115  0.3806
94.8109  100.0000  107.3048  13.1164  9.8063  5.9980  13.4421  10.0225  6.1575  0.4573
94.8109  100.0000  107.3048  13.1270  9.8413  6.1203  13.2511  9.8390  6.0798  0.4338
94.8109  100.0000  107.3048  13.0836  9.7444  5.9489  13.1206  9.8370  6.0721  0.3806
94.8109  100.0000  107.3048  13.0836  9.7444  5.9489  12.8720  9.6361  5.9903  0.4573
94.8109  100.0000  107.3048  13.3209  9.9912  6.1973  13.0743  9.7726  6.0368  0.4263
94.8109  100.0000  107.3048  16.1186  18.7386  29.9668  16.3667  19.0233  30.3190  0.4338
94.8109  100.0000  107.3048  16.0158  18.6446  29.3264  16.0344  18.6936  29.8011  0.4853
94.8109  100.0000  107.3048  16.0397  18.6605  29.6003  16.0450  18.7136  29.9384  0.4752
94.8109  100.0000  107.3048  16.0344  18.6936  29.8011  16.1271  18.7289  29.9390  0.4492
94.8109  100.0000  107.3048  16.0711  18.6720  29.8927  16.3667  19.0233  30.3190  0.4752
94.8109  100.0000  107.3048  15.9690  18.6752  29.9146  15.9995  18.6400  30.0015  0.4752
94.8109  100.0000  107.3048  15.9690  18.6752  29.9146  16.0855  18.7333  30.1143  0.4752
94.8109  100.0000  107.3048  16.0099  18.6955  30.3539  16.0855  18.7333  30.1143  0.4190
94.8109  100.0000  107.3048  16.3398  19.0675  30.7518  16.3667  19.0233  30.3190  0.4573
94.8109  100.0000  107.3048  15.4449  17.9790  28.8783  15.7233  18.3110  29.3619  0.4573
94.8109  100.0000  107.3048  6.1706  6.2689  12.2429  6.1345  6.2330  12.3449  0.4042
94.8109  100.0000  107.3048  6.2202  6.3108  12.4439  6.0998  6.1936  12.2788  0.4190
94.8109  100.0000  107.3048  6.1879  6.3070  12.3454  6.2276  6.3365  12.6056  0.4338
94.8109  100.0000  107.3048  6.2300  6.3217  12.4695  6.0998  6.1936  12.2788  0.3888
94.8109  100.0000  107.3048  6.2198  6.3547  12.4842  6.2208  6.3333  12.4228  0.4338
94.8109  100.0000  107.3048  6.2208  6.3333  12.4228  6.2770  6.3772  12.6661  0.3888
94.8109  100.0000  107.3048  6.2208  6.3333  12.4228  6.1914  6.2956  12.5107  0.3888
94.8109  100.0000  107.3048  6.1166  6.1919  12.4692  6.0998  6.1936  12.2788  0.3966
94.8109  100.0000  107.3048  6.0896  6.2014  12.2865  6.0998  6.1936  12.2788  0.3888
94.8109  100.0000  107.3048  6.5452  6.6689  13.0296  6.3743  6.4842  12.7966  0.3628
94.8109  100.0000  107.3048  6.0056  6.7471  7.1956  6.0390  6.7770  7.3164  0.4414
94.8109  100.0000  107.3048  6.0056  6.7471  7.1956  6.0349  6.7824  7.3320  0.4853
94.8109  100.0000  107.3048  6.0694  6.7872  7.3081  6.0349  6.7824  7.3320  0.4414
94.8109  100.0000  107.3048  6.0390  6.7770  7.3164  6.0217  6.7904  7.3541  0.4492
94.8109  100.0000  107.3048  6.0390  6.7770  7.3164  5.8649  6.5854  7.1446  0.4190
94.8109  100.0000  107.3048  6.0740  6.8015  7.3869  6.2361  6.9744  7.5695  0.4190
94.8109  100.0000  107.3048  6.0740  6.8015  7.3869  5.8649  6.5854  7.1446  0.4042
94.8109  100.0000  107.3048  6.0410  6.8370  7.4168  6.1941  7.0019  7.5915  0.3806
94.8109  100.0000  107.3048  5.9734  6.7363  7.2967  5.7956  6.5458  7.1168  0.4492
94.8109  100.0000  107.3048  6.0759  6.8507  7.4256  5.9086  6.6563  7.2235  0.4659
94.8109  100.0000  107.3048  82.3134  87.4442  74.5634  82.5605  87.6589  75.5826  0.4752
94.8109  100.0000  107.3048  82.3134  87.4442  74.5634  83.8677  89.0943  75.8668  0.4116
94.8109  100.0000  107.3048  82.3134  87.4442  74.5634  81.0992  86.1468  73.5998  0.3628
94.8109  100.0000  107.3048  82.7692  87.8739  75.1513  81.0992  86.1468  73.5998  0.4338
94.8109  100.0000  107.3048  82.7275  87.9899  75.5875  84.0976  89.4057  76.8523  0.4263
94.8109  100.0000  107.3048  82.2233  87.3984  74.5587  82.5605  87.6589  75.5826  0.4659
94.8109  100.0000  107.3048  82.2233  87.3984  74.5587  81.0992  86.1468  73.5998  0.3888
94.8109  100.0000  107.3048  83.1207  88.3598  75.0170  82.8217  87.9485  75.3691  0.4492
94.8109  100.0000  107.3048  82.1265  87.2455  74.9543  80.9123  85.9150  73.5282  0.4190
94.8109  100.0000  107.3048  83.1474  88.3728  76.2769  81.5171  86.6845  74.4918  0.4573
94.8109  100.0000  107.3048  12.2144  14.2462  34.8289  12.2682  14.3391  35.5583  0.4414
94.8109  100.0000  107.3048  12.2144  14.2462  34.8289  12.3000  14.3458  35.6344  0.4968
94.8109  100.0000  107.3048  12.2819  14.2655  35.0117  12.3308  14.3379  35.5465  0.4573
94.8109  100.0000  107.3048  12.2819  14.2655  35.0117  12.2220  14.2180  35.3360  0.5278
94.8109  100.0000  107.3048  12.1987  14.2302  35.1587  12.1453  14.1862  35.6475  0.4263
94.8109  100.0000  107.3048  12.3501  14.3629  35.3668  12.3000  14.3458  35.6344  0.4752
94.8109  100.0000  107.3048  12.2314  14.3143  35.2421  12.2426  14.2513  35.2260  0.4659
94.8109  100.0000  107.3048  12.1926  14.2241  35.2485  12.1453  14.1862  35.6475  0.4263
94.8109  100.0000  107.3048  12.0655  14.1251  35.1196  12.0710  14.0714  35.1208  0.4338
94.8109  100.0000  107.3048  12.0887  14.1295  35.1372  12.2682  14.3391  35.5583  0.4853
94.8109  100.0000  107.3048  31.8111  40.3034  13.2370  31.8244  40.4478  12.7943  0.4338
94.8109  100.0000  107.3048  31.9615  40.3026  12.8955  31.8553  40.3794  13.0942  0.4853
94.8109  100.0000  107.3048  31.7756  40.3664  13.1218  31.5812  40.3391  13.1717  0.4659
94.8109  100.0000  107.3048  32.2197  40.5064  13.2220  32.0274  40.4987  13.2134  0.4414
94.8109  100.0000  107.3048  31.5812  40.3391  13.1717  31.8096  40.3992  13.0535  0.4853
94.8109  100.0000  107.3048  31.5812  40.3391  13.1717  32.1808  40.8126  13.3897  0.4573
94.8109  100.0000  107.3048  31.4370  39.9520  12.8951  32.1172  40.7519  13.3368  0.4573
94.8109  100.0000  107.3048  31.8533  40.4124  13.1490  32.5252  41.1871  13.4525  0.4116
94.8109  100.0000  107.3048  32.1172  40.7519  13.3368  31.5139  39.9863  12.9110  0.4338
94.8109  100.0000  107.3048  31.5139  39.9863  12.9110  32.1808  40.8126  13.3897  0.4414
94.8109  100.0000  107.3048  21.7846  16.8866  12.3160  21.9695  16.9009  12.1925  0.3966
94.8109  100.0000  107.3048  21.8797  16.8823  12.1393  21.7932  16.9246  12.3383  0.4190
94.8109  100.0000  107.3048  21.8797  16.8823  12.1393  21.8872  16.9644  12.3231  0.4042
94.8109  100.0000  107.3048  21.6042  16.8651  12.1458  21.7200  16.9194  12.3552  0.4414
94.8109  100.0000  107.3048  21.7936  16.8665  12.2429  21.6018  16.8564  12.2755  0.4116
94.8109  100.0000  107.3048  21.7476  16.8606  12.2111  21.6018  16.8564  12.2755  0.4116
94.8109  100.0000  107.3048  21.9033  16.9302  12.3118  21.7200  16.9194  12.3552  0.4414
94.8109  100.0000  107.3048  21.7266  16.8413  12.3256  21.9695  16.9009  12.1925  0.4190
94.8109  100.0000  107.3048  21.9695  16.9009  12.1925  21.7793  16.8552  12.2092  0.4042
94.8109  100.0000  107.3048  22.3828  17.3041  12.5760  22.2001  17.2339  12.5923  0.3806
] def

%*************************************
/cvi36show
{1000 mul /nx exch cvi def
nx      9 le {(0) show} if
nx     99 le {(0) show} if
nx    999 le {(0) show} if
nx   9999 le {(0) show} if
nx  99999 le {(0) show} if
nx 999999 le {(0) show} if
nx cvi 10 string cvs show
} def

/cvi24show
{100 mul /nx exch cvi def
nx      9 le {(0) show} if
nx     99 le {(0) show} if
nx    999 le {(0) show} if
nx   9999 le {(0) show} if
nx cvi 8 string cvs show
} def
%*******************************************
/cvi03show
{/nx exch cvi def
nx      9 le {(0) show} if
nx     99 le {(0) show} if
nx    999 le {(0) show} if
nx cvi 7 string cvs show
} def

/cvi02show
{/nx exch cvi def
nx      9 le {(0) show} if
nx     99 le {(0) show} if
nx cvi 6 string cvs show
} def

/cvi02nshow
{/nx exch def %with round
nx 0 eq {%nx=0
         (00) show
         nx cvi 6 string cvs show
        } if %nx>=0
nx 0 gt {%nx>=0
         /nx nx 0.5 add cvi def
         nx      9 le {(0) show} if
         nx     99 le {(0) show} if
         nx 6 string cvs show
        } if
nx 0 lt {%nx<0
         /nx nx 0.5 sub cvi def
         nx abs   99 le {(0) show} if
         nx 6 string cvs show
        } if %nx>=0
} def

/cvi02xshow
{/nx exch def %with round
nx 0 eq {%nx=0
         (  ) show
         nx cvi 6 string cvs show
        } if %nx>=0
nx 0 gt {%nx>=0
         /nx nx 0.5 add cvi def
         nx      9 le {( ) show} if
         nx     99 le {( ) show} if
         nx 6 string cvs show
        } if
nx 0 lt {%nx<0
         /nx nx 0.5 sub cvi def
         nx abs   99 le {( ) show} if
         nx 6 string cvs show
        } if %nx>=0
} def

/cvi03nshow
{/nx exch def %with round
nx 0 eq {%nx=0
         (000) show
         nx cvi 7 string cvs show
        } if %nx>=0
nx 0 gt {%nx>=0
         /nx nx 0.5 add cvi def
         nx      9 le {(0) show} if
         nx     99 le {(0) show} if
         nx    999 le {(0) show} if
         nx 7 string cvs show
        } if
nx 0 lt {%nx<0
         /nx nx 0.5 sub cvi def
         nx abs    9 le {(0) show} if
         nx abs   99 le {(0) show} if
         nx 7 string cvs show
        } if %nx>=0
} def

/cvi03xshow
{/nx exch cvi def %with round
nx 0 eq {%nx=0
         (   ) show
         nx cvi 7 string cvs show
        } if %nx>=0
nx 0 gt {%nx>=0
%         /nx nx 0.5 add cvi def
         nx      9 le {( ) show} if
         nx     99 le {( ) show} if
         nx    999 le {( ) show} if
         nx 7 string cvs show
        } if
nx 0 lt {%nx<0
%         /nx nx 0.5 sub cvi def
         nx abs    9 le {( ) show} if
         nx abs   99 le {( ) show} if
         nx 7 string cvs show
        } if %nx>=0
} def

%*************************************************************
/d_CIELABi  2800 array def
/d_CIELCHi  2800 array def
/d_C94LCHi  2800 array def
/d_CMCLCHi  2800 array def
/d_CM2LCHi  2800 array def
/d_C00LCHi  2800 array def
/d_C85LCHi  2800 array def
/d_C77LCHi  2800 array def
/d_C78LCHi  2800 array def
/d_C79LCHi  2800 array def

/d_CIELABmi  2800 array def
/d_CIELCHmi  2800 array def
/d_C94LCHmi  2800 array def
/d_CMCLCHmi  2800 array def
/d_CM2LCHmi  2800 array def
/d_C00LCHmi  2800 array def
/d_C85LCHmi  2800 array def
/d_C77LCHmi  2800 array def
/d_C78LCHmi  2800 array def
/d_C79LCHmi  2800 array def

/proc_coldiff {%BEG procedure proc_coldiff PROC_COLDIFF_WK58.PS 150529
%calculates CIE colour data and differences for 10 colour spaces
%BEG CIELAB/CIELCH
/FL 0.000001 def
X0 XW div D6_29 gt {/FXXN0 X0 XW div 0.0001 add D13 exp def}
                   {/FXXN0 D841_108 X0 XW div mul D4_29 add def} ifelse

Y0 YW div D6_29 gt {/FYYN0 Y0 YW div 0.0001 add D13 exp def}
                    {/FYYN0 D841_108 Y0 YW div mul D4_29 add def} ifelse

Z0 ZW div D6_29 gt {/FZZN0 Z0 ZW div 0.0001 add D13 exp def}
                    {/FZZN0 D841_108 Z0 ZW div mul D4_29 add def} ifelse

/CIEL*0 116. FYYN0 mul 16. sub def
/CIEa*0 500. FXXN0 FYYN0 sub mul def
/CIEb*0 200. FYYN0 FZZN0 sub mul def
/CIEC*ab0 CIEa*0 dup mul
          CIEb*0 dup mul add 0.0001 add sqrt def
/CIEhab0 CIEb*0 CIEa*0 0.0001 add atan def

X1 XW div D6_29 gt {/FXXN1 X1 XW div 0.0001 add D13 exp def}
                   {/FXXN1 D841_108 X1 XW div mul D4_29 add def} ifelse

Y1 YW div D6_29 gt {/FYYN1 Y1 YW div 0.0001 add D13 exp def}
                   {/FYYN1 D841_108 Y1 YW div mul D4_29 add def} ifelse

Z1 ZW div D6_29 gt {/FZZN1 Z1 ZW div 0.0001 add D13 exp def}
                   {/FZZN1 D841_108 Z1 ZW div mul D4_29 add def} ifelse

/CIEL*1 116. FYYN1 mul 16. sub def
/CIEa*1 500. FXXN1 FYYN1 sub mul def
/CIEb*1 200. FYYN1 FZZN1 sub mul def
/CIEC*ab1 CIEa*1 dup mul
          CIEb*1 dup mul add 0.0001 add sqrt def
/CIEhab1 CIEb*1 CIEa*1 0.0001 add atan def

%mixed terms with *0 sn *1:
/d_CIEL* CIEL*1 CIEL*0 sub def
/d_CIEa* CIEa*1 CIEa*0 sub def
/d_CIEb* CIEb*1 CIEb*0 sub def

d_CIELABi i d_CIEL* dup mul
            d_CIEa* dup mul add 
            d_CIEb* dup mul add 0.00000001 add sqrt put

/a_CIELAB 1.26 def
/b_CIELAB 0.55 def
d_CIELABmi i d_CIELABi i get b_CIELAB exp a_CIELAB mul put

/d_CIEh CIEhab1 CIEhab0 sub def                    %see CIEDE2000 page 4
CIEC*ab1 CIEC*ab0 mul 0 eq {/d_CIEh 0 def} if      %CIEC*ab1 x CIEC*ab0 =0
CIEC*ab1 CIEC*ab0 mul 0 ne  d_CIEh  180 gt and
         {/d_CIEh d_CIEh 360 sub def} if
CIEC*ab1 CIEC*ab0 mul 0 ne  d_CIEh -180 lt and
         {/d_CIEh d_CIEh 360 add def} if

/d_CIEL   CIEL*1   CIEL*0   sub def
/d_CIECab CIEC*ab1 CIEC*ab0 sub def
/d_CIEHab CIEC*ab1 CIEC*ab0 mul 0.000001 add sqrt 2 mul
          d_CIEh 0.5 mul sin mul def

d_CIELCHi i d_CIEL   dup mul
            d_CIECab dup mul add
            d_CIEHab dup mul add 0.000001 add sqrt put

/a_CIELCH 1.26 def
/b_CIELCH 0.55 def
d_CIELCHmi i d_CIELCHi i get b_CIELCH exp a_CIELCH mul put

%BEG CIELAB/CIELCH

%BEG CIE94
/S94L 1 def
/S94C 1 0.045 CIEC*ab0 mul add def
/S94H 1 0.015 CIEC*ab0 mul add def
/K94L 1 def
/K94C 1 def
/K94H 1 def

/LC94*0 CIEL*0 K94L div S94L div def
/LC94*1 CIEL*1 K94L div S94L div def
/CC94*ab0 CIEC*ab0 K94C div S94C div def
/CC94*ab1 CIEC*ab1 K94C div S94C div def

d_C94LCHi i CIEL*1   CIEL*0   sub K94L div S94L div dup mul
            CIEC*ab1 CIEC*ab0 sub K94C div S94C div dup mul add 
            d_CIEHab              K94H div S94H div dup mul add
            0.00000001 add sqrt put

/a_C94LCH 1.41 def
/b_C94LCH 0.70 def
d_C94LCHmi i d_C94LCHi i get b_C94LCH exp a_C94LCH mul put

%END CIE94

%BEG CMC(l:c=1:1)
%special mean m of two samples for SCML, SCMC, TCMC

/CIEL*0m   CIEL*0 CIEL*1 add 0.5 mul def
/CMCC0S CIEC*ab0 def
/CMCC1S CIEC*ab1 def
/CIEC*ab0m CMCC0S CMCC1S add 0.5 mul def

CIEC*ab0 0 eq {/CMCh0S 0 def}
              {/CMCh0S CIEb*0 CIEa*0  0.0001 add atan def
              } ifelse
CIEC*ab1 0 eq {/CMCh1S 0 def}
              {/CMCh1S CIEb*1 CIEa*1  0.0001 add atan def
              } ifelse

%beg special EQUATION (11) TO (14)
/d_CMChS0 CMCh1S CMCh0S sub def                    %see CIEDE2000 page 4
CMCC1S CMCC0S mul 0 eq {/d_CMChS 0 def} if    %CIEC*ab1 x CIEC*ab0 =0
CMCC1S CMCC0S mul 0 ne
d_CMChS0 abs  180 le and
         {/d_CMChSm d_CMChS0 def} if
CMCC1S CMCC0S mul 0 ne
d_CMChS0  180 gt and
         {/d_CMChSm d_CMChS0 360 sub def} if
CMCC1S CMCC0S mul 0 ne
d_CMChS0 -180 lt and
         {/d_CMChSm d_CMChS0 360 add def} if
%end special EQUATION (11) TO (14)

%beg special EQUATION (23) TO (26)
/a_CMChsm CMCh0S CMCh1S add 0.5 mul def
/m_CMCCSm CMCC0S CMCC1S mul def

d_CMChSm abs 180 le
m_CMCCSm 0   ne and
{/CMChSqm a_CMChsm def} if

d_CMChSm abs 180 gt
a_CMChsm 360 le and
m_CMCCSm 0   ne and
{/CMChSqm CMCh0S CMCh1S add 360 add 0.5 mul def} if

d_CMChSm abs 180 gt
a_CMChsm 360 ge and
m_CMCCSm 0   ne and
{/CMChSqm CMCh0S CMCh1S add 360 sub 0.5 mul def} if

m_CMCCSm 0 eq {/CMChSqm CMCh0S CMCh1S add def } if
%end special EQUATION (23) TO (26)

CIEL*0m 16 lt {/SCMLm 0.511 def}
              {/SCMLm 0.040975 CIEL*0m mul
                      0.01765  CIEL*0m mul 1 add div def
             } ifelse
/SCMCm 0.0638 CIEC*ab0m mul
       0.0131 CIEC*ab0m mul 1 add div 0.638 add def
%beg special
/FCMCm CIEC*ab0m dup mul dup mul
       CIEC*ab0m dup mul dup mul 1900 add div sqrt def
CMChSqm 164 lt
CMChSqm 345 gt or
{/TCMCm CMChSqm  35 add cos 0.4 mul abs 0.36 add def}
{/TCMCm CMChSqm 168 add cos 0.2 mul abs 0.56 add def} ifelse
%end special

/SCMHm TCMCm FCMCm mul 1 add FCMCm sub SCMCm mul def

/KCML 1 def %=l
/KCMC 1 def %=c
/KCMH 1 def %1

/CMCL*0m CIEL*0 KCML div SCMLm div def
/CMCL*1m CIEL*1 KCML div SCMLm div def
/CMCC*ab0m CIEC*ab0 KCMC div SCMCm div def
/CMCC*ab1m CIEC*ab1 KCMC div SCMCm div def

d_CMCLCHi i CIEL*1 CIEL*0 sub     KCML div SCMLm div dup mul
            CIEC*ab1 CIEC*ab0 sub KCMC div SCMCm div dup mul add 
            d_CIEHab              KCMH div SCMHm div dup mul add
            0.00000001 add sqrt put

/a_CMCLCH 1.34 def
/b_CMCLCH 0.66 def
d_CMCLCHmi i d_CMCLCHi i get b_CMCLCH exp a_CMCLCH mul put

%END CMC(m:l:c=m:1:1)=CMC

%BEG CM2(m:l:c=m:1:2)=CM2
/KM2L 1 def %=l
/KM2C 2 def %=c
/KM2H 1 def %1

/CM2L*0 CIEL*0 KM2L div SCMLm div def
/CM2L*1 CIEL*1 KM2L div SCMLm div def
/CM2C*ab0 CIEC*ab0 KM2C div SCMCm div def
/CM2C*ab1 CIEC*ab1 KM2C div SCMCm div def

d_CM2LCHi i CIEL*1 CIEL*0 sub     KM2L div SCMLm div dup mul
            CIEC*ab1 CIEC*ab0 sub KM2C div SCMCm div dup mul add
            d_CIEHab              KM2H div SCMHm div dup mul add
            0.00000001 add sqrt put

%END CM2(m:l:c=m:1:2)=CM2

%BEG CIEDE2000=C00
%beg special equation (7)
/CIEC*ab CIEC*ab0 CIEC*ab1 add 0.5 mul def
/DEG 1 CIEC*ab 7 exp
       CIEC*ab 7 exp 25 7 exp add div
       0.000001 add sqrt sub 0.5 mul def
%end special equation (7)

%beg special EQUATION (1) TO (6)
%0
/C00L0S CIEL*0 def
/C00a0S 1 DEG add CIEa*0 mul def
/C00b0S CIEb*0 def
/C00C0S C00a0S dup mul
        C00b0S dup mul add
        0.000001 add sqrt def
C00C0S 0 eq {/C00h0S 0 def}
            {/C00h0S C00b0S C00a0S  0.0001 add atan def
            } ifelse
%1
/C00L1S CIEL*1 def
/C00a1S 1 DEG add CIEa*1 mul def
/C00b1S CIEb*1 def
/C00C1S C00a1S dup mul
        C00b1S dup mul add
        0.000001 add sqrt def
C00C1S 0 eq {/C00h1S 0 def}
            {/C00h1S C00b1S C00a1S  0.0001 add atan def
            } ifelse
%end special EQUATION (1) TO (6)

%beg special EQUATION (11) TO (14)
/d_C00hS0 C00h1S C00h0S sub def                    %see CIEDE2000 page 4
C00C1S C00C0S mul 0 eq {/d_C00hS 0 def} if    %CIEC*ab1 x CIEC*ab0 =0
C00C1S C00C0S mul 0 ne
d_C00hS0 abs  180 le and
         {/d_C00hS d_C00hS0 def} if
C00C1S C00C0S mul 0 ne
d_C00hS0  180 gt and
         {/d_C00hS d_C00hS0 360 sub def} if
C00C1S C00C0S mul 0 ne
d_C00hS0 -180 lt and
         {/d_C00hS d_C00hS0 360 add def} if
%end special EQUATION (11) TO (14)

%beg special EQUATION (8) TO (10)
/d_C00LS C00L1S C00L0S sub def
/d_C00aS C00a1S C00a0S sub def
/d_C00bS C00b1S C00b0S sub def
/d_C00CS C00C1S C00C0S sub def
/d_C00HS C00C0S C00C1S mul 0.000001 add sqrt 2 mul
         d_C00hS 0.5 mul sin mul def
%end special EQUATION (8) TO (10)

%beg special EQUATION (23) TO (26)
/a_C00hs C00h0S C00h1S add 0.5 mul def
/m_C00CS C00C0S C00C1S mul def

d_C00hS abs 180 le
m_C00CS 0   ne and
{/C00hSq a_C00hs def} if

d_C00hS abs 180 gt
a_C00hs 360 le and
m_C00CS 0   ne and
{/C00hSq C00h0S C00h1S add 360 add 0.5 mul def} if

d_C00hS abs 180 gt
a_C00hs 360 ge and
m_C00CS 0   ne and
{/C00hSq C00h0S C00h1S add 360 sub 0.5 mul def} if

m_C00CS 0 eq {/C00hSq C00h0S C00h1S add def } if
%end special EQUATION (23) TO (26)

%beg special EQUATIONS (16) TO (22)
/C00LSq C00L0S C00L1S add 0.5 mul def
/C00CSq C00C0S C00C1S add 0.5 mul def

/C00SL C00LSq 50 sub dup mul 0.015 mul
       C00LSq 50 sub dup mul 20 add sqrt div
       1 add def
/C00SC 0.045 C00CSq mul 1 add def

%beg special T, RT, d_D, RC
/C00T C00hSq 30 sub cos -0.17 mul
      C00hSq 2 mul  cos  0.24 mul add
      C00hSq 3 mul 6 add cos  0.32 mul add
      C00hSq 4 mul 63 sub cos 0.20 mul sub
      1 add def
/C00SH 0.015 C00CSq mul C00T mul 1 add def

/C00RC C00CSq 7 exp
       C00CSq 7 exp 25 7 exp add 0.000001 add div 0.000001 add sqrt 2 mul def
/expDT C00hSq 275 sub 25 div dup mul def
/econst 2.718281 def
/C00DT 30 econst expDT neg exp mul def
/C00RT C00DT 2 mul sin neg C00RC mul def
%end special T, RT, d_D, RC
%end special EQUATIONS (16) TO (22)

%beg special EQUATION (15)

/C00KL 1.0 def
/C00KC 1.0 def
/C00KH 1.0 def

/d_C00LSN d_C00LS C00KL div C00SL div def
/d_C00CSN d_C00CS C00KC div C00SC div def
/d_C00HSN d_C00HS C00KH div C00SH div def

d_C00LCHi i d_C00LSN dup mul
            d_C00CSN dup mul add
            d_C00HSN dup mul add
            d_C00CSN d_C00HSN mul C00RT mul add
            0.000001 add sqrt put

/a_C00LCH 1.43 def
/b_C00LCH 0.70 def
d_C00LCHmi i d_C00LCHi i get b_C00LCH exp a_C00LCH mul put

%end special EQUATION (15)
%END CIEDE2000=C00

%BEG LABJND=C85
/Yq Y0 Y1 add 0.5 mul def
/d_Y Y1 Y0 sub def

/a085 X0 Y0 0.000001 add div def
/b085 Z0 Y0 0.000001 add div 0.4 mul neg def
/a185 X1 Y1 0.000001 add div def
/b185 Z1 Y1 0.000001 add div 0.4 mul neg def

/an85 XW YW 0.000001 add div def
/bn85 ZW YW 0.000001 add div 0.4 mul neg def

/d_a085 a085 an85 sub def
/d_b085 b085 bn85 sub def
/d_a185 a185 an85 sub def
/d_b185 b185 bn85 sub def

/a0"85 d_a085 d_a085 abs 0.5 mul 1 add div an85 add def
/b0"85 d_b085 d_b085 abs 0.5 mul 1 add div bn85 add def
/a1"85 d_a185 d_a185 abs 0.5 mul 1 add div an85 add def
/b1"85 d_b185 d_b185 abs 0.5 mul 1 add div bn85 add def

/d_Y Y1 Y0 sub def
/d_a"85 a1"85 a0"85 sub def
/d_b"85 b1"85 b0"85 sub def

/s85 0.0170 def
/q85 0.0058 def
/g85 1.0000 def %not used

/a0085 1.0 def
/b0085 1.8 def
/Y0085 1.5 def

d_C85LCHi i d_Y dup mul
            a0085 d_a"85 mul Yq mul dup mul add
            b0085 d_b"85 mul Yq mul dup mul add
            0.000001 add sqrt Y0085 mul
            q85 Yq mul s85 add div put

/a_C85LCH 1.17 def
/b_C85LCH 0.35 def
d_C85LCHmi i d_C85LCHi i get b_C85LCH exp a_C85LCH mul put

%END LABJND=C85

%BEG LABHNU_1977=C77
/S77L 1 def
/S77A 1 def
/S77B 1 def
/K77L 1 def
/K77A 1 def
/K77B 1 def
%C77a'=(x/y+1/6)**(1/3)/4
%C77b'=-(z/y+1/6)**(1/3)/12
%C77L*=L*CIE
%C77a*=500*[C77a'-C77a'n]*Y**(1/3)
%C77b*=500*[C77b'-C77b'n]*Y**(1/3)

/C77a'0 X0 Y0 FL add div 1 6 div add 0.3333 exp 4 div def
/C77a'1 X1 Y1 FL add div 1 6 div add 0.3333 exp 4 div def
/C77a'n XW YW FL add div 1 6 div add 0.3333 exp 4 div def

/C77b'0 Z0 Y0 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C77b'1 Z1 Y1 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C77b'n ZW YW FL add div 1 6 div add 0.3333 exp 12 div neg def
 
/C77a*0 C77a'0 C77a'n sub 500 mul Y0 1 3 div exp mul def
/C77a*1 C77a'1 C77a'n sub 500 mul Y1 1 3 div exp mul def
/C77b*0 C77b'0 C77b'n sub 500 mul Y0 1 3 div exp mul def
/C77b*1 C77b'1 C77b'n sub 500 mul Y1 1 3 div exp mul def


d_C77LCHi i CIEL*1 CIEL*0 sub K77L div S77L div dup mul
            C77a*1 C77a*0 sub K77A div S77A div dup mul add
            C77b*1 C77b*0 sub K77B div S77B div dup mul add
            0.00000001 add sqrt put
%END LABHNU_1977=C77

%BEG LABHNU1=C78
/S78L 1 def
/S78A 1 def
/S78B 1 def
/K78L 1 def
/K78A 1 def
/K78B 1 def
%C78a'=(x/y+1)/15
%C78b'=-(z/y+1/6)**(1/3)/12
%C78L*=L*CIE
%C78a*=500*[C78a'-C78a'n]*Y**(1/3)
%C78b*=500*[C78b'-C78b'n]*Y**(1/3)

/C78a'0 X0 Y0 FL add div 1 add 15 div def
/C78a'1 X1 Y1 FL add div 1 add 15 div def
/C78a'n XW YW FL add div 1 add 15 div def

/C78b'0 Z0 Y0 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C78b'1 Z1 Y1 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C78b'n ZW YW FL add div 1 6 div add 0.3333 exp 12 div neg def
 
/C78a*0 C78a'0 C78a'n sub 500 mul Y0 1 3 div exp mul def
/C78a*1 C78a'1 C78a'n sub 500 mul Y0 1 3 div exp mul def
/C78b*0 C78b'0 C78b'n sub 500 mul Y0 1 3 div exp mul def
/C78b*1 C78b'1 C78b'n sub 500 mul Y0 1 3 div exp mul def

d_C78LCHi i CIEL*1 CIEL*0 sub K78L div S78L div dup mul
            C78a*1 C78a*0 sub K78A div S78A div dup mul add
            C78b*1 C78b*0 sub K78B div S78B div dup mul add
            0.00000001 add sqrt put
%END LABHNU1_1978-C78

%BEG LABHNU2_1979=C79
/S79L 1 def
/S79A 1 def
/S79B 1 def
/K79L 1 def
/K79A 1 def
/K79B 1 def
%C79a'=(x/y+1/6)**(2/3)/15
%C79b'=-(z/y+1/6)**(1/3)/12
%C79L*=L*CIE
%C79a*=500*[C79a'-C79a'n]*Y**(1/3)
%C79b*=500*[C79b'-C79b'n]*Y**(1/3)

/C79a'0 X0 Y0 FL add div 1 6 div add 0.6667 exp 15 div def
/C79a'1 X1 Y1 FL add div 1 6 div add 0.6667 exp 15 div def
/C79a'n XW YW FL add div 1 6 div add 0.6667 exp 15 div def

/C79b'0 Z0 Y0 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C79b'1 Z1 Y1 FL add div 1 6 div add 0.3333 exp 12 div neg def
/C79b'n ZW YW FL add div 1 6 div add 0.3333 exp 12 div neg def
 
/C79a*0 C79a'0 C79a'n sub 500 mul Y0 1 3 div exp mul def
/C79a*1 C79a'1 C79a'n sub 500 mul Y1 1 3 div exp mul def
/C79b*0 C79b'0 C79b'n sub 500 mul Y0 1 3 div exp mul def
/C79b*1 C79b'1 C79b'n sub 500 mul Y1 1 3 div exp mul def

d_C79LCHi i CIEL*1 CIEL*0 sub K79L div S79L div dup mul
            C79a*1 C79a*0 sub K79A div S79A div dup mul add
            C79b*1 C79b*0 sub K79B div S79B div dup mul add
            0.00000001 add sqrt put
%END LABHNU2_1979=C79

} bind def %END procedure proc_coldiff
%*************************************************************

%%EndProlog
gsave

/lanind 1 def
/lantex [(G) (E) (S) (F) (I) (J) (M)] def
/showde {0 lanind eq {show} {pop} ifelse} bind def
/showen {1 lanind eq {show} {pop} ifelse} bind def
/showes {2 lanind eq {show} {pop} ifelse} bind def
/showfr {3 lanind eq {show} {pop} ifelse} bind def
/showit {4 lanind eq {show} {pop} ifelse} bind def
/showjp {5 lanind eq {show} {pop} ifelse} bind def
/showea {1 lanind le {show} {pop} ifelse} bind def

/lanindf where {pop /lanind1 lanindf def /lanind2 lanindf def
                    /lanindd laninddf def}
               {/lanind1 0 def /lanind2 0 def} ifelse
/colormf where {pop /colorm1 colormf def /colorm2 colormf def
                    /colorMD colormdf def}
               {/colorm1 0 def} ifelse
/deintpf where {pop /deintp1 deintpf def /deintp2 deintpf def
                    /deintpd deintpdf def}
               {/deintp1 0 def} ifelse
/xcolorf where {pop /xcolor1 xcolorf def /xcolor2 xcolorf def
                    /xcolord xcolordf def}
               {/xcolor1 3 def} ifelse
/xchartf where {pop /xchart1 xchartf def /xchart2 xchartf def
                    /xchartd xchartdf def
                    /xchartm xchart2f xchart1f sub 1 add def}
               {/xchart1 0 def /xchartm 1 def} ifelse
/xchart3f where {pop /xchart3 xchart3f def}
                {/xchart3 0 def} ifelse
/xchart4f where {pop /xchart4 xchart4f def}
                {/xchart4 1 def} ifelse
/pchartf where {pop /pchart1 pchartf def /pchart2 pchartf def
                    /pchartd pchartdf def}
               {/pchart1 3 def} ifelse
/colsepf where {pop /colsep1 colsepf def /colsep2 colsepf def
                    /colsepd colsepdf def}
               {/colsep1 0 def} ifelse
/pmetamf where {pop /pmetam1 pmetamf def /pmetam2 pmetamf def
                    /pmetaMD pmetamdf def}
               {/pmetam1 0 def} ifelse

%either defaul values for xchart=0 or values for xchart=1
/lanind lanind1 def %
/colorm colorm1 def %
/deintp deintp1 def %
/xcolor xcolor1 def %
/xchart xchart1 def %
/pchart pchart1 def %
/colsep colsep1 def %
/pmetam pmetam1 def %

colorm 0 eq deintp 0 eq and {/Txx (d) def /Fxx (d) def} if %colorm=0, deintp=0
colorm 0 eq deintp 1 eq and {/Txx (e) def /Fxx (e) def} if %colorm=0, deintp=1
colorm 1 eq deintp 0 eq and {/Txx (dd) def /Fxx (d) def} if %colorm=1, deintp=0
colorm 1 eq deintp 1 eq and {/Txx (de) def /Fxx (e) def} if %colorm=1, deintp=1
xchart 0 eq {/Txx (-) def /Fxx (-) def} if %always independent of intended output

/iimp 100 def
/Datasettxt (WA_0100=WANG) def
/inr000 11000000 def
/inrtxt ((11000_WA)) def

/xc0d 02 def
/xc2d 02 def
/xc4d 02 def
/xcal xc0d 1 add 2 mul
      xc2d 1 add 2 mul add
      xc4d 1 add 2 mul add
      1 sub def

/xchartl xchart def

%0 1 xc0d {/xchart exch def %xchart=0,xc0d
gsave

/iXYZLAB 0 def

/xc1a 00 def
/xc1e xc0d def

/xc2a xc1e 1 add def
/xc2e xc2a xc0d add def

/xc3a xc2e 1 add def
/xc3e xc3a xc2d add def

/xc4a xc3e 1 add def
/xc4e xc4a xc2d add def

/xc5a xc4e 1 add def
/xc5e xc5a xc4d add def

/xc6a xc5e 1 add def
/xc6e xc6a xc4d add def

xchart xc1e le                  {/iXYZLAB 0 def /xchartl xchart def} if

xchart xc2a ge
xchart xc2e le and {/iXYZLAB 1 def /xchartl xchart xc2a sub def} if

xchart xc3a ge
xchart xc3e le and {/iXYZLAB 2 def /xchartl xchart xc3a sub def} if

xchart xc4a ge
xchart xc4e le and {/iXYZLAB 3 def /xchartl xchart xc4a sub def} if

xchart xc5a ge
xchart xc5e le and {/iXYZLAB 4 def /xchartl xchart xc5a sub def} if

xchart xc6a ge
xchart xc6e le and {/iXYZLAB 5 def /xchartl xchart xc6a sub def} if

/xp0 0050 def
/xp1 6650 def
/xdel 620 def
/xdel0 650 def
/xdel1 550 def
/xdela 21 array def
/xdela
 %0   %1   %2   %3   %4   %5   %6   %7   %8   %9  %XYZS, XYZ0, XYZ1, DY
[0000 0650 1300 1950 2600 3250 3900 4550 5200 5850
 %10  %11  %12  %13  %14  %15  %16 DE*(6X)+NR
 6500 7000 7500 8000 8500 9000 9500
 %17   %18   %19   %20   %21   %22 CODE, L*, a*, b*, %
 10220 11300 11800 12300 12700] def
/ydel 160 def


%**********************************************************
%iXYZLAB 00-05: %00=XYZa, 01=LABa, 02=XYZ2 03=LAB2 04=XYZ2 05=LAB2

/textXYZ 21 array def
/textXYZ
[(%XS) (YS) (ZS) (X0) (Y0) (Z0) (X1) (Y1) (Z1) (DV)
(dE*ab) (dE*CH)
(dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def

/textLAB 21 array def
/textLAB
[(%L*0) (a*0) (b*0) (C*ab0) (hab0) 
 (L*1) (a*1) (b*1) (C*ab1) (hab1) (DV) (dE*ab)
 (dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def
 
/textXYZ2 21 array def
/textXYZ2
[(%XS2) (YS2) (ZS2) (X02) (Y02) (Z02) (X12) (Y12) (Z12) (DV2)
(dE*ab) (dE*CH)
(dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def

/textLAB2 21 array def
/textLAB2
[(%L*02) (a*02) (b*02) (C*ab02) (hab02) 
 (L*12) (a*12) (b*12) (C*ab12) (hab12) (DV2) (dE*ab)
 (dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def
 
/textXYZ4 21 array def
/textXYZ4
[(%XS4) (YS4) (ZS4) (X04) (Y04) (Z04) (X14) (Y14) (Z14) (DV4)
(dE*ab) (dE*CH)
(dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def

/textLAB4 21 array def
/textLAB4
[(%L*04) (a*04) (b*04) (C*ab04) (hab04) 
 (L*14) (a*14) (b*14) (C*ab14) (hab14) (DV4) (dE*ab)
 (dE*94) (dE*CM) (dE*00) (dE*85) (NR) (Code) (L*) (a*) (b*)] def

%**********************************************************

/D13 1 3 div def
/D841_108 841 108 div def
/D4_29 4 29 div def
/D6_29 6 29 div 3 exp def

%calculated data: CIELAB01ai, 2800 x 10 dat = 28000
/WXYZR01Vai 28000 array def %CIEXYZ
/CIELAB01ai 28000 array def %CIELAB
/C00LAB01ai 28000 array def %CIE DE2000

/d_CIELAB0i  2800 array def %CIELAB
/d_CIELCH0i  2800 array def %CIELCH
/d_C94LCH0i  2800 array def %CIE94
/d_CMCLCH0i  2800 array def %CMC
/d_C00LCH0i  2800 array def %CIEDE2000
/d_C85LCH0i  2800 array def %LABJND 1985

/WXYZR01V2i 28000 array def %CIEXYZ
/CIELAB012i 28000 array def %CIELAB
/C00LAB012i 28000 array def %CIE DE2000
/d_CIELAB2i  2800 array def %CIELAB
/d_CIELCH2i  2800 array def %CIELCH
/d_C94LCH2i  2800 array def %CIE94
/d_CMCLCH2i  2800 array def %CMC
/d_C00LCH2i  2800 array def %CIEDE2000
/d_C85LCH2i  2800 array def %LABJND 1985

/WXYZR01V4i 28000 array def %CIEXYZ
/CIELAB014i 28000 array def %CIELAB
/C00LAB014i 28000 array def %CIE DE2000
/d_CIELAB4i  2800 array def %CIELAB
/d_CIELCH4i  2800 array def %CIELCH
/d_C94LCH4i  2800 array def %CIE94
/d_CMCLCH4i  2800 array def %CMC
/d_C00LCH4i  2800 array def %CIEDE2000
/d_C85LCH4i  2800 array def %LABJND 1985

/iai -1 def %count d_CIELAB all
/i2i -1 def %count d_CIELAB<=2
/i4i -1 def %count d_C00LAB<=2

/dVsuma 0 def
/dVsum2 0 def
/dVsum4 0 def

/d_CIELABmina 2800 def
/d_CIELABmaxa 0 def
/d_CIELABsuma 0 def
/d_CIELABVsuma 0 def

/d_CIELCHmina 2800 def
/d_CIELCHmaxa 0 def
/d_CIELCHsuma 0 def
/d_CIELCHVsuma 0 def
/d_C94LCHmina 2800 def
/d_C94LCHmaxa 0 def
/d_C94LCHsuma 0 def
/d_C94LCHVsuma 0 def
/d_CMCLCHmina 2800 def
/d_CMCLCHmaxa 0 def
/d_CMCLCHsuma 0 def
/d_CMCLCHVsuma 0 def
/d_C00LCHmina 2800 def
/d_C00LCHmaxa 0 def
/d_C00LCHsuma 0 def
/d_C00LCHVsuma 0 def
/d_C85LCHmina 2800 def
/d_C85LCHmaxa 0 def
/d_C85LCHsuma 0 def
/d_C85LCHVsuma 0 def

/d_CIELABmin2 2800 def
/d_CIELABmax2 0 def
/d_CIELABsum2 0 def
/d_CIELABVsum2 0 def

/d_CIELCHmin2 2800 def
/d_CIELCHmax2 0 def
/d_CIELCHsum2 0 def
/d_CIELCHVsum2 0 def
/d_C94LCHmin2 2800 def
/d_C94LCHmax2 0 def
/d_C94LCHsum2 0 def
/d_C94LCHVsum2 0 def
/d_CMCLCHmin2 2800 def
/d_CMCLCHmax2 0 def
/d_CMCLCHsum2 0 def
/d_CMCLCHVsum2 0 def
/d_C00LCHmin2 2800 def
/d_C00LCHmax2 0 def
/d_C00LCHsum2 0 def
/d_C00LCHVsum2 0 def
/d_C85LCHmin2 2800 def
/d_C85LCHmax2 0 def
/d_C85LCHsum2 0 def
/d_C85LCHVsum2 0 def

/d_CIELABmin4 2800 def
/d_CIELABmax4 0 def
/d_CIELABsum4 0 def
/d_CIELABVsum4 0 def

/d_CIELCHmin4 2800 def
/d_CIELCHmax4 0 def
/d_CIELCHsum4 0 def
/d_CIELCHVsum4 0 def
/d_C94LCHmin4 2800 def
/d_C94LCHmax4 0 def
/d_C94LCHsum4 0 def
/d_C94LCHVsum4 0 def
/d_CMCLCHmin4 2800 def
/d_CMCLCHmax4 0 def
/d_CMCLCHsum4 0 def
/d_CMCLCHVsum4 0 def
/d_C00LCHmin4 2800 def
/d_C00LCHmax4 0 def
/d_C00LCHsum4 0 def
/d_C00LCHVsum4 0 def
/d_C85LCHmin4 2800 def
/d_C85LCHmax4 0 def
/d_C85LCHsum4 0 def
/d_C85LCHVsum4 0 def

%STOP1
/iim iimp 1 sub def

/iimax iim 50 idiv def %=1 for iimp=100
/iimm1 iimax 1 sub def
/iimp1 iimax 1 add def

0 1 iimax {/ii exch def %ii=0,iimax

/i1 50 ii mul def
/i2 i1 49 add def

ii iimax eq {/i2 iim def} if

i1 1 i2 {/i exch def %i=i1,i2

/i10 i 10 mul def

/XW WData0 i10 0 add get def
/YW WData0 i10 1 add get def
/ZW WData0 i10 2 add get def

/X0 WData0 i10 3 add get def
/Y0 WData0 i10 4 add get def
/Z0 WData0 i10 5 add get def

/X1 WData0 i10 6 add get def
/Y1 WData0 i10 7 add get def
/Z1 WData0 i10 8 add get def

proc_coldiff

/d_CIELAB d_CIELABi i get def
/d_CIELCH d_CIELCHi i get def
/d_C94LCH d_C94LCHi i get def
/d_CMCLCH d_CMCLCHi i get def
/d_C00LCH d_C00LCHi i get def
/d_C85LCH d_C85LCHi i get def

CIELAB01ai i10 0 add CIEL*0   put
CIELAB01ai i10 1 add CIEa*0   put
CIELAB01ai i10 2 add CIEb*0   put
CIELAB01ai i10 3 add CIEC*ab0 put
CIELAB01ai i10 4 add CIEhab0  put
CIELAB01ai i10 5 add CIEL*1   put
CIELAB01ai i10 6 add CIEa*1   put
CIELAB01ai i10 7 add CIEb*1   put
CIELAB01ai i10 8 add CIEC*ab1 put
CIELAB01ai i10 9 add CIEhab1  put

C00LAB01ai i10 0 add CIEL*0   put
C00LAB01ai i10 1 add CIEa*0   put
C00LAB01ai i10 2 add CIEb*0   put
C00LAB01ai i10 3 add CIEC*ab0 put
C00LAB01ai i10 4 add CIEhab0  put
C00LAB01ai i10 5 add CIEL*1   put
C00LAB01ai i10 6 add CIEa*1   put
C00LAB01ai i10 7 add CIEb*1   put
C00LAB01ai i10 8 add CIEC*ab1 put
C00LAB01ai i10 9 add CIEhab1  put

xchart4 0 eq {%xchart4=0,1
d_CIELAB0i i d_CIELABi i get put
d_CIELCH0i i d_CIELCHi i get put
d_C94LCH0i i d_C94LCHi i get put
d_CMCLCH0i i d_CMCLCHi i get put
d_C00LCH0i i d_C00LCHi i get put
d_C85LCH0i i d_C85LCHi i get put
             }%xchart4=0
             {%xchart4=1
d_CIELAB0i i d_CIELABmi i get put
d_CIELCH0i i d_CIELCHmi i get put
d_C94LCH0i i d_C94LCHmi i get put
d_CMCLCH0i i d_CMCLCHmi i get put
d_C00LCH0i i d_C00LCHmi i get put
d_C85LCH0i i d_C85LCHmi i get put
             } ifelse %xchart4=0,1

%STOP31b
%always
/iai iai 1 add def
d_CIELAB d_CIELABmina lt {/d_CIELABmina d_CIELAB def} if
d_CIELAB d_CIELABmaxa gt {/d_CIELABmaxa d_CIELAB def} if
/d_CIELABsuma d_CIELABsuma d_CIELAB add def

d_CIELCH d_CIELCHmina lt {/d_CIELCHmina d_CIELCH def} if
d_CIELCH d_CIELCHmaxa gt {/d_CIELCHmaxa d_CIELCH def} if
/d_CIELCHsuma d_CIELCHsuma d_CIELCH add def

d_C94LCH d_C94LCHmina lt {/d_C94LCHmina d_C94LCH def} if
d_C94LCH d_C94LCHmaxa gt {/d_C94LCHmaxa d_C94LCH def} if
/d_C94LCHsuma d_C94LCHsuma d_C94LCH add def

d_CMCLCH d_CMCLCHmina lt {/d_CMCLCHmina d_CMCLCH def} if
d_CMCLCH d_CMCLCHmaxa gt {/d_CMCLCHmaxa d_CMCLCH def} if
/d_CMCLCHsuma d_CMCLCHsuma d_CMCLCH add def

d_C00LCH d_C00LCHmina lt {/d_C00LCHmina d_C00LCH def} if
d_C00LCH d_C00LCHmaxa gt {/d_C00LCHmaxa d_C00LCH def} if
/d_C00LCHsuma d_C00LCHsuma d_C00LCH add def

d_C85LCH d_C85LCHmina lt {/d_C85LCHmina d_C85LCH def} if
d_C85LCH d_C85LCHmaxa gt {/d_C85LCHmaxa d_C85LCH def} if
/d_C85LCHsuma d_C85LCHsuma d_C85LCH add def

/dVsuma dVsuma WData0 i10 9 add get add def

%save data in array
0 1 09 {/j exch def %j=0,09
WXYZR01Vai i10 j add WData0 i10 j add get put
} for %j=0,09

%STOP5
d_CIELAB 2 le {%d_CIELAB<=2

/i2i i2i 1 add def
/i2i10 i2i 10 mul def
CIELAB012i i2i10 0 add CIEL*0   put
CIELAB012i i2i10 1 add CIEa*0   put
CIELAB012i i2i10 2 add CIEb*0   put
CIELAB012i i2i10 3 add CIEC*ab0 put
CIELAB012i i2i10 4 add CIEhab0  put
CIELAB012i i2i10 5 add CIEL*1   put
CIELAB012i i2i10 6 add CIEa*1   put
CIELAB012i i2i10 7 add CIEb*1   put
CIELAB012i i2i10 8 add CIEC*ab1 put
CIELAB012i i2i10 9 add CIEhab1  put

xchart4 0 eq {%xchart4=0,1
d_CIELAB2i i2i d_CIELABi i get put
d_CIELCH2i i2i d_CIELCHi i get put
d_C94LCH2i i2i d_C94LCHi i get put
d_CMCLCH2i i2i d_CMCLCHi i get put
d_C00LCH2i i2i d_C00LCHi i get put
d_C85LCH2i i2i d_C85LCHi i get put
             }%xchart4=0
             {%xchart4=1
d_CIELAB2i i2i d_CIELABmi i get put
d_CIELCH2i i2i d_CIELCHmi i get put
d_C94LCH2i i2i d_C94LCHmi i get put
d_CMCLCH2i i2i d_CMCLCHmi i get put
d_C00LCH2i i2i d_C00LCHmi i get put
d_C85LCH2i i2i d_C85LCHmi i get put
             } ifelse %xchart4=0,1

%always
d_CIELAB d_CIELABmin2 lt {/d_CIELABmin2 d_CIELAB def} if
d_CIELAB d_CIELABmax2 gt {/d_CIELABmax2 d_CIELAB def} if
/d_CIELABsum2 d_CIELABsum2 d_CIELAB add def

d_CIELCH d_CIELCHmin2 lt {/d_CIELCHmin2 d_CIELCH def} if
d_CIELCH d_CIELCHmax2 gt {/d_CIELCHmax2 d_CIELCH def} if
/d_CIELCHsum2 d_CIELCHsum2 d_CIELCH add def

d_C94LCH d_C94LCHmin2 lt {/d_C94LCHmin2 d_C94LCH def} if
d_C94LCH d_C94LCHmax2 gt {/d_C94LCHmax2 d_C94LCH def} if
/d_C94LCHsum2 d_C94LCHsum2 d_C94LCH add def

d_CMCLCH d_CMCLCHmin2 lt {/d_CMCLCHmin2 d_CMCLCH def} if
d_CMCLCH d_CMCLCHmax2 gt {/d_CMCLCHmax2 d_CMCLCH def} if
/d_CMCLCHsum2 d_CMCLCHsum2 d_CMCLCH add def

d_C00LCH d_C00LCHmin2 lt {/d_C00LCHmin2 d_C00LCH def} if
d_C00LCH d_C00LCHmax2 gt {/d_C00LCHmax2 d_C00LCH def} if
/d_C00LCHsum2 d_C00LCHsum2 d_C00LCH add def

d_C85LCH d_C85LCHmin2 lt {/d_C85LCHmin2 d_C85LCH def} if
d_C85LCH d_C85LCHmax2 gt {/d_C85LCHmax2 d_C85LCH def} if
/d_C85LCHsum2 d_C85LCHsum2 d_C85LCH add def

/dVsum2 dVsum2 WData0 i10 9 add get add def

%save data in array
0 1 09 {/j exch def %j=0,09
WXYZR01V2i i10 j add WData0 i10 j add get put
} for %j=0,09

} if %d_CIELAB<=2

d_C00LCH 2 le {%d_C00LCH<=2

/i4i i4i 1 add def
/i4i10 i4i 10 mul def
CIELAB014i i4i10 0 add CIEL*0   put
CIELAB014i i4i10 1 add CIEa*0   put
CIELAB014i i4i10 2 add CIEb*0   put
CIELAB014i i4i10 3 add CIEC*ab0 put
CIELAB014i i4i10 4 add CIEhab0  put
CIELAB014i i4i10 5 add CIEL*1   put
CIELAB014i i4i10 6 add CIEa*1   put
CIELAB014i i4i10 7 add CIEb*1   put
CIELAB014i i4i10 8 add CIEC*ab1 put
CIELAB014i i4i10 9 add CIEhab1  put

xchart4 0 eq {%xchart4=0,1
d_CIELAB4i i4i d_CIELABi i get put
d_CIELCH4i i4i d_CIELCHi i get put
d_C94LCH4i i4i d_C94LCHi i get put
d_CMCLCH4i i4i d_CMCLCHi i get put
d_C00LCH4i i4i d_C00LCHi i get put
d_C85LCH4i i4i d_C85LCHi i get put
             }%xchart4=0
             {%xchart4=1
d_CIELAB4i i4i d_CIELABmi i get put
d_CIELCH4i i4i d_CIELCHmi i get put
d_C94LCH4i i4i d_C94LCHmi i get put
d_CMCLCH4i i4i d_CMCLCHmi i get put
d_C00LCH4i i4i d_C00LCHmi i get put
d_C85LCH4i i4i d_C85LCHmi i get put
             } ifelse %xchart4=0,1

%always
d_CIELAB d_CIELABmin4 lt {/d_CIELABmin4 d_CIELAB def} if
d_CIELAB d_CIELABmax4 gt {/d_CIELABmax4 d_CIELAB def} if
/d_CIELABsum4 d_CIELABsum4 d_CIELAB add def

d_CIELCH d_CIELCHmin4 lt {/d_CIELCHmin4 d_CIELCH def} if
d_CIELCH d_CIELCHmax4 gt {/d_CIELCHmax4 d_CIELCH def} if
/d_CIELCHsum4 d_CIELCHsum4 d_CIELCH add def

d_C94LCH d_C94LCHmin4 lt {/d_C94LCHmin4 d_C94LCH def} if
d_C94LCH d_C94LCHmax4 gt {/d_C94LCHmax4 d_C94LCH def} if
/d_C94LCHsum4 d_C94LCHsum4 d_C94LCH add def

d_CMCLCH d_CMCLCHmin4 lt {/d_CMCLCHmin4 d_CMCLCH def} if
d_CMCLCH d_CMCLCHmax4 gt {/d_CMCLCHmax4 d_CMCLCH def} if
/d_CMCLCHsum4 d_CMCLCHsum4 d_CMCLCH add def

d_C00LCH d_C00LCHmin4 lt {/d_C00LCHmin4 d_C00LCH def} if
d_C00LCH d_C00LCHmax4 gt {/d_C00LCHmax4 d_C00LCH def} if
/d_C00LCHsum4 d_C00LCHsum4 d_C00LCH add def

d_C85LCH d_C85LCHmin4 lt {/d_C85LCHmin4 d_C85LCH def} if
d_C85LCH d_C85LCHmax4 gt {/d_C85LCHmax4 d_C85LCH def} if
/d_C85LCHsum4 d_C85LCHsum4 d_C85LCH add def

/dVsum4 dVsum4 WData0 i10 9 add get add def

%save data in array
0 1 09 {/j exch def %j=0,09
WXYZR01V4i i10 j add WData0 i10 j add get put
} for %j=0,09

} if %d_C00LCH<=2

%STOP5a

} for %i=i1,i2

%STOP5b

} for %ii=0,iimax

%STOP6

%**************************************************
iXYZLAB 0 ge iXYZLAB 1 le and {/iim iai def
                               /iimax iim 50 idiv def} if
iXYZLAB 2 ge iXYZLAB 3 le and {/iim i2i def
                               /iimax i2i 50 idiv def} if
iXYZLAB 4 ge iXYZLAB 5 le and {/iim i4i def
                               /iimax i4i 50 idiv def} if

/ii xchartl def

/iimaxP1 iimax 1 add def

5 /Times-ISOL1 FS
/cvishow {cvi 6 string cvs show} def
75 85 moveto
lanind cvishow (-) show
colorm cvishow
deintp cvishow
xcolor cvishow
xchart cvishow
pchart cvishow
colsep cvishow (-L) show pmetam cvishow


5 /Times-ISOL1 FS
700 85 moveto
(XG710-7N) show
(_) show iXYZLAB cvishow (_) show ii cvishow

72 90 translate

/yhoe 8500 def
0.02 MM dup scale

15 setlinewidth
0.0 0.0 0.0 0.0 setcmyk_olvcolor
0 0  moveto 12700 0 rlineto 0 yhoe rlineto -12700 0 rlineto
closepath fill
0.0 0.0 0.0 1.0 setcmyk_olvcolor
 0 0  moveto 12700 0 rlineto 0 yhoe rlineto -12700 0 rlineto
closepath stroke

CBSK
xp0 yhoe ydel 0.9 mul sub moveto

iXYZLAB 0 eq iXYZLAB 2 eq or iXYZLAB 4 eq or {%iXYZLAB=0,2,4
0 1 20 {/k exch def %k=0,20
xp0 xdela k get add yhoe ydel 0.9 mul sub moveto
iXYZLAB 0 eq {textXYZ k get show} if
iXYZLAB 2 eq {textXYZ2 k get show} if
iXYZLAB 4 eq {textXYZ4 k get show} if
} for %k=0,20
} if %iXYZLAB=0,2,4

iXYZLAB 1 eq iXYZLAB 3 eq or iXYZLAB 5 eq  or {%iXYZLAB=1,3,5
0 1 20 {/k exch def %k=0,20
xp0 xdela k get add yhoe ydel 0.9 mul sub moveto
iXYZLAB 1 eq {textLAB k get show} if
iXYZLAB 3 eq {textLAB2 k get show} if
iXYZLAB 5 eq {textLAB4 k get show} if
} for %k=0,20
} if %iXYZLAB=1,3,5
( %) show

xp0 yhoe ydel 1.9 mul sub moveto
iXYZLAB 0 eq 
{(%1000*CIEXYZ & 100*dE* data for all colour (a) of experiment) show} if
iXYZLAB 1 eq
{(%CIELAB data for all colour (a) of experiment) show} if
iXYZLAB 2 eq
{(%1000*CIEXYZ & 100*dE* data for colours (2) of experiment with CIELAB dE*ab<=2) show} if
iXYZLAB 3 eq
{(%CIELAB data for colours (2) of experiment with CIELAB dE*ab<=2) show} if
iXYZLAB 4 eq
{(%1000*CIEXYZ & 100*dE* data for colours (4) of experiment with CIE DE2000 dE*<=2) show} if
iXYZLAB 5 eq
{(%CIELAB data for colours (4) of experiment with CIE DE2000 dE*<=2) show} if
(, iimp=) show iimp cvishow (, colour difference pairs ) show
Datasettxt show
xchart4 1 eq {(_PF) show} if
( %) show

ii iimaxP1 lt {%ii<iimaxP1

CSK
/i1 50 ii mul def
/i2 i1 49 add def

ii iimax eq {/i2 iim def} if

i1 1 i2 {/i exch def %i=i1,i2
/i10 i 10 mul def
/yhot yhoe ydel 1 mul sub def

%output of data
/i10 i 10 mul def
0 1 08 {/j exch def %j=0,08
xp0 xdela j get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {WXYZR01Vai i10 j add get cvi36show} if
iXYZLAB 1 eq {CIELAB01ai i10 j add get cvsshow2 } if
iXYZLAB 2 eq {WXYZR01V2i i10 j add get cvi36show} if
iXYZLAB 3 eq {CIELAB012i i10 j add get cvsshow2 } if
iXYZLAB 4 eq {WXYZR01V4i i10 j add get cvi36show} if
iXYZLAB 5 eq {CIELAB014i i10 j add get cvsshow2 } if
} for %j=0,08

xp0 xdela 9 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {WXYZR01Vai i10 9 add get cvi36show} if %ANGLE
iXYZLAB 1 eq {CIELAB01ai i10 9 add get cvsshow1 } if
iXYZLAB 2 eq {WXYZR01V2i i10 9 add get cvi36show} if %ANGLE
iXYZLAB 3 eq {CIELAB012i i10 9 add get cvsshow1 } if
iXYZLAB 4 eq {WXYZR01V4i i10 9 add get cvi36show} if %ANGLE
iXYZLAB 5 eq {CIELAB014i i10 9 add get cvsshow1 } if

xp0 xdela 10 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_CIELAB0i i get cvi24show} if
iXYZLAB 1 eq {WXYZR01Vai i10 9 add get cvsshow2} if
iXYZLAB 2 eq {d_CIELAB2i i get cvi24show} if
iXYZLAB 3 eq {WXYZR01V2i i10 9 add get cvsshow2} if
iXYZLAB 4 eq {d_CIELAB4i i get cvi24show} if
iXYZLAB 5 eq {WXYZR01V4i i10 9 add get cvsshow2} if

xp0 xdela 11 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_CIELCH0i i get cvi24show} if
iXYZLAB 1 eq {d_CIELAB0i i get cvsshow2} if
iXYZLAB 2 eq {d_CIELCH2i i get cvi24show} if
iXYZLAB 3 eq {d_CIELAB2i i get cvsshow2} if
iXYZLAB 4 eq {d_CIELCH4i i get cvi24show} if
iXYZLAB 5 eq {d_CIELAB4i i get cvsshow2} if

xp0 xdela 12 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_C94LCH0i i get cvi24show} if
iXYZLAB 1 eq {d_C94LCH0i i get cvsshow2} if
iXYZLAB 2 eq {d_C94LCH2i i get cvi24show} if
iXYZLAB 3 eq {d_C94LCH2i i get cvsshow2} if
iXYZLAB 4 eq {d_C94LCH4i i get cvi24show} if
iXYZLAB 5 eq {d_C94LCH4i i get cvsshow2} if

xp0 xdela 13 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_CMCLCH0i i get cvi24show} if
iXYZLAB 1 eq {d_CMCLCH0i i get cvsshow2} if
iXYZLAB 2 eq {d_CMCLCH2i i get cvi24show} if
iXYZLAB 3 eq {d_CMCLCH2i i get cvsshow2} if
iXYZLAB 4 eq {d_CMCLCH4i i get cvi24show} if
iXYZLAB 5 eq {d_CMCLCH4i i get cvsshow2} if

xp0 xdela 14 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_C00LCH0i i get cvi24show} if
iXYZLAB 1 eq {d_C00LCH0i i get cvsshow2} if
iXYZLAB 2 eq {d_C00LCH2i i get cvi24show} if
iXYZLAB 3 eq {d_C00LCH2i i get cvsshow2} if
iXYZLAB 4 eq {d_C00LCH4i i get cvi24show} if
iXYZLAB 5 eq {d_C00LCH4i i get cvsshow2} if

xp0 xdela 15 get add yhot ydel i i1 sub 2 add mul sub moveto
iXYZLAB 0 eq {d_C85LCH0i i get cvi24show} if
iXYZLAB 1 eq {d_C85LCH0i i get cvsshow2} if
iXYZLAB 2 eq {d_C85LCH2i i get cvi24show} if
iXYZLAB 3 eq {d_C85LCH2i i get cvsshow2} if
iXYZLAB 4 eq {d_C85LCH4i i get cvi24show} if
iXYZLAB 5 eq {d_C85LCH4i i get cvsshow2} if

/cvi9show {cvi 9 string cvs show} def
xp0 xdela 16 get add yhot ydel i i1 sub 2 add mul sub moveto
inr000 i add cvi9show

xp0 xdela 17 get add yhot ydel i i1 sub 2 add mul sub moveto
inrtxt show

/xdelx 200 def
xp0 xdela 18 get add xdelx sub yhot ydel i i1 sub 2 add mul sub moveto
CIELAB01ai i10 0 add get
CIELAB01ai i10 5 add get add 0.5 mul cvi02xshow
xp0 xdela 19 get add xdelx sub yhot ydel i i1 sub 2 add mul sub moveto
CIELAB01ai i10 1 add get
CIELAB01ai i10 6 add get add 0.5 mul cvi03xshow
xp0 xdela 20 get add xdelx sub yhot ydel i i1 sub 2 add mul sub moveto
CIELAB01ai i10 2 add get
CIELAB01ai i10 7 add get add 0.5 mul cvi03xshow
xp0 xdela 21 get add xdelx sub yhot ydel i i1 sub 2 add mul sub moveto
(%) show

%*******************************************

} for %i=i1,i2

} if %ii<iimaxP1

ii iimaxP1 eq { %ii=iimaxP1
/yhot yhoe ydel 1 mul sub def

100 yhot ydel 2 mul sub moveto
(Minimum, maximum and average colour difference value) show
100 yhot ydel 3 mul sub moveto
(STRESS constant F and STRESS value S) show

iXYZLAB 0 eq iXYZLAB 1 eq or {%iXYZLAB=0,1
/iim iai def

/d_CIELABavea d_CIELABsuma iai 1 add div def
100 yhot ydel 4 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_CIELABmina = ) show d_CIELABmina cvsshow2
(, d_CIELABmaxa = ) show d_CIELABmaxa cvsshow2
(, d_CIELABavea = ) show d_CIELABavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CIELAB0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CIELAB0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 5.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, CIELAB_Fa = ) show FSa cvsshow2
(, CIELAB_STRESSa = ) show SSa cvsshow2

%***********************************************
%CIELCH
/d_CIELCHavea d_CIELCHsuma iai 1 add div def
100 yhot ydel 07 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_CIELCHmina = ) show d_CIELCHmina cvsshow2
(, d_CIELCHmaxa = ) show d_CIELCHmaxa cvsshow2
(, d_CIELCHavea = ) show d_CIELCHavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CIELCH0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CIELCH0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 8.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, CIELCHFa = ) show FSa cvsshow2
(, CIELCHSTRESSa = ) show SSa cvsshow2

%***********************************************
%C94LCH
/d_C94LCHavea d_C94LCHsuma iai 1 add div def
100 yhot ydel 10 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_C94LCHmina = ) show d_C94LCHmina cvsshow2
(, d_C94LCHmaxa = ) show d_C94LCHmaxa cvsshow2
(, d_C94LCHavea = ) show d_C94LCHavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C94LCH0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C94LCH0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 11.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, C94LCHFa = ) show FSa cvsshow2
(, C94LCHSTRESSa = ) show SSa cvsshow2

%***********************************************
%CMCLCH
/d_CMCLCHavea d_CMCLCHsuma iai 1 add div def
100 yhot ydel 13 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_CMCLCHmina = ) show d_CMCLCHmina cvsshow2
(, d_CMCLCHmaxa = ) show d_CMCLCHmaxa cvsshow2
(, d_CMCLCHavea = ) show d_CMCLCHavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CMCLCH0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_CMCLCH0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 14.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, CMCLCHFa = ) show FSa cvsshow2
(, CMCLCHSTRESSa = ) show SSa cvsshow2

%***********************************************
%C00LCH
/d_C00LCHavea d_C00LCHsuma iai 1 add div def
100 yhot ydel 16 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_C00LCHmina = ) show d_C00LCHmina cvsshow2
(, d_C00LCHmaxa = ) show d_C00LCHmaxa cvsshow2
(, d_C00LCHavea = ) show d_C00LCHavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C00LCH0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C00LCH0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 17.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, C00LCHFa = ) show FSa cvsshow2
(, C00LCHSTRESSa = ) show SSa cvsshow2

%***********************************************
%C85LCH
/d_C85LCHavea d_C85LCHsuma iai 1 add div def
100 yhot ydel 19 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, d_C85LCHmina = ) show d_C85LCHmina cvsshow2
(, d_C85LCHmaxa = ) show d_C85LCHmaxa cvsshow2
(, d_C85LCHavea = ) show d_C85LCHavea cvsshow2

/dEaiVai 0 def
/dVaiVai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C85LCH0i i get def
         /dEaiVai dEaiVai dEai dVai mul add def
         /dVaiVai dVaiVai dVai dVai mul add def
        } for %i=0,iim
/FSa dEaiVai dVaiVai div def

/dEaiMFVai2 0 def
/dEaiEai 0 def
0 1 iim {/i exch def %i=0,iim
         /dVai WXYZR01Vai i 10 mul 09 add get def
         /dEai d_C85LCH0i i get def
         /dEaiMFVai2 dEaiMFVai2 dEai FSa dVai mul sub dup mul add def
         /dEaiEai dEaiEai dEai dEai mul add def
        } for %i=0,iim
/SSa dEaiMFVai2 dEaiEai div 0.000001 add sqrt 100 mul def

100 yhot ydel 20.2 mul sub moveto
(iai+1 = ) show iai 1 add cvishow
(, C85LCHFa = ) show FSa cvsshow2
(, C85LCHSTRESSa = ) show SSa cvsshow2

} if %iXYZLAB=0,1

%***********************************************
iXYZLAB 2 eq iXYZLAB 3 eq or {%iXYZLAB=2,3
/iim i2i def

/d_CIELABave2 d_CIELABsum2 i2i 1 add div def
100 yhot ydel 4 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_CIELABmin2 = ) show d_CIELABmin2 cvsshow2
(, d_CIELABmax2 = ) show d_CIELABmax2 cvsshow2
(, d_CIELABave2 = ) show d_CIELABave2 cvsshow2

%STOPa
/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CIELAB2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def
%STOP
/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CIELAB2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 5.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, CIELABF2 = ) show FS2 cvsshow2
(, CIELABSTRESS2 = ) show SS2 cvsshow2

%***********************************************
%CIELCH
/d_CIELCHave2 d_CIELCHsum2 i2i 1 add div def
100 yhot ydel 07 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_CIELCHmin2 = ) show d_CIELCHmin2 cvsshow2
(, d_CIELCHmax2 = ) show d_CIELCHmax2 cvsshow2
(, d_CIELCHave2 = ) show d_CIELCHave2 cvsshow2

/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CIELCH2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def
%STOPa2
/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CIELCH2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 08.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, CIELCHF2 = ) show FS2 cvsshow2
(, CIELCHSTRESS2 = ) show SS2 cvsshow2

%STOPb
%***********************************************
%C94LCH
/d_C94LCHave2 d_C94LCHsum2 i2i 1 add div def
100 yhot ydel 10 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_C94LCHmin2 = ) show d_C94LCHmin2 cvsshow2
(, d_C94LCHmax2 = ) show d_C94LCHmax2 cvsshow2
(, d_C94LCHave2 = ) show d_C94LCHave2 cvsshow2

/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C94LCH2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def

/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C94LCH2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 11.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, C94LCHF2 = ) show FS2 cvsshow2
(, C94LCHSTRESS2 = ) show SS2 cvsshow2

%***********************************************
%CMCLCH
/d_CMCLCHave2 d_CMCLCHsum2 i2i 1 add div def
100 yhot ydel 13 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_CMCLCHmin2 = ) show d_CMCLCHmin2 cvsshow2
(, d_CMCLCHmax2 = ) show d_CMCLCHmax2 cvsshow2
(, d_CMCLCHave2 = ) show d_CMCLCHave2 cvsshow2

/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CMCLCH2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def

/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_CMCLCH2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 14.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, CMCLCHF2 = ) show FS2 cvsshow2
(, CMCLCHSTRESS2 = ) show SS2 cvsshow2

%***********************************************
%C00LCH
/d_C00LCHave2 d_C00LCHsum2 i2i 1 add div def
100 yhot ydel 16 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_C00LCHmin2 = ) show d_C00LCHmin2 cvsshow2
(, d_C00LCHmax2 = ) show d_C00LCHmax2 cvsshow2
(, d_C00LCHave2 = ) show d_C00LCHave2 cvsshow2

/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C00LCH2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def

/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C00LCH2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 17.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, C00LCHF2 = ) show FS2 cvsshow2
(, C00LCHSTRESS2 = ) show SS2 cvsshow2

%***********************************************
%C85LCH
/d_C85LCHave2 d_C85LCHsum2 i2i 1 add div def
100 yhot ydel 19 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, d_C85LCHmin2 = ) show d_C85LCHmin2 cvsshow2
(, d_C85LCHmax2 = ) show d_C85LCHmax2 cvsshow2
(, d_C85LCHave2 = ) show d_C85LCHave2 cvsshow2

/dE2iV2i 0 def
/dV2iV2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C85LCH2i i get def
         /dE2iV2i dE2iV2i dE2i dV2i mul add def
         /dV2iV2i dV2iV2i dV2i dV2i mul add def
        } for %i=0,iim
/FS2 dE2iV2i dV2iV2i div def

/dE2iMFV2i2 0 def
/dE2iE2i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV2i WXYZR01V2i i 10 mul 09 add get def
         /dE2i d_C85LCH2i i get def
         /dE2iMFV2i2 dE2iMFV2i2 dE2i FS2 dV2i mul sub dup mul add def
         /dE2iE2i dE2iE2i dE2i dE2i mul add def
        } for %i=0,iim
/SS2 dE2iMFV2i2 dE2iE2i div 0.000001 add sqrt 100 mul def

100 yhot ydel 20.2 mul sub moveto
(i2i+1 = ) show i2i 1 add cvishow
(, C85LCHF2 = ) show FS2 cvsshow2
(, C85LCHSTRESS2 = ) show SS2 cvsshow2

} if %iXYZLAB=2,3

%***********************************************
iXYZLAB 4 eq iXYZLAB 5 eq or {%iXYZLAB=4,5
/iim i4i def

/d_CIELABave4 d_CIELABsum4 i4i 1 add div def
100 yhot ydel 4 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_CIELABmin4 = ) show d_CIELABmin4 cvsshow2
(, d_CIELABmax4 = ) show d_CIELABmax4 cvsshow2
(, d_CIELABave4 = ) show d_CIELABave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CIELAB4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def

/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CIELAB4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 5.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, CIELABF4 = ) show FS4 cvsshow2
(, CIELABSTRESS4 = ) show SS4 cvsshow2

%***********************************************
%CIELCH
/d_CIELCHave4 d_CIELCHsum4 i4i 1 add div def
100 yhot ydel 07 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_CIELCHmin4 = ) show d_CIELCHmin4 cvsshow2
(, d_CIELCHmax4 = ) show d_CIELCHmax4 cvsshow2
(, d_CIELCHave4 = ) show d_CIELCHave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CIELCH4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def
%STOPa2
/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CIELCH4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 08.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, CIELCHF4 = ) show FS4 cvsshow2
(, CIELCHSTRESS4 = ) show SS4 cvsshow2

%STOPb
%***********************************************
%C94LCH
/d_C94LCHave4 d_C94LCHsum4 i4i 1 add div def
100 yhot ydel 10 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_C94LCHmin4 = ) show d_C94LCHmin4 cvsshow2
(, d_C94LCHmax4 = ) show d_C94LCHmax4 cvsshow2
(, d_C94LCHave4 = ) show d_C94LCHave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C94LCH4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def

/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C94LCH4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 11.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, C94LCHF4 = ) show FS4 cvsshow2
(, C94LCHSTRESS4 = ) show SS4 cvsshow2

%***********************************************
%CMCLCH
/d_CMCLCHave4 d_CMCLCHsum4 i4i 1 add div def
100 yhot ydel 13 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_CMCLCHmin4 = ) show d_CMCLCHmin4 cvsshow2
(, d_CMCLCHmax4 = ) show d_CMCLCHmax4 cvsshow2
(, d_CMCLCHave4 = ) show d_CMCLCHave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CMCLCH4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def

/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_CMCLCH4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 14.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, CMCLCHF4 = ) show FS4 cvsshow2
(, CMCLCHSTRESS4 = ) show SS4 cvsshow2

%***********************************************
%C00LCH
/d_C00LCHave4 d_C00LCHsum4 i4i 1 add div def
100 yhot ydel 16 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_C00LCHmin4 = ) show d_C00LCHmin4 cvsshow2
(, d_C00LCHmax4 = ) show d_C00LCHmax4 cvsshow2
(, d_C00LCHave4 = ) show d_C00LCHave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C00LCH4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def

/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C00LCH4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 17.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, C00LCHF4 = ) show FS4 cvsshow2
(, C00LCHSTRESS4 = ) show SS4 cvsshow2

%***********************************************
%C85LCH
/d_C85LCHave4 d_C85LCHsum4 i4i 1 add div def
100 yhot ydel 19 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, d_C85LCHmin4 = ) show d_C85LCHmin4 cvsshow2
(, d_C85LCHmax4 = ) show d_C85LCHmax4 cvsshow2
(, d_C85LCHave4 = ) show d_C85LCHave4 cvsshow2

/dE4iV4i 0 def
/dV4iV4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C85LCH4i i get def
         /dE4iV4i dE4iV4i dE4i dV4i mul add def
         /dV4iV4i dV4iV4i dV4i dV4i mul add def
        } for %i=0,iim
/FS4 dE4iV4i dV4iV4i div def

/dE4iMFV4i2 0 def
/dE4iE4i 0 def
0 1 iim {/i exch def %i=0,iim
         /dV4i WXYZR01V4i i 10 mul 09 add get def
         /dE4i d_C85LCH4i i get def
         /dE4iMFV4i2 dE4iMFV4i2 dE4i FS4 dV4i mul sub dup mul add def
         /dE4iE4i dE4iE4i dE4i dE4i mul add def
        } for %i=0,iim
/SS4 dE4iMFV4i2 dE4iE4i div 0.000001 add sqrt 100 mul def

100 yhot ydel 20.2 mul sub moveto
(i4i+1 = ) show i4i 1 add cvishow
(, C85LCHF4 = ) show FS4 cvsshow2
(, C85LCHSTRESS4 = ) show SS4 cvsshow2

} if %iXYZLAB=4,5


} if %ii=iimaxP1

showpage
grestore

%} for %xchart=0,xc0d