55 :
TNamed ("Spectrum Painter2","Miroslav Morhac Painter")
59 gPad->Range(0, 0, 1 ,1);
61 fXmax = h2->GetNbinsX() - 1;
63 fYmax = h2->GetNbinsY() - 1;
65 fMaximumXScreenResolution = bs;
67 for (i = 0;i <= fXmax; i++) {
68 for (j = 0;j <= fYmax; j++) {
69 val = h2->GetBinContent(i + 1,j + 1);
70 if (val > fZmax) fZmax = val;
74 fBx1 =
gPad->XtoPixel(0.1);
75 fBx2 =
gPad->XtoPixel(0.99);
76 fBy1 =
gPad->YtoPixel(0.99);
77 fBy2 =
gPad->YtoPixel(0.05);
79 fModeGroup = kModeGroupLightHeight;
81 fDisplayMode = kDisplayModeSurface;
83 fZscale = kZScaleLinear;
85 fNodesx = fXmax-fXmin+1;
86 fNodesy = fYmax-fYmin+1;
114 fColorAlg = kColorAlgRgbSmooth;
136 fShadow = kShadowsNotPainted;
145 fBezier = kNoBezierInterpol;
151 fPenDash = kPenStyleSolid;
153 fChanmarkEnDis = kChannelMarksNotDrawn;
155 fChanmarkColor =
kBlue;
158 fChanmarkStyle = kChannelMarksStyleDot;
160 fChanlineEnDis = kChannelGridNotDrawn;
162 fChanlineColor =
kRed;
164 fEnvelope =
new Short_t [fMaximumXScreenResolution];
165 fEnvelopeContour =
new Short_t [fMaximumXScreenResolution];
166 for (i=0;i<fMaximumXScreenResolution;i++) {
168 fEnvelopeContour[i] = fBy2;
180 for (
int i=0; i<256; i++) {
181 col =
gROOT->GetColor(250+i);
208 if ((zmt==0)||(zmt==-3)||(zmt==-4)) {
215 if (zf>=1.0) zf =
log(zf);
219 if (zf>0) zf =
sqrt(zf);
248 Double_t da,db,dc=0,dd,dl,dm,dn,xtaz,ytaz,ztaz,
v=0,v1;
253 if (z1>900) z1 = 900;
255 if (z2>900) z2 = 900;
257 if (z3>900) z3 = 900;
268 if ((i==1)||(i==3)) {
279 xtaz = (dx1+dx2+dx3)/3;
280 ytaz = (dy1+dy2+dy3)/3;
286 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
287 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
288 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
289 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
291 if (dd!=0) v = (da*dl+db*dm+dc*dn)/dd;
300 if (ztaz<fZmin) ztaz=
fZmin;
309 if (da>=1) da=
log(da);
310 if (db>=1) db=
log(db);
329 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
330 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
331 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
332 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
334 if (dd!=0) v = (da*dl+db*dm+dc*dn)/dd;
342 if (ztaz<fZmin) ztaz =
fZmin;
351 if (da>=1) da =
log(da);
352 if (db>=1) db =
log(db);
353 if (da!=0) dc = db/da;
392 Double_t pom1,pom2,sdx1=0,sdx2=0,sdy1,sdy2,spriz;
395 if (ztaz>900) ztaz = 900;
397 if (ztaz>32767) ztaz = 32767;
413 if (sx1<sx2) skrokx = 1;
415 if (sy1<sy2) skroky = 1;
419 if (
TMath::Abs(pom1)>0.0000001) sdx1 = pom2/pom1;
422 sdy1 = pom2-sdx1*pom1;
425 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
428 sdy2 = pom2-sdx2*pom1;
431 pom2 = pom1*sdx1+sdy1;
433 for (;(sx1>(
fXmin-skrokx)) && (sx1<(xmax-skrokx)) &&
434 (sy1>(
fYmin-skroky)) && (sy1<(ymax-skroky)) &&
435 (spriz==0);sx1+=skrokx) {
437 pom2 = pom1*sdx1+sdy1;
441 pom2 = pom1*sdx2+sdy2;
442 sz2 = (
Int_t)(pom2+shad_noise);
443 if (sz1>sz2) spriz = 1;
446 }
else if (sy1!=sy2) {
447 if (sy1<sy2) skroky = 1;
451 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
454 sdy2 = pom2-sdx2*pom1;
456 for (;(sy1>(
fYmin-skroky)) && (sy1<(ymax-skroky)) &&
457 (spriz==0);sy1+=skroky) {
460 pom2 = pom1*sdx2+sdy2;
461 sz2 = (
Int_t)(pom2+shad_noise);
462 if (sz1>sz2) spriz=1;
478 unsigned long uinc1=0,uinc2=0,uinc3=0,upom,i;
483 else if (iv>255) iv = 255;
484 if (
gROOT->GetColor(250+iv)) {
492 if (a >= UINT_MAX) uinc1 = UINT_MAX;
493 else uinc1 = (unsigned)a;
495 i = (uinc1-upom)/256;
496 if ((i%2)==0) uinc1 = upom;
497 else uinc1 = 255-upom;
503 i = (uinc2-upom)/256;
504 if ((i%2)==0) uinc2 = upom;
505 else uinc2 = 255-upom;
511 i = (uinc3-upom)/256;
512 if ((i%2)==0) uinc3 = upom;
513 else uinc3 = 255-upom;
532 uinc2 = (
Int_t)green;
541 red = a+0.956*b+0.62*c;
542 green = a-0.272*b-0.647*c;
543 blue = a-1.108*b+1.705*c;
544 if (red>=2) red = red-2;
545 else if (red>=1) red = 2-red;
546 if (green<0) green = -green;
547 if (blue>=2) blue = blue-2;
548 else if (blue>=1) blue = 2-blue;
549 else if (blue<-1) blue = 2+blue;
550 else if (blue<0) blue = -blue;
555 uinc2 = (
Int_t)green;
613 uinc2 = (
Int_t)green;
616 ui = uinc1+uinc2*256+uinc3*65536;
651 uinc2 = (
Int_t)green;
660 red = a+0.956*b+0.62*c;
661 green = a-0.272*b-0.647*c;
662 blue = a-1.108*b+1.705*c;
663 if (red>=2) red = red-2;
664 else if (red>=1) red = red-1;
665 if (green<0) green = 1+green;
666 if (blue>=2) blue = blue-2;
667 else if (blue>=1) blue = blue-1;
668 else if (blue<-1) blue = 2+blue;
669 else if (blue<0) blue = 1+blue;
674 uinc2 = (
Int_t)green;
732 uinc2 = (
Int_t)green;
735 ui = uinc1+uinc2*256+uinc3*65536;
756 for (j=i+1;j<=3;j++) a = a*j;
757 for (j=1;j<=3-i;j++) a = a/j;
770 for (j=1;j<=i;j++) v = v*bezf;
771 for (j=1;j<=3-i;j++) v = v*(1-bezf);
800 Int_t x,
y,krok,xold=0,yold=0,prvy,yprv=0;
861 krok = (x1<
x2)? 1:-1;
892 if (y1!=y2) y += (y1<y2)? +1:-1;
901 if (((x<=x2)&&(x1<x2)) || ((x>=
x2)&&(x1>x2)))
goto l1;
913 Int_t x,
y,krok,xold=0,yold=0,prvy,xprv,yprv=0;
948 krok = (x1<
x2)? 1:-1;
980 if (y1!=y2) y+=(y1<y2)? +1:-1;
989 if (((x<=x2)&&(x1<x2)) || ((x>=
x2)&&(x1>x2)))
goto l1;
1023 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y)+1);
1025 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2+1)+1);
1029 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y)+1);
1031 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2+1)+1);
1033 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y+h/2+1)+1);
1035 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y-h/2-1)+1);
1039 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y+h/2)+1);
1041 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y+h/2)+1);
1043 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y-h/2)+1);
1045 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y-h/2)+1);
1049 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y+h/2+1)+1);
1051 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y-h/2-1)+1);
1055 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y)+1);
1057 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2)+1);
1059 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y)+1);
1061 gPad->PixeltoX(x) ,
gPad->PixeltoY(y-h/2)+1);
1065 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y+h/2)+1);
1067 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y+h/2)+1);
1069 gPad->PixeltoX(x) ,
gPad->PixeltoY(y-h/2)+1);
1086 Int_t krok,xi,yi,xj,yj,
a,
b,
as,bs,pr,ae,be;
1099 krok = (xi<xj)? 1:-1;
1116 if (yi!=yj) b += (yi<yj)? +1:-1;
1133 gPad->PixeltoX(ae),
gPad->PixeltoY(be)+1);
1150 for (a=xi;a<=xj;a++) {
1156 for (a=xj;a<=xi;a++) {
1587 Int_t q1=0,q2=0,qv=0,smer=0,flag=0,i=0,j=0,
x1=0,y1=0,
x2=0,y2=0,
x3=0,y3=0,
x4=0,y4=0,uhl=0,xp1=0,yp1=0,xp2=0,yp2=0;
1588 Int_t ix5,iy5,x6,y6,x7,y7,y8,x1d,y1d,x2d=0,y2d=0;
1589 Int_t i1=0,i2=0,i3=0,i4=0,j1=0,j2=0,j3=0,j4=0;
1590 Int_t s1=0,s2=0,s3=0,s4=0,
t1=0,t2=0,t3=0,t4=0;
1591 Double_t dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4,z1,z2,z3,z4,zl,zh;
1592 Double_t xa,xb=0,ya,yb=0,x5=0,y5=0;
1593 Double_t da=0,db=0,dc=0,dd=0,xtaz,ytaz,ztaz,
v,shad_noise;
1594 Int_t iv=0,ekv,stvor,sx1,sx2,sx3,sx4,sx5,sy1,sy2,sy3,sy4,sy5;
1595 Double_t pom1,pom2,sdx1,sdy1,sdx2=0,sdy2,sdx3,sdy3,sdy4,spriz;
1596 Int_t sr1=0,sr2=0,sr3=0,sr4=0,sr5=0,sr6=0,sr7=0,sr8=0;
1597 Int_t tr1=0,tr2=0,tr3=0,tr4=0,tr5=0,tr6=0,tr7=0,tr8=0;
1598 Int_t il,iv1=0,iv2=0,iv3=0,iv4=0;
1599 Double_t v1=0,v2=0,v3=0,v4=0,dxr1,dxr2,dyr1,dyr2,zr1,zr2,bezf;
1600 Double_t dcount_reg,z1l,z2l,z3l,z4l,sdx2p,sdy2p,dap,dbp,dcp,ddp;
1601 Int_t sx1p,sy1p,sx3p,uip=0;
1603 Double_t p000x,p000y,p100x,p100y,p010x,p010y,p110x,p110y;
1604 Double_t p001x,p001y,p101x,p101y,p011x,p011y,p111x,p111y;
1605 Int_t ibezx1=0,ibezy1=0,ibezx2,ibezy2;
1606 unsigned ui1,ui2,ui3;
1609 Double_t mxx,mxy,myx,myy,myz,px,py,kx,ky;
1610 Double_t bxl,bxh,byl,byh,xd,yd,
a,
b,rotx,roty;
1620 printf(
"The canvas size exceed the maximum X screen resolution.\n");
1621 printf(
"Use the option bf() to increase the buffer size (it should be greater than %d).\n",
fBx2);
1634 fBx2 =
gPad->XtoPixel(0.99);
1656 alfa = (
fAlpha*3.1415927)/180;
1657 beta = (
fBeta*3.1415927)/180;
1666 mx = (bxh-bxl)/(x3max*(
cos(alfa)+
cos(beta)));
1667 my = (bxh-bxl)/(y3max*(
cos(alfa)+
cos(beta)));
1668 mul = (byh-byl)/(bxh-bxl);
1669 movx = bxl+my*
cos(alfa)*y3max;
1673 myy = mul*((-1)*mx*
sin(beta)*
sin(fi)+my*
sin(alfa)*
cos(fi));
1674 px = rotx*mx*
cos(beta)-roty*my*
cos(alfa)+movx;
1687 fVx = mxx*xmin+mxy*ymin+px;
1689 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1690 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1691 movy = byl+mul*mz*zmax;
1693 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1695 fVy = myx*xmin+myy*ymin+py;
1698 if (zmin>=1) zmin =
log(zmin);
1700 if (zmax>=1) zmax =
log(zmax);
1702 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1703 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1704 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1705 movy = byl+mul*mz*zmax;
1707 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1709 fVy = myx*xmin+myy*ymin+py;
1712 if (zmin>=1) zmin =
sqrt(zmin);
1714 if (zmax>=1) zmax =
sqrt(zmax);
1716 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1717 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1718 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1719 movy = byl+mul*mz*zmax;
1721 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1723 fVy = myx*xmin+myy*ymin+py;
1731 dcount_reg=
log(dcount_reg);
1734 dcount_reg=
sqrt(dcount_reg);
1745 p000y =
gPad->PixeltoY(
fYt)+1;
1748 p100y =
gPad->PixeltoY(
fYt)+1;
1751 p010y =
gPad->PixeltoY(
fYt)+1;
1754 p110y =
gPad->PixeltoY(
fYt)+1;
1758 p001y =
gPad->PixeltoY(
fYt)+1;
1761 p101y =
gPad->PixeltoY(
fYt)+1;
1764 p011y =
gPad->PixeltoY(
fYt)+1;
1767 p111y =
gPad->PixeltoY(
fYt)+1;
1768 Double_t bmin, bmax, binLow, binHigh, binWidth;
1769 Double_t axisLevel, gridDist, gridY1, gridY2;
1777 axis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx,
"");
1778 axis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivx,
"");
1780 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1782 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1783 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1784 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1790 nbins, binWidth,
" ");
1791 for (i = 0; i < nbins + 1; i++) {
1792 axisLevel = binLow+i*binWidth;
1793 gridDist = (axisLevel-bmin)*(p001y-p000y)/(bmax-bmin);
1794 gridY1 = p000y + gridDist, gridY2 = p100y + gridDist;
1795 line->
PaintLine(p000x,gridY1,p100x,gridY2);
1796 gridY2 = p010y + gridDist;
1797 line->
PaintLine(p000x,gridY1,p010x,gridY2);
1801 axis->
PaintAxis(p010x, p010y, p000x, p000y, bmin, bmax, ndivx,
"");
1802 axis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx,
"");
1804 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1806 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1807 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1808 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1814 nbins, binWidth,
" ");
1815 for (i = 0; i < nbins + 1; i++) {
1816 axisLevel = binLow+i*binWidth;
1817 gridDist = (axisLevel-bmin)*(p011y-p010y)/(bmax-bmin);
1818 gridY1 = p010y + gridDist, gridY2 = p000y + gridDist;
1819 line->
PaintLine(p010x,gridY1,p000x,gridY2);
1820 gridY2 = p110y + gridDist;
1821 line->
PaintLine(p010x,gridY1,p110x,gridY2);
1825 axis->
PaintAxis(p110x, p110y, p010x, p010y, bmin, bmax, ndivx,
"");
1826 axis->
PaintAxis(p110x, p110y, p100x, p100y, bmin, bmax, ndivx,
"");
1828 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1830 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1831 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1832 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1838 nbins, binWidth,
" ");
1839 for (i = 0; i < nbins + 1; i++) {
1840 axisLevel = binLow+i*binWidth;
1841 gridDist = (axisLevel-bmin)*(p111y-p110y)/(bmax-bmin);
1842 gridY1 = p110y + gridDist, gridY2 = p010y + gridDist;
1843 line->
PaintLine(p110x,gridY1,p010x,gridY2);
1844 gridY2 = p100y + gridDist;
1845 line->
PaintLine(p110x,gridY1,p100x,gridY2);
1849 axis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivx,
"");
1850 axis->
PaintAxis(p100x, p100y, p000x, p000y, bmin, bmax, ndivx,
"");
1852 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1854 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1855 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1856 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1862 nbins, binWidth,
" ");
1863 for (i = 0; i < nbins + 1; i++) {
1864 axisLevel = binLow+i*binWidth;
1865 gridDist = (axisLevel-bmin)*(p101y-p100y)/(bmax-bmin);
1866 gridY1 = p100y + gridDist, gridY2 = p110y + gridDist;
1867 line->
PaintLine(p100x,gridY1,p110x,gridY2);
1868 gridY2 = p000y + gridDist;
1869 line->
PaintLine(p100x,gridY1,p000x,gridY2);
1887 if (
x2>=
x1) turnj = 1;
1888 if (
x3>=
x2) turni = 1;
1916 if (smer==0) q1 -= 1;
1920 if (smer==0) q2 += 1;
1950 gPad->PixeltoX(x1+1),
gPad->PixeltoY(y1)+1);
1954 gPad->PixeltoX(x2+1),
gPad->PixeltoY(y2)+1);
1957 if ((q1!=q2||smer!=0) && flag==1) {
2052 xtaz = (dx1+dx2+dx4)/3;
2053 ytaz = (dy1+dy2+dy4)/3;
2054 ztaz = (z1+z2+z4)/3;
2058 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2063 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2072 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2077 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2087 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2092 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2102 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2107 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2121 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2126 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2131 da = (dxr1+dx2+dx1)/3;
2132 db = (dyr1+dy2+dy1)/3;
2136 da = (dxr1+dxr2+dx1)/3;
2137 db = (dyr1+dyr2+dy1)/3;
2138 dc = (zr1+zr2+z1)/3;
2141 da = (dxr2+dx1+dx4)/3;
2142 db = (dyr2+dy1+dy4)/3;
2147 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2152 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2157 da = (dx1+dx2+dx3)/3;
2158 db = (dy1+dy2+dy3)/3;
2162 da = (dx2+dxr1+dx3)/3;
2163 db = (dy2+dyr1+dy3)/3;
2167 da = (dx2+dxr2+dxr1)/3;
2168 db = (dy2+dyr2+dyr1)/3;
2169 dc = (z2+zr2+zr1)/3;
2172 da = (dxr2+dx2+dx1)/3;
2173 db = (dyr2+dy2+dy1)/3;
2178 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2183 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2188 da = (dx2+dx3+dx4)/3;
2189 db = (dy2+dy3+dy4)/3;
2193 da = (dx4+dx3+dxr1)/3;
2194 db = (dy4+dy3+dyr1)/3;
2198 da = (dx3+dxr2+dxr1)/3;
2199 db = (dy3+dyr2+dyr1)/3;
2200 dc = (z3+zr2+zr1)/3;
2203 da = (dx2+dxr2+dx3)/3;
2204 db = (dy2+dyr2+dy3)/3;
2209 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2214 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2219 da = (dx1+dx3+dx4)/3;
2220 db = (dy1+dy3+dy4)/3;
2224 da = (dx4+dx3+dxr2)/3;
2225 db = (dy4+dy3+dyr2)/3;
2229 da = (dx4+dxr2+dxr1)/3;
2230 db = (dy4+dyr2+dyr1)/3;
2231 dc = (z4+zr2+zr1)/3;
2234 da = (dx1+dx4+dxr1)/3;
2235 db = (dy1+dy4+dyr1)/3;
2249 iv1 = fLevels-(
Int_t)v1;
2251 iv2 = fLevels-(
Int_t)v2;
2253 iv4 = fLevels-(
Int_t)v4;
2262 iv1 = fLevels-(
Int_t)v1;
2264 iv2 = fLevels-(
Int_t)v2;
2266 iv4 = fLevels-(
Int_t)v4;
2307 xtaz = (dx3+dx2+dx4)/3;
2308 ytaz = (dy3+dy2+dy4)/3;
2309 ztaz = (z3+z2+z4)/3;
2315 iv = fLevels-(
Int_t)v;
2318 iv3 = fLevels-(
Int_t)v3;
2328 iv3 = fLevels-(
Int_t)v3;
2364 if ((q1!=q2||smer!=0)&&flag==1) {
2459 xtaz = (dx1+dx2+dx4)/3;
2460 ytaz = (dy1+dy2+dy4)/3;
2461 ztaz = (z1+z2+z4)/3;
2465 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2470 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2479 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2484 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2494 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2499 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2509 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2514 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2528 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2533 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2538 da = (dxr1+dx2+dx1)/3;
2539 db = (dyr1+dy2+dy1)/3;
2543 da = (dxr1+dxr2+dx1)/3;
2544 db = (dyr1+dyr2+dy1)/3;
2545 dc = (zr1+zr2+z1)/3;
2548 da = (dxr2+dx1+dx4)/3;
2549 db = (dyr2+dy1+dy4)/3;
2554 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2559 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2564 da = (dx1+dx2+dx3)/3;
2565 db = (dy1+dy2+dy3)/3;
2569 da = (dx2+dxr1+dx3)/3;
2570 db = (dy2+dyr1+dy3)/3;
2574 da = (dx2+dxr2+dxr1)/3;
2575 db = (dy2+dyr2+dyr1)/3;
2576 dc = (z2+zr2+zr1)/3;
2579 da = (dxr2+dx2+dx1)/3;
2580 db = (dyr2+dy2+dy1)/3;
2585 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2590 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2595 da = (dx2+dx3+dx4)/3;
2596 db = (dy2+dy3+dy4)/3;
2600 da = (dx4+dx3+dxr1)/3;
2601 db = (dy4+dy3+dyr1)/3;
2605 da = (dx3+dxr2+dxr1)/3;
2606 db = (dy3+dyr2+dyr1)/3;
2607 dc = (z3+zr2+zr1)/3;
2610 da = (dx2+dxr2+dx3)/3;
2611 db = (dy2+dyr2+dy3)/3;
2616 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2621 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2626 da = (dx1+dx3+dx4)/3;
2627 db = (dy1+dy3+dy4)/3;
2631 da = (dx4+dx3+dxr2)/3;
2632 db = (dy4+dy3+dyr2)/3;
2636 da = (dx4+dxr2+dxr1)/3;
2637 db = (dy4+dyr2+dyr1)/3;
2638 dc = (z4+zr2+zr1)/3;
2641 da = (dx1+dx4+dxr1)/3;
2642 db = (dy1+dy4+dyr1)/3;
2656 iv1 = fLevels-(
Int_t)v1;
2658 iv2 = fLevels-(
Int_t)v2;
2660 iv4 = fLevels-(
Int_t)v4;
2669 iv1 = fLevels-(
Int_t)v1;
2671 iv2 = fLevels-(
Int_t)v2;
2673 iv4 = fLevels-(
Int_t)v4;
2689 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2690 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2691 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2692 dd = -da*dx1-db*dy1-dc*z1;
2709 if (pom2!=0) sdx1 = pom1/pom2;
2712 sdy1 = pom1-sdx1*pom2;
2713 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2715 sdy4 = sdx1*pom1+sdy1;
2716 sy4 = (
Int_t)(sdy4);
2724 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2725 else v = (iv1+iv2+iv4)/3;
2739 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2740 else v = (iv1+iv2+iv4)/3;
2764 if (pom2!=0) sdx2 = pom1/pom2;
2767 sdy2 = pom1-sdx2*pom2;
2778 xtaz = (dx3+dx2+dx4)/3;
2779 ytaz = (dy3+dy2+dy4)/3;
2780 ztaz = (z3+z2+z4)/3;
2786 iv = fLevels-(
Int_t)v;
2789 iv3 = fLevels-(
Int_t)v3;
2799 iv3 = fLevels-(
Int_t)v3;
2815 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2816 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2817 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2818 dd = -da*dx1-db*dy1-dc*z1;
2835 if (pom2!=0) sdx1 = pom1/pom2;
2838 sdy1 = pom1-sdx1*pom2;
2839 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2841 sdy4 = sdx1*pom1+sdy1;
2850 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2851 else v = (iv1+iv2+iv4)/3;
2865 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2866 else v = (iv1+iv2+iv4)/3;
2876 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
2878 sdy4 = sdx2p*pom1+sdy2p;
2888 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2889 else v = (iv1+iv2+iv4)/3;
2904 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2905 else v = (iv1+iv2+iv4)/3;
2930 if (pom2!=0) sdx2 = pom1/pom2;
2933 sdy2 = pom1-sdx2*pom2;
2934 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
2936 sdy4 = sdx2*pom1+sdy2;
2945 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2946 else v =(iv1+iv2+iv4)/3;
2960 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2961 else v =(iv1+iv2+iv4)/3;
2974 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
2979 }
else if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
3007 bezy1 = y1+(y2-y3)/6;
3008 bezy2 = y2-(y4-y1)/6;
3034 for (bezf=0;bezf<1.01;bezf+=0.1) {
3044 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3079 for (bezf=0;bezf<1.01;bezf+=0.1) {
3089 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3103 if ((q1!=q2||smer!=0)&&flag==1) {
3160 i1 = (
Int_t)(zl/dcount_reg+1);
3161 if (z1!=z2||z2!=z3||z3!=z4) {
3181 if (
fZ>zh)
goto eqend;
3185 if ((z2<=
fZ&&
fZ<z1)||(z2<
fZ&&
fZ<=z1)) {
3186 xb = (
fZ-z2)*(dx1-dx2)/(z1-z2)+dx2;
3189 if ((z1<=
fZ&&
fZ<z2)||(z1<
fZ&&
fZ<=z2)) {
3190 xb = (fZ-z1)*(dx2-dx1)/(z2-z1)+dx1;
3193 if (z2==fZ&&fZ==z1) {
3202 if ((z1<=fZ&&fZ<z4)||(z1<fZ&&fZ<=z4)) {
3203 ya = (fZ-z1)*(dy4-dy1)/(z4-z1)+dy1;
3206 if ((z4<=fZ&&fZ<z1)||(z4<fZ&&fZ<=z1)) {
3207 ya = (fZ-z4)*(dy1-dy4)/(z1-z4)+dy4;
3210 if (z4==fZ&&fZ==z1) {
3215 Slice(xa,ya,xb,yb,line);
3222 if ((z3<=fZ&&fZ<z4)||(z3<fZ&&fZ<=z4)) {
3223 xa = (fZ-z3)*(dx4-dx3)/(z4-z3)+dx3;
3226 if ((z4<=fZ&&fZ<z3)||(z4<fZ&&fZ<=z3)) {
3227 xa = (fZ-z4)*(dx3-dx4)/(z3-z4)+dx4;
3230 if (z4==fZ&&fZ==z3) {
3235 Slice(xa,ya,xb,yb,line);
3242 if ((z2<=fZ&&fZ<z3)||(z2<fZ&&fZ<=z3)) {
3243 ya = (fZ-z2)*(dy3-dy2)/(z3-z2)+dy2;
3246 if ((z3<=fZ&&fZ<z2)||(z3<fZ&&fZ<=z2)) {
3247 ya = (fZ-z3)*(dy2-dy3)/(z2-z3)+dy3;
3250 if (z3==fZ&&fZ==z2) {
3255 Slice(xa,ya,xb,yb,line);
3258 if (stvor==4)
Slice(xa,ya,x5,y5,line);
3269 if ((q1!=q2||smer!=0)&&flag==1) {
3281 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3295 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3310 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3324 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3455 if (pom2!=0) sdx1 = pom1/pom2;
3458 sdy1 = pom1-sdx1*pom2;
3461 if (pom2!=0) sdx2 = pom1/pom2;
3464 sdy2 = pom1-sdx2*pom2;
3467 if (pom2!=0) sdx3 = pom1/pom2;
3470 sdy3 = pom1-sdx3*pom2;
3473 for (sx4=sx1;sx4<=sx2;sx4++) {
3475 sdy4 = sdx1*pom1+sdy1;
3478 sdy4 = sdx2*pom1+sdy2;
3486 if ((sy4<=y5)||(sy5<y5)) {
3495 for (sx4=sx2;sx4<=sx3;sx4++) {
3497 sdy4 = sdx3*pom1+sdy3;
3500 sdy4 = sdx2*pom1+sdy2;
3508 if ((sy4<=y5)||(sy5<y5)) {
3518 for (sx4=sx1;sx4<=sx3;sx4++) {
3520 sdy4 = sdx2*pom1+sdy2;
3523 sdy4 = sdx1*pom1+sdy1;
3531 if ((sy4<=y5)||(sy5<y5)) {
3540 for (sx4=sx3;sx4<=sx2;sx4++) {
3542 sdy4 = sdx3*pom1+sdy3;
3545 sdy4 = sdx1*pom1+sdy1;
3553 if ((sy4<=y5)||(sy5<y5)) {
3597 if (pom2!=0) sdx1 = pom1/pom2;
3600 sdy1 = pom1-sdx1*pom2;
3603 if (pom2!=0) sdx2 = pom1/pom2;
3606 sdy2 = pom1-sdx2*pom2;
3609 if (pom2!=0) sdx3 = pom1/pom2;
3612 sdy3 = pom1-sdx3*pom2;
3615 for (sx4=sx1;sx4<=sx2;sx4++) {
3617 sdy4 = sdx1*pom1+sdy1;
3620 sdy4 = sdx2*pom1+sdy2;
3628 if ((sy4<=y5)||(sy5<y5)) {
3637 for (sx4=sx2;sx4<=sx3;sx4++) {
3639 sdy4 = sdx3*pom1+sdy3;
3642 sdy4 = sdx2*pom1+sdy2;
3650 if ((sy4<=y5)||(sy5<y5)) {
3660 for (sx4=sx1;sx4<=sx3;sx4++) {
3662 sdy4 = sdx2*pom1+sdy2;
3665 sdy4 = sdx1*pom1+sdy1;
3673 if ((sy4<=y5)||(sy5<y5)) {
3682 for (sx4=sx3;sx4<=sx2;sx4++) {
3684 sdy4 = sdx3*pom1+sdy3;
3687 sdy4 = sdx1*pom1+sdy1;
3695 if ((sy4<=y5)||(sy5<y5)) {
3830 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
3867 bezy1 = y1+(y2-y3)/6;
3868 bezy2 = y2-(y4-y1)/6;
3894 for (bezf=0;bezf<1.01;bezf+=0.1) {
3904 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3939 for (bezf=0;bezf<1.01;bezf+=0.1) {
3949 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3963 if ((q1!=q2||smer!=0)&&flag==1) {
4058 xtaz = (dx1+dx2+dx4)/3;
4059 ytaz = (dy1+dy2+dy4)/3;
4060 ztaz = (z1+z2+z4)/3;
4064 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4069 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4078 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4083 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4093 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4098 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4108 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4113 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4127 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4132 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4137 da = (dxr1+dx2+dx1)/3;
4138 db = (dyr1+dy2+dy1)/3;
4142 da = (dxr1+dxr2+dx1)/3;
4143 db = (dyr1+dyr2+dy1)/3;
4144 dc = (zr1+zr2+z1)/3;
4147 da = (dxr2+dx1+dx4)/3;
4148 db = (dyr2+dy1+dy4)/3;
4153 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4158 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4163 da = (dx1+dx2+dx3)/3;
4164 db = (dy1+dy2+dy3)/3;
4168 da = (dx2+dxr1+dx3)/3;
4169 db = (dy2+dyr1+dy3)/3;
4173 da = (dx2+dxr2+dxr1)/3;
4174 db = (dy2+dyr2+dyr1)/3;
4175 dc = (z2+zr2+zr1)/3;
4178 da = (dxr2+dx2+dx1)/3;
4179 db = (dyr2+dy2+dy1)/3;
4184 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4189 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4194 da = (dx2+dx3+dx4)/3;
4195 db = (dy2+dy3+dy4)/3;
4199 da = (dx4+dx3+dxr1)/3;
4200 db = (dy4+dy3+dyr1)/3;
4204 da = (dx3+dxr2+dxr1)/3;
4205 db = (dy3+dyr2+dyr1)/3;
4206 dc = (z3+zr2+zr1)/3;
4209 da = (dx2+dxr2+dx3)/3;
4210 db = (dy2+dyr2+dy3)/3;
4215 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4220 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4225 da = (dx1+dx3+dx4)/3;
4226 db = (dy1+dy3+dy4)/3;
4230 da = (dx4+dx3+dxr2)/3;
4231 db = (dy4+dy3+dyr2)/3;
4235 da = (dx4+dxr2+dxr1)/3;
4236 db = (dy4+dyr2+dyr1)/3;
4237 dc = (z4+zr2+zr1)/3;
4240 da = (dx1+dx4+dxr1)/3;
4241 db = (dy1+dy4+dyr1)/3;
4255 iv1 = fLevels-(
Int_t)v1;
4257 iv2 = fLevels-(
Int_t)v2;
4259 iv4 = fLevels-(
Int_t)v4;
4268 iv1 = fLevels-(
Int_t)v1;
4270 iv2 = fLevels-(
Int_t)v2;
4272 iv4 = fLevels-(
Int_t)v4;
4288 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4289 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4290 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4291 dd = -da*dx1-db*dy1-dc*z1;
4307 if (pom2!=0) sdx2 = pom1/pom2;
4310 sdy2 = pom1-sdx2*pom2;
4321 xtaz = (dx3+dx2+dx4)/3;
4322 ytaz = (dy3+dy2+dy4)/3;
4323 ztaz = (z3+z2+z4)/3;
4329 iv = fLevels-(
Int_t)v;
4332 iv3 = fLevels-(
Int_t)v3;
4342 iv3 = fLevels-(
Int_t)v3;
4358 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4359 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4360 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4361 dd = -da*dx1-db*dy1-dc*z1;
4378 if (pom2!=0) sdx1 = pom1/pom2;
4381 sdy1 = pom1-sdx1*pom2;
4382 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4384 sdy4 = sdx1*pom1+sdy1;
4393 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4394 else v =(iv1+iv2+iv4)/3;
4408 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4409 else v =(iv1+iv2+iv4)/3;
4419 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
4421 sdy4 = sdx2p*pom1+sdy2p;
4431 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4432 else v = (iv1+iv2+iv4)/3;
4447 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4448 else v = (iv1+iv2+iv4)/3;
4463 if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
4500 bezy1 = y1+(y2-y3)/6;
4501 bezy2 = y2-(y4-y1)/6;
4527 for (bezf=0;bezf<1.01;bezf+=0.1) {
4537 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
4572 for (bezf=0;bezf<1.01;bezf+=0.1) {
4582 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
4596 if ((q1!=q2||smer!=0)&&flag==1) {
4691 xtaz = (dx1+dx2+dx4)/3;
4692 ytaz = (dy1+dy2+dy4)/3;
4693 ztaz = (z1+z2+z4)/3;
4697 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4702 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4711 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4716 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4726 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4731 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4741 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4746 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4760 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4765 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4770 da = (dxr1+dx2+dx1)/3;
4771 db = (dyr1+dy2+dy1)/3;
4775 da = (dxr1+dxr2+dx1)/3;
4776 db = (dyr1+dyr2+dy1)/3;
4777 dc = (zr1+zr2+z1)/3;
4780 da = (dxr2+dx1+dx4)/3;
4781 db = (dyr2+dy1+dy4)/3;
4786 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4791 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4796 da = (dx1+dx2+dx3)/3;
4797 db = (dy1+dy2+dy3)/3;
4801 da = (dx2+dxr1+dx3)/3;
4802 db = (dy2+dyr1+dy3)/3;
4806 da = (dx2+dxr2+dxr1)/3;
4807 db = (dy2+dyr2+dyr1)/3;
4808 dc = (z2+zr2+zr1)/3;
4811 da = (dxr2+dx2+dx1)/3;
4812 db = (dyr2+dy2+dy1)/3;
4817 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4822 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4827 da = (dx2+dx3+dx4)/3;
4828 db = (dy2+dy3+dy4)/3;
4832 da = (dx4+dx3+dxr1)/3;
4833 db = (dy4+dy3+dyr1)/3;
4837 da = (dx3+dxr2+dxr1)/3;
4838 db = (dy3+dyr2+dyr1)/3;
4839 dc = (z3+zr2+zr1)/3;
4842 da = (dx2+dxr2+dx3)/3;
4843 db = (dy2+dyr2+dy3)/3;
4848 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4853 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4858 da = (dx1+dx3+dx4)/3;
4859 db = (dy1+dy3+dy4)/3;
4863 da = (dx4+dx3+dxr2)/3;
4864 db = (dy4+dy3+dyr2)/3;
4868 da = (dx4+dxr2+dxr1)/3;
4869 db = (dy4+dyr2+dyr1)/3;
4870 dc = (z4+zr2+zr1)/3;
4873 da = (dx1+dx4+dxr1)/3;
4874 db = (dy1+dy4+dyr1)/3;
4888 iv1 = fLevels-(
Int_t)v1;
4890 iv2 = fLevels-(
Int_t)v2;
4892 iv4 = fLevels-(
Int_t)v4;
4901 iv1 = fLevels-(
Int_t)v1;
4903 iv2 = fLevels-(
Int_t)v2;
4905 iv4 = fLevels-(
Int_t)v4;
4921 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4922 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4923 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4924 dd = -da*dx1-db*dy1-dc*z1;
4941 if (pom2!=0) sdx1 = pom1/pom2;
4944 sdy1 = pom1-sdx1*pom2;
4945 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4947 sdy4 = sdx1*pom1+sdy1;
4956 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4957 else v =(iv1+iv2+iv4)/3;
4971 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4972 else v =(iv1+iv2+iv4)/3;
4982 xtaz = (dx3+dx2+dx4)/3;
4983 ytaz = (dy3+dy2+dy4)/3;
4984 ztaz = (z3+z2+z4)/3;
4990 iv = fLevels-(
Int_t)v;
4993 iv3 = fLevels-(
Int_t)v3;
5003 iv3 = fLevels-(
Int_t)v3;
5019 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5020 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5021 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5022 dd = -da*dx1-db*dy1-dc*z1;
5039 if (pom2!=0) sdx2 = pom1/pom2;
5042 sdy2 = pom1-sdx2*pom2;
5043 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
5045 sdy4 = sdx2*pom1+sdy2;
5054 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5055 else v =(iv1+iv2+iv4)/3;
5069 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5070 else v =(iv1+iv2+iv4)/3;
5100 if ((q1!=q2||smer!=0)&&flag==1) {
5195 xtaz = (dx1+dx2+dx4)/3;
5196 ytaz = (dy1+dy2+dy4)/3;
5197 ztaz = (z1+z2+z4)/3;
5201 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5206 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5215 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5220 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5230 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5235 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5245 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5250 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5264 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5269 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5274 da = (dxr1+dx2+dx1)/3;
5275 db = (dyr1+dy2+dy1)/3;
5279 da = (dxr1+dxr2+dx1)/3;
5280 db = (dyr1+dyr2+dy1)/3;
5281 dc = (zr1+zr2+z1)/3;
5284 da = (dxr2+dx1+dx4)/3;
5285 db = (dyr2+dy1+dy4)/3;
5290 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5295 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5300 da = (dx1+dx2+dx3)/3;
5301 db = (dy1+dy2+dy3)/3;
5305 da = (dx2+dxr1+dx3)/3;
5306 db = (dy2+dyr1+dy3)/3;
5310 da = (dx2+dxr2+dxr1)/3;
5311 db = (dy2+dyr2+dyr1)/3;
5312 dc = (z2+zr2+zr1)/3;
5315 da = (dxr2+dx2+dx1)/3;
5316 db = (dyr2+dy2+dy1)/3;
5321 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5326 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5331 da = (dx2+dx3+dx4)/3;
5332 db = (dy2+dy3+dy4)/3;
5336 da = (dx4+dx3+dxr1)/3;
5337 db = (dy4+dy3+dyr1)/3;
5341 da = (dx3+dxr2+dxr1)/3;
5342 db = (dy3+dyr2+dyr1)/3;
5343 dc = (z3+zr2+zr1)/3;
5346 da = (dx2+dxr2+dx3)/3;
5347 db = (dy2+dyr2+dy3)/3;
5352 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5357 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5362 da = (dx1+dx3+dx4)/3;
5363 db = (dy1+dy3+dy4)/3;
5367 da = (dx4+dx3+dxr2)/3;
5368 db = (dy4+dy3+dyr2)/3;
5372 da = (dx4+dxr2+dxr1)/3;
5373 db = (dy4+dyr2+dyr1)/3;
5374 dc = (z4+zr2+zr1)/3;
5377 da = (dx1+dx4+dxr1)/3;
5378 db = (dy1+dy4+dyr1)/3;
5405 iv1 = fLevels-(
Int_t)v1;
5407 iv2 = fLevels-(
Int_t)v2;
5409 iv4 = fLevels-(
Int_t)v4;
5425 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5426 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5427 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5428 dd = -da*dx1-db*dy1-dc*z1;
5465 if (pom2!=0) sdx1 = pom1/pom2;
5468 sdy1 = pom1-sdx1*pom2;
5471 if (pom2!=0) sdx2 = pom1/pom2;
5474 sdy2 = pom1-sdx2*pom2;
5477 if (pom2!=0) sdx3 = pom1/pom2;
5480 sdy3 = pom1-sdx3*pom2;
5483 for (sx4=sx1;sx4<=sx2;sx4++) {
5485 sdy4 = sdx1*pom1+sdy1;
5488 sdy4 = sdx2*pom1+sdy2;
5496 if ((sy4<=y5)||(sy5<y5)) {
5502 for (il=sy5;il<=sy4+1;il++) {
5504 if(il<=sy4) dy1 = il;
5506 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5507 else v =(iv1+iv2+iv4)/3;
5519 for (sx4=sx2;sx4<=sx3;sx4++) {
5521 sdy4 = sdx3*pom1+sdy3;
5524 sdy4 = sdx2*pom1+sdy2;
5532 if ((sy4<=y5)||(sy5<y5)) {
5538 for (il=sy5;il<=sy4+1;il++) {
5540 if(il<=sy4) dy1 = il;
5542 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5543 else v =(iv1+iv2+iv4)/3;
5556 for (sx4=sx1;sx4<=sx3;sx4++) {
5558 sdy4 = sdx2*pom1+sdy2;
5561 sdy4 = sdx1*pom1+sdy1;
5569 if ((sy4<=y5)||(sy5<y5)) {
5575 for (il=sy5;il<=sy4+1;il++) {
5577 if(il<=sy4) dy1 = il;
5579 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5580 else v =(iv1+iv2+iv4)/3;
5592 for (sx4=sx3;sx4<=sx2;sx4++) {
5594 sdy4 = sdx3*pom1+sdy3;
5597 sdy4 = sdx1*pom1+sdy1;
5605 if ((sy4<=y5)||(sy5<y5)) {
5611 for (il=sy5;il<=sy4+1;il++) {
5613 if(il<=sy4) dy1 = il;
5615 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5616 else v =(iv1+iv2+iv4)/3;
5628 xtaz = (dx3+dx2+dx4)/3;
5629 ytaz = (dy3+dy2+dy4)/3;
5630 ztaz = (z3+z2+z4)/3;
5636 iv = fLevels-(
Int_t)v;
5639 iv3 = fLevels-(
Int_t)v3;
5649 iv3 = fLevels-(
Int_t)v3;
5665 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5666 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5667 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5668 dd = -da*dx1-db*dy1-dc*z1;
5705 if (pom2!=0) sdx1 = pom1/pom2;
5708 sdy1 = pom1-sdx1*pom2;
5711 if (pom2!=0) sdx2 = pom1/pom2;
5714 sdy2 = pom1-sdx2*pom2;
5717 if (pom2!=0) sdx3 = pom1/pom2;
5720 sdy3 = pom1-sdx3*pom2;
5723 for (sx4=sx1;sx4<=sx2;sx4++) {
5725 sdy4 = sdx1*pom1+sdy1;
5728 sdy4 = sdx2*pom1+sdy2;
5736 if ((sy4<=y5)||(sy5<y5)) {
5742 for (il=sy5;il<=sy4+1;il++) {
5744 if(il<=sy4) dy1 = il;
5746 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5747 else v =(iv2+iv3+iv4)/3;
5759 for (sx4=sx2;sx4<=sx3;sx4++) {
5761 sdy4 = sdx3*pom1+sdy3;
5764 sdy4 = sdx2*pom1+sdy2;
5772 if ((sy4<=y5)||(sy5<y5)) {
5778 for (il=sy5;il<=sy4+1;il++) {
5780 if(il<=sy4) dy1 = il;
5782 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5783 else v =(iv2+iv3+iv4)/3;
5796 for (sx4=sx1;sx4<=sx3;sx4++) {
5798 sdy4 = sdx2*pom1+sdy2;
5801 sdy4 = sdx1*pom1+sdy1;
5809 if ((sy4<=y5)||(sy5<y5)) {
5815 for (il=sy5;il<=sy4+1;il++) {
5817 if(il<=sy4) dy1 = il;
5819 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5820 else v =(iv2+iv3+iv4)/3;
5832 for (sx4=sx3;sx4<=sx2;sx4++) {
5834 sdy4 = sdx3*pom1+sdy3;
5837 sdy4 = sdx1*pom1+sdy1;
5845 if ((sy4<=y5)||(sy5<y5)) {
5851 for (il=sy5;il<=sy4+1;il++) {
5853 if(il<=sy4) dy1 = il;
5855 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5856 else v =(iv2+iv3+iv4)/3;
5872 if ((q1!=q2||smer!=0)&&flag==1) {
5916 if ((q1!=q2||smer!=0)&&flag==1) {
5959 if ((q1!=q2||smer!=0)&&flag==1) {
6054 xtaz = (dx1+dx2+dx4)/3;
6055 ytaz = (dy1+dy2+dy4)/3;
6056 ztaz = (z1+z2+z4)/3;
6060 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6065 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6074 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6079 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6089 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6094 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6104 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6109 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6123 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6128 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6133 da = (dxr1+dx2+dx1)/3;
6134 db = (dyr1+dy2+dy1)/3;
6138 da = (dxr1+dxr2+dx1)/3;
6139 db = (dyr1+dyr2+dy1)/3;
6140 dc = (zr1+zr2+z1)/3;
6143 da = (dxr2+dx1+dx4)/3;
6144 db = (dyr2+dy1+dy4)/3;
6149 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6154 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6159 da = (dx1+dx2+dx3)/3;
6160 db = (dy1+dy2+dy3)/3;
6164 da = (dx2+dxr1+dx3)/3;
6165 db = (dy2+dyr1+dy3)/3;
6169 da = (dx2+dxr2+dxr1)/3;
6170 db = (dy2+dyr2+dyr1)/3;
6171 dc = (z2+zr2+zr1)/3;
6174 da = (dxr2+dx2+dx1)/3;
6175 db = (dyr2+dy2+dy1)/3;
6180 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6185 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6190 da = (dx2+dx3+dx4)/3;
6191 db = (dy2+dy3+dy4)/3;
6195 da = (dx4+dx3+dxr1)/3;
6196 db = (dy4+dy3+dyr1)/3;
6200 da = (dx3+dxr2+dxr1)/3;
6201 db = (dy3+dyr2+dyr1)/3;
6202 dc = (z3+zr2+zr1)/3;
6205 da = (dx2+dxr2+dx3)/3;
6206 db = (dy2+dyr2+dy3)/3;
6211 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6216 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6221 da = (dx1+dx3+dx4)/3;
6222 db = (dy1+dy3+dy4)/3;
6226 da = (dx4+dx3+dxr2)/3;
6227 db = (dy4+dy3+dyr2)/3;
6231 da = (dx4+dxr2+dxr1)/3;
6232 db = (dy4+dyr2+dyr1)/3;
6233 dc = (z4+zr2+zr1)/3;
6236 da = (dx1+dx4+dxr1)/3;
6237 db = (dy1+dy4+dyr1)/3;
6251 iv1 = fLevels-(
Int_t)v1;
6253 iv2 = fLevels-(
Int_t)v2;
6255 iv4 = fLevels-(
Int_t)v4;
6264 iv1 = fLevels-(
Int_t)v1;
6266 iv2 = fLevels-(
Int_t)v2;
6268 iv4 = fLevels-(
Int_t)v4;
6284 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6285 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6286 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6287 dd = -da*dx1-db*dy1-dc*z1;
6304 if (pom2!=0) sdx1 = pom1/pom2;
6307 sdy1 = pom1-sdx1*pom2;
6308 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6310 sdy4 = sdx1*pom1+sdy1;
6319 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6320 else v = (iv1+iv2+iv4)/3;
6334 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6335 else v = (iv1+iv2+iv4)/3;
6359 if (pom2!=0) sdx2 = pom1/pom2;
6362 sdy2 = pom1-sdx2*pom2;
6373 xtaz = (dx3+dx2+dx4)/3;
6374 ytaz = (dy3+dy2+dy4)/3;
6375 ztaz = (z3+z2+z4)/3;
6381 iv = fLevels-(
Int_t)v;
6384 iv3 = fLevels-(
Int_t)v3;
6394 iv3 = fLevels-(
Int_t)v3;
6410 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6411 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6412 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6413 dd = -da*dx1-db*dy1-dc*z1;
6430 if (pom2!=0) sdx1 = pom1/pom2;
6433 sdy1 = pom1-sdx1*pom2;
6434 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6436 sdy4 = sdx1*pom1+sdy1;
6445 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6446 else v = (iv1+iv2+iv4)/3;
6460 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6461 else v = (iv1+iv2+iv4)/3;
6486 if (pom2!=0) sdx1 = pom1/pom2;
6489 sdy1 = pom1-sdx1*pom2;
6490 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6492 sdy4 = sdx1*pom1+sdy1;
6501 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6502 else v = (iv1+iv2+iv4)/3;
6516 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6517 else v = (iv1+iv2+iv4)/3;
6527 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
6529 sdy4 = sdx2p*pom1+sdy2p;
6539 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6540 else v = (iv1+iv2+iv4)/3;
6555 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6556 else v = (iv1+iv2+iv4)/3;
6581 if (pom2!=0) sdx2 = pom1/pom2;
6584 sdy2 = pom1-sdx2*pom2;
6585 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
6587 sdy4 = sdx2*pom1+sdy2;
6596 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6597 else v = (iv1+iv2+iv4)/3;
6611 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6612 else v = (iv1+iv2+iv4)/3;
6639 if (smer==0) q1 += 1;
6647 }
while ((q1!=qv||(q2!=(qv-1) && q2!=w2)||smer!=0||flag!=1) &&
6648 ((q1!=(qv-1) && q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6650 if (qv<=w2&&qv<=w1) {
6693 if (q2<=w2)
goto l2;
6695 }
while (q1<=w1&&q2<=w2);
6708 if (
x2>=
x1) turnj = 1;
6709 if (
x3>=
x2) turni = 1;
6737 if (smer==0) q1 -= 1;
6741 if (smer==0) q2 += 1;
6794 if (smer==0) q1 += 1;
6802 }
while ((q1!=qv||(q2!=(qv-1)&&q2!=w2)||smer!=0||flag!=1) &&
6803 ((q1!=(qv-1)&&q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6805 if (qv<=w2&&qv<=w1) {
6848 if (q2<=w2)
goto lc2;
6850 }
while (q1<=w1&&q2<=w2);
6854 static char chopt[10] =
"";
6856 axis->
PaintAxis(p101x, p101y, p111x, p111y, bmin, bmax, ndivx,
"");
6857 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
6859 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
6864 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6866 strlcat(chopt,
"N",10);
6869 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6874 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6876 strlcat(chopt,
"N",10);
6879 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6887 if (bmin <= 0) bmin=0.001*bmax;
6888 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz,
"G+");
6890 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6891 TGaxis *a1 =
new TGaxis(p010x, p010y, p011x, p011y,
"f1", ndivz,
"SDH+");
6897 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6899 strlcat(chopt,
"N",10);
6902 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, chopt);
6906 axis->
PaintAxis(p001x, p001y, p101x, p101y, bmin, bmax, ndivx,
"");
6907 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
6909 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
6914 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6916 strlcat(chopt,
"N",10);
6919 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6924 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6926 strlcat(chopt,
"N",10);
6929 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6937 if (bmin <= 0) bmin=0.001*bmax;
6938 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz,
"G+");
6940 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6941 TGaxis *a1 =
new TGaxis(p110x, p110y, p111x, p111y,
"f1", ndivz,
"SDH+");
6947 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6949 strlcat(chopt,
"N",10);
6952 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, chopt);
6956 axis->
PaintAxis(p011x, p011y, p001x, p001y, bmin, bmax, ndivx,
"");
6957 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
6959 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
6964 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6966 strlcat(chopt,
"N",10);
6969 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6974 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6976 strlcat(chopt,
"N",10);
6979 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6987 if (bmin <= 0) bmin=0.001*bmax;
6988 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz,
"G+");
6990 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6991 TGaxis *a1 =
new TGaxis(p100x, p100y, p101x, p101y,
"f1", ndivz,
"SDH+");
6997 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6999 strlcat(chopt,
"N",10);
7002 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, chopt);
7006 axis->
PaintAxis(p111x, p111y, p011x, p011y, bmin, bmax, ndivx,
"");
7007 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
7009 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
7014 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
7016 strlcat(chopt,
"N",10);
7019 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
7024 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
7026 strlcat(chopt,
"N",10);
7029 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
7037 if (bmin <= 0) bmin=0.001*bmax;
7038 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"G+");
7040 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
7041 TGaxis *a1 =
new TGaxis(p000x, p000y, p001x, p001y,
"f1", ndivz,
"SDH+");
7047 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
7049 strlcat(chopt,
"N",10);
7052 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"SDH+");
7089 if (color>=0 && style >=
kPenStyleSolid && style <= kPenStyleDashDot && width > 0) {
7103 if (nodesx>1&&nodesy>1) {
7118 if (alpha>=0&&alpha<=90&&beta>=0&&beta<=90&&alpha+beta<=90) {
7163 if (r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&b<=255) {
7177 if (x>=0&&y>=0&&z>=0) {
7230 if (weight>=0&&weight<=1)
fLHweight = weight;
7683 Int_t i1, i2, i3, i4, i5;
7688 while (opt.
Tokenize(token, from,
"[ (]")) {
7694 printf(
"PaintSpectrum: Display modes groups should be in the [0,3] range\n");
7698 if (i2<1 || i2>11) {
7699 printf(
"PaintSpectrum: Display modes should be in the [1,11] range\n");
7705 }
else if (token==
"pa") {
7712 }
else if (token==
"n") {
7718 }
else if (token==
"ca") {
7721 printf(
"PaintSpectrum: Color Algorithm should be in the [0,9] range\n");
7727 }
else if (token==
"zs") {
7730 printf(
"PaintSpectrum: Z-Scale should be in the [0,2] range\n");
7736 }
else if (token==
"ci") {
7743 }
else if (token==
"lhw") {
7748 }
else if (token==
"lp") {
7755 }
else if (token==
"cw") {
7760 }
else if (token==
"b") {
7763 printf(
"PaintSpectrum: Bezier should be in the [0,1] range\n");
7769 }
else if (token==
"s") {
7772 printf(
"PaintSpectrum: Shading should be in the [0,1] range\n");
7777 printf(
"PaintSpectrum: Shadow should be in the [0,1] range\n");
7783 }
else if (token==
"cm") {
7792 }
else if (token==
"cg") {
7798 }
else if (token==
"a" || token==
"a=") {
7805 }
else if (token==
"bf") {
7813 printf(
"Unknown option \"%s\"\n",token.
Data());
void SetDisplayMode(Int_t modeGroup, Int_t displayMode)
Sets display group mode and display mode:
void GetDisplayMode(Int_t &modeGroup, Int_t &displayMode)
Gets display group mode and display mode: -modeGroup - the following group modes might have been set:...
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
void SetAngles(Int_t alpha, Int_t beta, Int_t view)
Sets angles of the view:
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
Double_t BezierBlend(Int_t i, Double_t bezf)
This function calculates Bezier approximation.
void CopyEnvelope(Double_t xr, Double_t xs, Double_t yr, Double_t ys)
Copies envelope vector, which ensures hidden surface removal for the contours display mode...
Int_t GetFirst() const
Return first bin on the axis i.e.
void SetBezier(Int_t bezier)
Sets on/off Bezier smoothing:
void SetShading(Int_t shading, Int_t shadow)
Sets on/off shading and shadow switches:
void Envelope(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal.
void GetColorAlgorithm(Int_t &colorAlgorithm)
Gets shading color algorithm:
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
static function to compute reasonable axis limits
Double_t ColorCalculation(Double_t dx1, Double_t dy1, Double_t z1, Double_t dx2, Double_t dy2, Double_t z2, Double_t dx3, Double_t dy3, Double_t z3)
Calculates and returns color value for the surface triangle given by function parameters: -dx1...
virtual void SetTheta(Double_t theta=0)
virtual void SetPhimax(Double_t phi=360)
Short_t Min(Short_t a, Short_t b)
void SetPenAttr(Int_t color, Int_t style, Int_t width)
Sets pen attributes:
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Int_t fMaximumXScreenResolution
Int_t fNewColorIndex
buffers' size
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual void SetR1(Double_t r1)
virtual Width_t GetLineWidth() const
Return the line width.
double beta(double x, double y)
Calculates the beta function.
virtual void Paint(Option_t *option="")
Paint this ellipse with its current attributes.
static void PaintSpectrum(TH2 *h2, Option_t *option="", Int_t bs=1600)
This function allows to set all the possible options available in TSpectrum2Painter and paint "h2"...
virtual Style_t GetLineStyle() const
Return the line style.
static const double x2[5]
void GetAngles(Int_t &alpha, Int_t &beta, Int_t &view)
Gets angles of the view:
void ColorModel(unsigned ui, unsigned ui1, unsigned ui2, unsigned ui3)
This function calculates color for one palette entry given by function parameter ui.
The TNamed class is the base class for all named ROOT classes.
static double p2(double t, double a, double b, double c)
static const double x4[22]
void GetNodes(Int_t &nodesx, Int_t &nodesy)
Gets nodes in both directions:
void EnvelopeBars(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal for Bars, BarsX and BarsY display modes.
void SetContourWidth(Int_t width)
Sets width between horizontal slices:
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
void GetLightHeightWeight(Double_t &weight)
Gets weight between shading according to fictive light source and according to channels counts: ...
void SetChanMarks(Int_t enable, Int_t color, Int_t width, Int_t height, Int_t style)
Sets enables/disables drawing of channel marks and sets their attributes:
virtual Int_t GetNdivisions() const
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void GetContourWidth(Int_t &width)
Gets width between horizontal slices:
virtual void SetY1(Double_t y1)
void BezierSmoothing(Double_t bezf)
Calculates screen coordinates of the smoothed point.
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
Int_t GetLast() const
Return last bin on the axis i.e.
Service class for 2-Dim histogram classes.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetX1(Double_t x1)
void Transform(Int_t it, Int_t jt, Int_t zmt)
Reads out the value from histogram and calculates screen coordinates.
virtual ~TSpectrum2Painter()
TSpectrum2Painter destructor.
void GetShading(Int_t &shading, Int_t &shadow)
Gets shading and shadow switches:
void GetPenAttr(Int_t &color, Int_t &style, Int_t &width)
Gets pen attributes: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels.
void GetColorIncrements(Double_t &r, Double_t &g, Double_t &b)
Gets color increments between two color levels for r, g, b components:
virtual void SetR2(Double_t r2)
void GetChanGrid(Int_t &enable, Int_t &color)
This function gets attributes for drawing channel:
static double p1(double t, double a, double b)
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
void DrawMarker(Int_t x, Int_t y, Int_t w, Int_t h, Int_t type)
Draws channel mark at the screen coordinates x, y.
void GetChanMarks(Int_t &enable, Int_t &color, Int_t &width, Int_t &height, Int_t &style)
Gets drawing attributes for channel marks:
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual Color_t GetLineColor() const
Return the line color.
Two-dimensional graphics function.
virtual void SetPhimin(Double_t phi=0)
void GetLightPosition(Int_t &x, Int_t &y, Int_t &z)
Gets position of fictive light source in 3D space:
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
void SetLabelOffset(Float_t labeloffset)
static const double x1[5]
Double_t ShadowColorCalculation(Double_t xtaz, Double_t ytaz, Double_t ztaz, Double_t shad_noise)
Determines whether the center of the triangle in 3-d space given by function parameters: ...
The color creation and management class.
void SetChanGrid(Int_t enable, Int_t color)
This function sets enables/disables drawing of channel grid and sets its color: -enable - decides whe...
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
void GetBezier(Int_t &bezier)
Gets Bezier smoothing switch:
void SetLightHeightWeight(Double_t weight)
Sets weight between shading according to fictive light source and according to channels counts: ...
you should not use this method at all Int_t Int_t z
void Paint(Option_t *option)
Paints histogram according to preset parameters.
void SetColorIncrements(Double_t r, Double_t g, Double_t b)
Sets color increments between two color levels for r, g, b components:
void SetNodes(Int_t nodesx, Int_t nodesy)
Sets nodes in both directions:
virtual void Paint(Option_t *chopt="")
Draw this axis with its current attributes.
Short_t * fEnvelopeContour
double f2(const double *x)
void SetLightPosition(Int_t x, Int_t y, Int_t z)
Sets position of fictive light source in 3D space:
Short_t Max(Short_t a, Short_t b)
void SetColorAlgorithm(Int_t colorAlgorithm)
Sets shading color algorithm:
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Float_t GetLabelOffset() const
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Int_t Atoi() const
Return integer value of string.
Double_t Atof() const
Return floating-point value contained in string.
void Slice(Double_t xr, Double_t yr, Double_t xs, Double_t ys, TLine *line)
Calculates screen coordinates of the line given by two nodes for contours display mode...
void GetZScale(Int_t &scale)
Gets z-axis scale:
Float_t GetTickSize() const
Int_t BezC(Int_t i)
This function is called from BezierBlend function.
void SetZScale(Int_t scale)
Sets z-axis scale:
static const double x3[11]
const char * Data() const