52 :
TNamed ("Spectrum Painter2","Miroslav Morhac Painter")
56 gPad->Range(0, 0, 1 ,1);
58 fXmax = h2->GetNbinsX() - 1;
60 fYmax = h2->GetNbinsY() - 1;
62 fMaximumXScreenResolution = bs;
64 for (i = 0;i <= fXmax; i++) {
65 for (j = 0;j <= fYmax; j++) {
66 val = h2->GetBinContent(i + 1,j + 1);
67 if (val > fZmax) fZmax = val;
71 fBx1 =
gPad->XtoPixel(0.1);
72 fBx2 =
gPad->XtoPixel(0.99);
73 fBy1 =
gPad->YtoPixel(0.99);
74 fBy2 =
gPad->YtoPixel(0.05);
76 fModeGroup = kModeGroupLightHeight;
78 fDisplayMode = kDisplayModeSurface;
80 fZscale = kZScaleLinear;
82 fNodesx = fXmax-fXmin+1;
83 fNodesy = fYmax-fYmin+1;
111 fColorAlg = kColorAlgRgbSmooth;
133 fShadow = kShadowsNotPainted;
142 fBezier = kNoBezierInterpol;
148 fPenDash = kPenStyleSolid;
150 fChanmarkEnDis = kChannelMarksNotDrawn;
152 fChanmarkColor =
kBlue;
155 fChanmarkStyle = kChannelMarksStyleDot;
157 fChanlineEnDis = kChannelGridNotDrawn;
159 fChanlineColor =
kRed;
161 fEnvelope =
new Short_t [fMaximumXScreenResolution];
162 fEnvelopeContour =
new Short_t [fMaximumXScreenResolution];
163 for (i=0;i<fMaximumXScreenResolution;i++) {
165 fEnvelopeContour[i] = fBy2;
177 for (
int i=0; i<256; i++) {
178 col =
gROOT->GetColor(250+i);
205 if ((zmt==0)||(zmt==-3)||(zmt==-4)) {
212 if (zf>=1.0) zf =
log(zf);
216 if (zf>0) zf =
sqrt(zf);
245 Double_t da,db,dc=0,dd,dl,dm,dn,xtaz,ytaz,ztaz,
v=0,v1;
250 if (z1>900) z1 = 900;
252 if (z2>900) z2 = 900;
254 if (z3>900) z3 = 900;
265 if ((i==1)||(i==3)) {
276 xtaz = (dx1+dx2+dx3)/3;
277 ytaz = (dy1+dy2+dy3)/3;
283 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
284 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
285 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
286 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
288 if (dd!=0) v = (da*dl+db*dm+dc*dn)/dd;
297 if (ztaz<fZmin) ztaz=
fZmin;
306 if (da>=1) da=
log(da);
307 if (db>=1) db=
log(db);
326 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
327 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
328 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
329 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
331 if (dd!=0) v = (da*dl+db*dm+dc*dn)/dd;
339 if (ztaz<fZmin) ztaz =
fZmin;
348 if (da>=1) da =
log(da);
349 if (db>=1) db =
log(db);
350 if (da!=0) dc = db/da;
389 Double_t pom1,pom2,sdx1=0,sdx2=0,sdy1,sdy2,spriz;
392 if (ztaz>900) ztaz = 900;
394 if (ztaz>32767) ztaz = 32767;
410 if (sx1<sx2) skrokx = 1;
412 if (sy1<sy2) skroky = 1;
416 if (
TMath::Abs(pom1)>0.0000001) sdx1 = pom2/pom1;
419 sdy1 = pom2-sdx1*pom1;
422 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
425 sdy2 = pom2-sdx2*pom1;
428 pom2 = pom1*sdx1+sdy1;
430 for (;(sx1>(
fXmin-skrokx)) && (sx1<(xmax-skrokx)) &&
431 (sy1>(
fYmin-skroky)) && (sy1<(ymax-skroky)) &&
432 (spriz==0);sx1+=skrokx) {
434 pom2 = pom1*sdx1+sdy1;
438 pom2 = pom1*sdx2+sdy2;
439 sz2 = (
Int_t)(pom2+shad_noise);
440 if (sz1>sz2) spriz = 1;
443 }
else if (sy1!=sy2) {
444 if (sy1<sy2) skroky = 1;
448 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
451 sdy2 = pom2-sdx2*pom1;
453 for (;(sy1>(
fYmin-skroky)) && (sy1<(ymax-skroky)) &&
454 (spriz==0);sy1+=skroky) {
457 pom2 = pom1*sdx2+sdy2;
458 sz2 = (
Int_t)(pom2+shad_noise);
459 if (sz1>sz2) spriz=1;
475 unsigned long uinc1=0,uinc2=0,uinc3=0,upom,i;
480 else if (iv>255) iv = 255;
481 if (
gROOT->GetColor(250+iv)) {
489 if (a >= UINT_MAX) uinc1 = UINT_MAX;
490 else uinc1 = (unsigned)a;
492 i = (uinc1-upom)/256;
493 if ((i%2)==0) uinc1 = upom;
494 else uinc1 = 255-upom;
500 i = (uinc2-upom)/256;
501 if ((i%2)==0) uinc2 = upom;
502 else uinc2 = 255-upom;
508 i = (uinc3-upom)/256;
509 if ((i%2)==0) uinc3 = upom;
510 else uinc3 = 255-upom;
529 uinc2 = (
Int_t)green;
538 red = a+0.956*b+0.62*
c;
539 green = a-0.272*b-0.647*
c;
540 blue = a-1.108*b+1.705*
c;
541 if (red>=2) red = red-2;
542 else if (red>=1) red = 2-red;
543 if (green<0) green = -green;
544 if (blue>=2) blue = blue-2;
545 else if (blue>=1) blue = 2-blue;
546 else if (blue<-1) blue = 2+blue;
547 else if (blue<0) blue = -blue;
552 uinc2 = (
Int_t)green;
610 uinc2 = (
Int_t)green;
613 ui = uinc1+uinc2*256+uinc3*65536;
648 uinc2 = (
Int_t)green;
657 red = a+0.956*b+0.62*
c;
658 green = a-0.272*b-0.647*
c;
659 blue = a-1.108*b+1.705*
c;
660 if (red>=2) red = red-2;
661 else if (red>=1) red = red-1;
662 if (green<0) green = 1+green;
663 if (blue>=2) blue = blue-2;
664 else if (blue>=1) blue = blue-1;
665 else if (blue<-1) blue = 2+blue;
666 else if (blue<0) blue = 1+blue;
671 uinc2 = (
Int_t)green;
729 uinc2 = (
Int_t)green;
732 ui = uinc1+uinc2*256+uinc3*65536;
753 for (j=i+1;j<=3;j++) a = a*j;
754 for (j=1;j<=3-i;j++) a = a/j;
767 for (j=1;j<=i;j++) v = v*bezf;
768 for (j=1;j<=3-i;j++) v = v*(1-bezf);
797 Int_t x,
y,krok,xold=0,yold=0,prvy,yprv=0;
858 krok = (x1<
x2)? 1:-1;
889 if (y1!=y2) y += (y1<y2)? +1:-1;
898 if (((x<=x2)&&(x1<x2)) || ((x>=
x2)&&(x1>x2)))
goto l1;
910 Int_t x,
y,krok,xold=0,yold=0,prvy,xprv,yprv=0;
945 krok = (x1<
x2)? 1:-1;
977 if (y1!=y2) y+=(y1<y2)? +1:-1;
986 if (((x<=x2)&&(x1<x2)) || ((x>=
x2)&&(x1>x2)))
goto l1;
1020 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y)+1);
1022 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2+1)+1);
1026 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y)+1);
1028 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2+1)+1);
1030 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y+h/2+1)+1);
1032 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y-h/2-1)+1);
1036 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y+h/2)+1);
1038 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y+h/2)+1);
1040 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y-h/2)+1);
1042 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y-h/2)+1);
1046 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y+h/2+1)+1);
1048 gPad->PixeltoX(x+w/2+1),
gPad->PixeltoY(y-h/2-1)+1);
1052 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y)+1);
1054 gPad->PixeltoX(x) ,
gPad->PixeltoY(y+h/2)+1);
1056 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y)+1);
1058 gPad->PixeltoX(x) ,
gPad->PixeltoY(y-h/2)+1);
1062 gPad->PixeltoX(x-w/2),
gPad->PixeltoY(y+h/2)+1);
1064 gPad->PixeltoX(x+w/2),
gPad->PixeltoY(y+h/2)+1);
1066 gPad->PixeltoX(x) ,
gPad->PixeltoY(y-h/2)+1);
1083 Int_t krok,xi,yi,xj,yj,
a,b,
as,bs,pr,ae,be;
1096 krok = (xi<xj)? 1:-1;
1113 if (yi!=yj) b += (yi<yj)? +1:-1;
1130 gPad->PixeltoX(ae),
gPad->PixeltoY(be)+1);
1147 for (a=xi;a<=xj;a++) {
1153 for (a=xj;a<=xi;a++) {
1528 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;
1529 Int_t ix5,iy5,x6,y6,x7,y7,y8,x1d,y1d,x2d=0,y2d=0;
1530 Int_t i1=0,i2=0,i3=0,i4=0,j1=0,j2=0,j3=0,j4=0;
1531 Int_t s1=0,s2=0,s3=0,s4=0,
t1=0,t2=0,t3=0,t4=0;
1532 Double_t dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4,z1,z2,z3,z4,zl,zh;
1533 Double_t xa,xb=0,ya,yb=0,x5=0,y5=0;
1534 Double_t da=0,db=0,dc=0,dd=0,xtaz,ytaz,ztaz,
v,shad_noise;
1535 Int_t iv=0,ekv,stvor,sx1,sx2,sx3,sx4,sx5,sy1,sy2,sy3,sy4,sy5;
1536 Double_t pom1,pom2,sdx1,sdy1,sdx2=0,sdy2,sdx3,sdy3,sdy4,spriz;
1537 Int_t sr1=0,sr2=0,sr3=0,sr4=0,sr5=0,sr6=0,sr7=0,sr8=0;
1538 Int_t tr1=0,tr2=0,tr3=0,tr4=0,tr5=0,tr6=0,tr7=0,tr8=0;
1539 Int_t il,iv1=0,iv2=0,iv3=0,iv4=0;
1540 Double_t v1=0,v2=0,v3=0,v4=0,dxr1,dxr2,dyr1,dyr2,zr1,zr2,bezf;
1541 Double_t dcount_reg,z1l,z2l,z3l,z4l,sdx2p,sdy2p,dap,dbp,dcp,ddp;
1542 Int_t sx1p,sy1p,sx3p,uip=0;
1544 Double_t p000x,p000y,p100x,p100y,p010x,p010y,p110x,p110y;
1545 Double_t p001x,p001y,p101x,p101y,p011x,p011y,p111x,p111y;
1546 Int_t ibezx1=0,ibezy1=0,ibezx2,ibezy2;
1547 unsigned ui1,ui2,ui3;
1550 Double_t mxx,mxy,myx,myy,myz,px,py,kx,ky;
1551 Double_t bxl,bxh,byl,byh,xd,yd,
a,b,rotx,roty;
1561 printf(
"The canvas size exceed the maximum X screen resolution.\n");
1562 printf(
"Use the option bf() to increase the buffer size (it should be greater than %d).\n",
fBx2);
1575 fBx2 =
gPad->XtoPixel(0.99);
1597 alfa = (
fAlpha*3.1415927)/180;
1598 beta = (
fBeta*3.1415927)/180;
1607 mx = (bxh-bxl)/(x3max*(
cos(alfa)+
cos(beta)));
1608 my = (bxh-bxl)/(y3max*(
cos(alfa)+
cos(beta)));
1609 mul = (byh-byl)/(bxh-bxl);
1610 movx = bxl+my*
cos(alfa)*y3max;
1614 myy = mul*((-1)*mx*
sin(beta)*
sin(fi)+my*
sin(alfa)*
cos(fi));
1615 px = rotx*mx*
cos(beta)-roty*my*
cos(alfa)+movx;
1628 fVx = mxx*xmin+mxy*ymin+px;
1630 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1631 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1632 movy = byl+mul*mz*zmax;
1634 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1636 fVy = myx*xmin+myy*ymin+py;
1639 if (zmin>=1) zmin =
log(zmin);
1641 if (zmax>=1) zmax =
log(zmax);
1643 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1644 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1645 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1646 movy = byl+mul*mz*zmax;
1648 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1650 fVy = myx*xmin+myy*ymin+py;
1653 if (zmin>=1) zmin =
sqrt(zmin);
1655 if (zmax>=1) zmax =
sqrt(zmax);
1657 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1658 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1659 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1660 movy = byl+mul*mz*zmax;
1662 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1664 fVy = myx*xmin+myy*ymin+py;
1672 dcount_reg=
log(dcount_reg);
1675 dcount_reg=
sqrt(dcount_reg);
1686 p000y =
gPad->PixeltoY(
fYt)+1;
1689 p100y =
gPad->PixeltoY(
fYt)+1;
1692 p010y =
gPad->PixeltoY(
fYt)+1;
1695 p110y =
gPad->PixeltoY(
fYt)+1;
1699 p001y =
gPad->PixeltoY(
fYt)+1;
1702 p101y =
gPad->PixeltoY(
fYt)+1;
1705 p011y =
gPad->PixeltoY(
fYt)+1;
1708 p111y =
gPad->PixeltoY(
fYt)+1;
1709 Double_t bmin, bmax, binLow, binHigh, binWidth;
1710 Double_t axisLevel, gridDist, gridY1, gridY2;
1718 axis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx,
"");
1719 axis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivx,
"");
1721 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1723 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1724 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1725 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1731 nbins, binWidth,
" ");
1732 for (i = 0; i < nbins + 1; i++) {
1733 axisLevel = binLow+i*binWidth;
1734 gridDist = (axisLevel-bmin)*(p001y-p000y)/(bmax-bmin);
1735 gridY1 = p000y + gridDist, gridY2 = p100y + gridDist;
1736 line->
PaintLine(p000x,gridY1,p100x,gridY2);
1737 gridY2 = p010y + gridDist;
1738 line->
PaintLine(p000x,gridY1,p010x,gridY2);
1742 axis->
PaintAxis(p010x, p010y, p000x, p000y, bmin, bmax, ndivx,
"");
1743 axis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx,
"");
1745 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1747 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1748 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1749 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1755 nbins, binWidth,
" ");
1756 for (i = 0; i < nbins + 1; i++) {
1757 axisLevel = binLow+i*binWidth;
1758 gridDist = (axisLevel-bmin)*(p011y-p010y)/(bmax-bmin);
1759 gridY1 = p010y + gridDist, gridY2 = p000y + gridDist;
1760 line->
PaintLine(p010x,gridY1,p000x,gridY2);
1761 gridY2 = p110y + gridDist;
1762 line->
PaintLine(p010x,gridY1,p110x,gridY2);
1766 axis->
PaintAxis(p110x, p110y, p010x, p010y, bmin, bmax, ndivx,
"");
1767 axis->
PaintAxis(p110x, p110y, p100x, p100y, bmin, bmax, ndivx,
"");
1769 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1771 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1772 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1773 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1779 nbins, binWidth,
" ");
1780 for (i = 0; i < nbins + 1; i++) {
1781 axisLevel = binLow+i*binWidth;
1782 gridDist = (axisLevel-bmin)*(p111y-p110y)/(bmax-bmin);
1783 gridY1 = p110y + gridDist, gridY2 = p010y + gridDist;
1784 line->
PaintLine(p110x,gridY1,p010x,gridY2);
1785 gridY2 = p100y + gridDist;
1786 line->
PaintLine(p110x,gridY1,p100x,gridY2);
1790 axis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivx,
"");
1791 axis->
PaintAxis(p100x, p100y, p000x, p000y, bmin, bmax, ndivx,
"");
1793 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1795 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1796 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1797 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1803 nbins, binWidth,
" ");
1804 for (i = 0; i < nbins + 1; i++) {
1805 axisLevel = binLow+i*binWidth;
1806 gridDist = (axisLevel-bmin)*(p101y-p100y)/(bmax-bmin);
1807 gridY1 = p100y + gridDist, gridY2 = p110y + gridDist;
1808 line->
PaintLine(p100x,gridY1,p110x,gridY2);
1809 gridY2 = p000y + gridDist;
1810 line->
PaintLine(p100x,gridY1,p000x,gridY2);
1828 if (
x2>=
x1) turnj = 1;
1829 if (
x3>=
x2) turni = 1;
1857 if (smer==0) q1 -= 1;
1861 if (smer==0) q2 += 1;
1891 gPad->PixeltoX(x1+1),
gPad->PixeltoY(y1)+1);
1895 gPad->PixeltoX(x2+1),
gPad->PixeltoY(y2)+1);
1898 if ((q1!=q2||smer!=0) && flag==1) {
1993 xtaz = (dx1+dx2+dx4)/3;
1994 ytaz = (dy1+dy2+dy4)/3;
1995 ztaz = (z1+z2+z4)/3;
1999 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2004 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2013 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2018 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2028 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2033 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2043 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2048 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2062 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2067 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2072 da = (dxr1+dx2+dx1)/3;
2073 db = (dyr1+dy2+dy1)/3;
2077 da = (dxr1+dxr2+dx1)/3;
2078 db = (dyr1+dyr2+dy1)/3;
2079 dc = (zr1+zr2+z1)/3;
2082 da = (dxr2+dx1+dx4)/3;
2083 db = (dyr2+dy1+dy4)/3;
2088 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2093 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2098 da = (dx1+dx2+dx3)/3;
2099 db = (dy1+dy2+dy3)/3;
2103 da = (dx2+dxr1+dx3)/3;
2104 db = (dy2+dyr1+dy3)/3;
2108 da = (dx2+dxr2+dxr1)/3;
2109 db = (dy2+dyr2+dyr1)/3;
2110 dc = (z2+zr2+zr1)/3;
2113 da = (dxr2+dx2+dx1)/3;
2114 db = (dyr2+dy2+dy1)/3;
2119 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2124 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2129 da = (dx2+dx3+dx4)/3;
2130 db = (dy2+dy3+dy4)/3;
2134 da = (dx4+dx3+dxr1)/3;
2135 db = (dy4+dy3+dyr1)/3;
2139 da = (dx3+dxr2+dxr1)/3;
2140 db = (dy3+dyr2+dyr1)/3;
2141 dc = (z3+zr2+zr1)/3;
2144 da = (dx2+dxr2+dx3)/3;
2145 db = (dy2+dyr2+dy3)/3;
2150 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2155 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2160 da = (dx1+dx3+dx4)/3;
2161 db = (dy1+dy3+dy4)/3;
2165 da = (dx4+dx3+dxr2)/3;
2166 db = (dy4+dy3+dyr2)/3;
2170 da = (dx4+dxr2+dxr1)/3;
2171 db = (dy4+dyr2+dyr1)/3;
2172 dc = (z4+zr2+zr1)/3;
2175 da = (dx1+dx4+dxr1)/3;
2176 db = (dy1+dy4+dyr1)/3;
2190 iv1 = fLevels-(
Int_t)v1;
2192 iv2 = fLevels-(
Int_t)v2;
2194 iv4 = fLevels-(
Int_t)v4;
2203 iv1 = fLevels-(
Int_t)v1;
2205 iv2 = fLevels-(
Int_t)v2;
2207 iv4 = fLevels-(
Int_t)v4;
2248 xtaz = (dx3+dx2+dx4)/3;
2249 ytaz = (dy3+dy2+dy4)/3;
2250 ztaz = (z3+z2+z4)/3;
2256 iv = fLevels-(
Int_t)v;
2259 iv3 = fLevels-(
Int_t)v3;
2269 iv3 = fLevels-(
Int_t)v3;
2305 if ((q1!=q2||smer!=0)&&flag==1) {
2400 xtaz = (dx1+dx2+dx4)/3;
2401 ytaz = (dy1+dy2+dy4)/3;
2402 ztaz = (z1+z2+z4)/3;
2406 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2411 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2420 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2425 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2435 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2440 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2450 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2455 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2469 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2474 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2479 da = (dxr1+dx2+dx1)/3;
2480 db = (dyr1+dy2+dy1)/3;
2484 da = (dxr1+dxr2+dx1)/3;
2485 db = (dyr1+dyr2+dy1)/3;
2486 dc = (zr1+zr2+z1)/3;
2489 da = (dxr2+dx1+dx4)/3;
2490 db = (dyr2+dy1+dy4)/3;
2495 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2500 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2505 da = (dx1+dx2+dx3)/3;
2506 db = (dy1+dy2+dy3)/3;
2510 da = (dx2+dxr1+dx3)/3;
2511 db = (dy2+dyr1+dy3)/3;
2515 da = (dx2+dxr2+dxr1)/3;
2516 db = (dy2+dyr2+dyr1)/3;
2517 dc = (z2+zr2+zr1)/3;
2520 da = (dxr2+dx2+dx1)/3;
2521 db = (dyr2+dy2+dy1)/3;
2526 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2531 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2536 da = (dx2+dx3+dx4)/3;
2537 db = (dy2+dy3+dy4)/3;
2541 da = (dx4+dx3+dxr1)/3;
2542 db = (dy4+dy3+dyr1)/3;
2546 da = (dx3+dxr2+dxr1)/3;
2547 db = (dy3+dyr2+dyr1)/3;
2548 dc = (z3+zr2+zr1)/3;
2551 da = (dx2+dxr2+dx3)/3;
2552 db = (dy2+dyr2+dy3)/3;
2557 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2562 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2567 da = (dx1+dx3+dx4)/3;
2568 db = (dy1+dy3+dy4)/3;
2572 da = (dx4+dx3+dxr2)/3;
2573 db = (dy4+dy3+dyr2)/3;
2577 da = (dx4+dxr2+dxr1)/3;
2578 db = (dy4+dyr2+dyr1)/3;
2579 dc = (z4+zr2+zr1)/3;
2582 da = (dx1+dx4+dxr1)/3;
2583 db = (dy1+dy4+dyr1)/3;
2597 iv1 = fLevels-(
Int_t)v1;
2599 iv2 = fLevels-(
Int_t)v2;
2601 iv4 = fLevels-(
Int_t)v4;
2610 iv1 = fLevels-(
Int_t)v1;
2612 iv2 = fLevels-(
Int_t)v2;
2614 iv4 = fLevels-(
Int_t)v4;
2630 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2631 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2632 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2633 dd = -da*dx1-db*dy1-dc*z1;
2650 if (pom2!=0) sdx1 = pom1/pom2;
2653 sdy1 = pom1-sdx1*pom2;
2654 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2656 sdy4 = sdx1*pom1+sdy1;
2657 sy4 = (
Int_t)(sdy4);
2665 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2666 else v = (iv1+iv2+iv4)/3;
2680 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2681 else v = (iv1+iv2+iv4)/3;
2705 if (pom2!=0) sdx2 = pom1/pom2;
2708 sdy2 = pom1-sdx2*pom2;
2719 xtaz = (dx3+dx2+dx4)/3;
2720 ytaz = (dy3+dy2+dy4)/3;
2721 ztaz = (z3+z2+z4)/3;
2727 iv = fLevels-(
Int_t)v;
2730 iv3 = fLevels-(
Int_t)v3;
2740 iv3 = fLevels-(
Int_t)v3;
2756 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2757 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2758 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2759 dd = -da*dx1-db*dy1-dc*z1;
2776 if (pom2!=0) sdx1 = pom1/pom2;
2779 sdy1 = pom1-sdx1*pom2;
2780 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2782 sdy4 = sdx1*pom1+sdy1;
2791 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2792 else v = (iv1+iv2+iv4)/3;
2806 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2807 else v = (iv1+iv2+iv4)/3;
2817 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
2819 sdy4 = sdx2p*pom1+sdy2p;
2829 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2830 else v = (iv1+iv2+iv4)/3;
2845 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2846 else v = (iv1+iv2+iv4)/3;
2871 if (pom2!=0) sdx2 = pom1/pom2;
2874 sdy2 = pom1-sdx2*pom2;
2875 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
2877 sdy4 = sdx2*pom1+sdy2;
2886 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2887 else v =(iv1+iv2+iv4)/3;
2901 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2902 else v =(iv1+iv2+iv4)/3;
2915 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
2920 }
else if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
2948 bezy1 = y1+(y2-y3)/6;
2949 bezy2 = y2-(y4-y1)/6;
2975 for (bezf=0;bezf<1.01;bezf+=0.1) {
2985 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3020 for (bezf=0;bezf<1.01;bezf+=0.1) {
3030 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3044 if ((q1!=q2||smer!=0)&&flag==1) {
3101 i1 = (
Int_t)(zl/dcount_reg+1);
3102 if (z1!=z2||z2!=z3||z3!=z4) {
3122 if (
fZ>zh)
goto eqend;
3126 if ((z2<=
fZ&&
fZ<z1)||(z2<
fZ&&
fZ<=z1)) {
3127 xb = (
fZ-z2)*(dx1-dx2)/(z1-z2)+dx2;
3130 if ((z1<=
fZ&&
fZ<z2)||(z1<
fZ&&
fZ<=z2)) {
3131 xb = (fZ-z1)*(dx2-dx1)/(z2-z1)+dx1;
3134 if (z2==fZ&&fZ==z1) {
3143 if ((z1<=fZ&&fZ<z4)||(z1<fZ&&fZ<=z4)) {
3144 ya = (fZ-z1)*(dy4-dy1)/(z4-z1)+dy1;
3147 if ((z4<=fZ&&fZ<z1)||(z4<fZ&&fZ<=z1)) {
3148 ya = (fZ-z4)*(dy1-dy4)/(z1-z4)+dy4;
3151 if (z4==fZ&&fZ==z1) {
3156 Slice(xa,ya,xb,yb,line);
3163 if ((z3<=fZ&&fZ<z4)||(z3<fZ&&fZ<=z4)) {
3164 xa = (fZ-z3)*(dx4-dx3)/(z4-z3)+dx3;
3167 if ((z4<=fZ&&fZ<z3)||(z4<fZ&&fZ<=z3)) {
3168 xa = (fZ-z4)*(dx3-dx4)/(z3-z4)+dx4;
3171 if (z4==fZ&&fZ==z3) {
3176 Slice(xa,ya,xb,yb,line);
3183 if ((z2<=fZ&&fZ<z3)||(z2<fZ&&fZ<=z3)) {
3184 ya = (fZ-z2)*(dy3-dy2)/(z3-z2)+dy2;
3187 if ((z3<=fZ&&fZ<z2)||(z3<fZ&&fZ<=z2)) {
3188 ya = (fZ-z3)*(dy2-dy3)/(z2-z3)+dy3;
3191 if (z3==fZ&&fZ==z2) {
3196 Slice(xa,ya,xb,yb,line);
3199 if (stvor==4)
Slice(xa,ya,x5,y5,line);
3210 if ((q1!=q2||smer!=0)&&flag==1) {
3222 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3236 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3251 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3265 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3396 if (pom2!=0) sdx1 = pom1/pom2;
3399 sdy1 = pom1-sdx1*pom2;
3402 if (pom2!=0) sdx2 = pom1/pom2;
3405 sdy2 = pom1-sdx2*pom2;
3408 if (pom2!=0) sdx3 = pom1/pom2;
3411 sdy3 = pom1-sdx3*pom2;
3414 for (sx4=sx1;sx4<=sx2;sx4++) {
3416 sdy4 = sdx1*pom1+sdy1;
3419 sdy4 = sdx2*pom1+sdy2;
3427 if ((sy4<=y5)||(sy5<y5)) {
3436 for (sx4=sx2;sx4<=sx3;sx4++) {
3438 sdy4 = sdx3*pom1+sdy3;
3441 sdy4 = sdx2*pom1+sdy2;
3449 if ((sy4<=y5)||(sy5<y5)) {
3459 for (sx4=sx1;sx4<=sx3;sx4++) {
3461 sdy4 = sdx2*pom1+sdy2;
3464 sdy4 = sdx1*pom1+sdy1;
3472 if ((sy4<=y5)||(sy5<y5)) {
3481 for (sx4=sx3;sx4<=sx2;sx4++) {
3483 sdy4 = sdx3*pom1+sdy3;
3486 sdy4 = sdx1*pom1+sdy1;
3494 if ((sy4<=y5)||(sy5<y5)) {
3538 if (pom2!=0) sdx1 = pom1/pom2;
3541 sdy1 = pom1-sdx1*pom2;
3544 if (pom2!=0) sdx2 = pom1/pom2;
3547 sdy2 = pom1-sdx2*pom2;
3550 if (pom2!=0) sdx3 = pom1/pom2;
3553 sdy3 = pom1-sdx3*pom2;
3556 for (sx4=sx1;sx4<=sx2;sx4++) {
3558 sdy4 = sdx1*pom1+sdy1;
3561 sdy4 = sdx2*pom1+sdy2;
3569 if ((sy4<=y5)||(sy5<y5)) {
3578 for (sx4=sx2;sx4<=sx3;sx4++) {
3580 sdy4 = sdx3*pom1+sdy3;
3583 sdy4 = sdx2*pom1+sdy2;
3591 if ((sy4<=y5)||(sy5<y5)) {
3601 for (sx4=sx1;sx4<=sx3;sx4++) {
3603 sdy4 = sdx2*pom1+sdy2;
3606 sdy4 = sdx1*pom1+sdy1;
3614 if ((sy4<=y5)||(sy5<y5)) {
3623 for (sx4=sx3;sx4<=sx2;sx4++) {
3625 sdy4 = sdx3*pom1+sdy3;
3628 sdy4 = sdx1*pom1+sdy1;
3636 if ((sy4<=y5)||(sy5<y5)) {
3771 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
3808 bezy1 = y1+(y2-y3)/6;
3809 bezy2 = y2-(y4-y1)/6;
3835 for (bezf=0;bezf<1.01;bezf+=0.1) {
3845 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3880 for (bezf=0;bezf<1.01;bezf+=0.1) {
3890 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3904 if ((q1!=q2||smer!=0)&&flag==1) {
3999 xtaz = (dx1+dx2+dx4)/3;
4000 ytaz = (dy1+dy2+dy4)/3;
4001 ztaz = (z1+z2+z4)/3;
4005 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4010 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4019 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4024 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4034 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4039 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4049 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4054 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4068 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4073 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4078 da = (dxr1+dx2+dx1)/3;
4079 db = (dyr1+dy2+dy1)/3;
4083 da = (dxr1+dxr2+dx1)/3;
4084 db = (dyr1+dyr2+dy1)/3;
4085 dc = (zr1+zr2+z1)/3;
4088 da = (dxr2+dx1+dx4)/3;
4089 db = (dyr2+dy1+dy4)/3;
4094 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4099 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4104 da = (dx1+dx2+dx3)/3;
4105 db = (dy1+dy2+dy3)/3;
4109 da = (dx2+dxr1+dx3)/3;
4110 db = (dy2+dyr1+dy3)/3;
4114 da = (dx2+dxr2+dxr1)/3;
4115 db = (dy2+dyr2+dyr1)/3;
4116 dc = (z2+zr2+zr1)/3;
4119 da = (dxr2+dx2+dx1)/3;
4120 db = (dyr2+dy2+dy1)/3;
4125 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4130 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4135 da = (dx2+dx3+dx4)/3;
4136 db = (dy2+dy3+dy4)/3;
4140 da = (dx4+dx3+dxr1)/3;
4141 db = (dy4+dy3+dyr1)/3;
4145 da = (dx3+dxr2+dxr1)/3;
4146 db = (dy3+dyr2+dyr1)/3;
4147 dc = (z3+zr2+zr1)/3;
4150 da = (dx2+dxr2+dx3)/3;
4151 db = (dy2+dyr2+dy3)/3;
4156 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4161 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4166 da = (dx1+dx3+dx4)/3;
4167 db = (dy1+dy3+dy4)/3;
4171 da = (dx4+dx3+dxr2)/3;
4172 db = (dy4+dy3+dyr2)/3;
4176 da = (dx4+dxr2+dxr1)/3;
4177 db = (dy4+dyr2+dyr1)/3;
4178 dc = (z4+zr2+zr1)/3;
4181 da = (dx1+dx4+dxr1)/3;
4182 db = (dy1+dy4+dyr1)/3;
4196 iv1 = fLevels-(
Int_t)v1;
4198 iv2 = fLevels-(
Int_t)v2;
4200 iv4 = fLevels-(
Int_t)v4;
4209 iv1 = fLevels-(
Int_t)v1;
4211 iv2 = fLevels-(
Int_t)v2;
4213 iv4 = fLevels-(
Int_t)v4;
4229 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4230 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4231 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4232 dd = -da*dx1-db*dy1-dc*z1;
4248 if (pom2!=0) sdx2 = pom1/pom2;
4251 sdy2 = pom1-sdx2*pom2;
4262 xtaz = (dx3+dx2+dx4)/3;
4263 ytaz = (dy3+dy2+dy4)/3;
4264 ztaz = (z3+z2+z4)/3;
4270 iv = fLevels-(
Int_t)v;
4273 iv3 = fLevels-(
Int_t)v3;
4283 iv3 = fLevels-(
Int_t)v3;
4299 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4300 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4301 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4302 dd = -da*dx1-db*dy1-dc*z1;
4319 if (pom2!=0) sdx1 = pom1/pom2;
4322 sdy1 = pom1-sdx1*pom2;
4323 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4325 sdy4 = sdx1*pom1+sdy1;
4334 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4335 else v =(iv1+iv2+iv4)/3;
4349 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4350 else v =(iv1+iv2+iv4)/3;
4360 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
4362 sdy4 = sdx2p*pom1+sdy2p;
4372 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4373 else v = (iv1+iv2+iv4)/3;
4388 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4389 else v = (iv1+iv2+iv4)/3;
4404 if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
4441 bezy1 = y1+(y2-y3)/6;
4442 bezy2 = y2-(y4-y1)/6;
4468 for (bezf=0;bezf<1.01;bezf+=0.1) {
4478 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
4513 for (bezf=0;bezf<1.01;bezf+=0.1) {
4523 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
4537 if ((q1!=q2||smer!=0)&&flag==1) {
4632 xtaz = (dx1+dx2+dx4)/3;
4633 ytaz = (dy1+dy2+dy4)/3;
4634 ztaz = (z1+z2+z4)/3;
4638 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4643 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4652 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4657 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4667 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4672 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4682 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4687 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4701 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4706 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4711 da = (dxr1+dx2+dx1)/3;
4712 db = (dyr1+dy2+dy1)/3;
4716 da = (dxr1+dxr2+dx1)/3;
4717 db = (dyr1+dyr2+dy1)/3;
4718 dc = (zr1+zr2+z1)/3;
4721 da = (dxr2+dx1+dx4)/3;
4722 db = (dyr2+dy1+dy4)/3;
4727 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4732 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4737 da = (dx1+dx2+dx3)/3;
4738 db = (dy1+dy2+dy3)/3;
4742 da = (dx2+dxr1+dx3)/3;
4743 db = (dy2+dyr1+dy3)/3;
4747 da = (dx2+dxr2+dxr1)/3;
4748 db = (dy2+dyr2+dyr1)/3;
4749 dc = (z2+zr2+zr1)/3;
4752 da = (dxr2+dx2+dx1)/3;
4753 db = (dyr2+dy2+dy1)/3;
4758 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4763 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4768 da = (dx2+dx3+dx4)/3;
4769 db = (dy2+dy3+dy4)/3;
4773 da = (dx4+dx3+dxr1)/3;
4774 db = (dy4+dy3+dyr1)/3;
4778 da = (dx3+dxr2+dxr1)/3;
4779 db = (dy3+dyr2+dyr1)/3;
4780 dc = (z3+zr2+zr1)/3;
4783 da = (dx2+dxr2+dx3)/3;
4784 db = (dy2+dyr2+dy3)/3;
4789 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4794 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4799 da = (dx1+dx3+dx4)/3;
4800 db = (dy1+dy3+dy4)/3;
4804 da = (dx4+dx3+dxr2)/3;
4805 db = (dy4+dy3+dyr2)/3;
4809 da = (dx4+dxr2+dxr1)/3;
4810 db = (dy4+dyr2+dyr1)/3;
4811 dc = (z4+zr2+zr1)/3;
4814 da = (dx1+dx4+dxr1)/3;
4815 db = (dy1+dy4+dyr1)/3;
4829 iv1 = fLevels-(
Int_t)v1;
4831 iv2 = fLevels-(
Int_t)v2;
4833 iv4 = fLevels-(
Int_t)v4;
4842 iv1 = fLevels-(
Int_t)v1;
4844 iv2 = fLevels-(
Int_t)v2;
4846 iv4 = fLevels-(
Int_t)v4;
4862 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4863 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4864 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4865 dd = -da*dx1-db*dy1-dc*z1;
4882 if (pom2!=0) sdx1 = pom1/pom2;
4885 sdy1 = pom1-sdx1*pom2;
4886 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4888 sdy4 = sdx1*pom1+sdy1;
4897 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4898 else v =(iv1+iv2+iv4)/3;
4912 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4913 else v =(iv1+iv2+iv4)/3;
4923 xtaz = (dx3+dx2+dx4)/3;
4924 ytaz = (dy3+dy2+dy4)/3;
4925 ztaz = (z3+z2+z4)/3;
4931 iv = fLevels-(
Int_t)v;
4934 iv3 = fLevels-(
Int_t)v3;
4944 iv3 = fLevels-(
Int_t)v3;
4960 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4961 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4962 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4963 dd = -da*dx1-db*dy1-dc*z1;
4980 if (pom2!=0) sdx2 = pom1/pom2;
4983 sdy2 = pom1-sdx2*pom2;
4984 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
4986 sdy4 = sdx2*pom1+sdy2;
4995 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4996 else v =(iv1+iv2+iv4)/3;
5010 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5011 else v =(iv1+iv2+iv4)/3;
5041 if ((q1!=q2||smer!=0)&&flag==1) {
5136 xtaz = (dx1+dx2+dx4)/3;
5137 ytaz = (dy1+dy2+dy4)/3;
5138 ztaz = (z1+z2+z4)/3;
5142 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5147 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5156 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5161 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5171 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5176 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5186 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5191 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5205 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5210 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5215 da = (dxr1+dx2+dx1)/3;
5216 db = (dyr1+dy2+dy1)/3;
5220 da = (dxr1+dxr2+dx1)/3;
5221 db = (dyr1+dyr2+dy1)/3;
5222 dc = (zr1+zr2+z1)/3;
5225 da = (dxr2+dx1+dx4)/3;
5226 db = (dyr2+dy1+dy4)/3;
5231 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5236 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5241 da = (dx1+dx2+dx3)/3;
5242 db = (dy1+dy2+dy3)/3;
5246 da = (dx2+dxr1+dx3)/3;
5247 db = (dy2+dyr1+dy3)/3;
5251 da = (dx2+dxr2+dxr1)/3;
5252 db = (dy2+dyr2+dyr1)/3;
5253 dc = (z2+zr2+zr1)/3;
5256 da = (dxr2+dx2+dx1)/3;
5257 db = (dyr2+dy2+dy1)/3;
5262 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5267 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5272 da = (dx2+dx3+dx4)/3;
5273 db = (dy2+dy3+dy4)/3;
5277 da = (dx4+dx3+dxr1)/3;
5278 db = (dy4+dy3+dyr1)/3;
5282 da = (dx3+dxr2+dxr1)/3;
5283 db = (dy3+dyr2+dyr1)/3;
5284 dc = (z3+zr2+zr1)/3;
5287 da = (dx2+dxr2+dx3)/3;
5288 db = (dy2+dyr2+dy3)/3;
5293 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5298 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5303 da = (dx1+dx3+dx4)/3;
5304 db = (dy1+dy3+dy4)/3;
5308 da = (dx4+dx3+dxr2)/3;
5309 db = (dy4+dy3+dyr2)/3;
5313 da = (dx4+dxr2+dxr1)/3;
5314 db = (dy4+dyr2+dyr1)/3;
5315 dc = (z4+zr2+zr1)/3;
5318 da = (dx1+dx4+dxr1)/3;
5319 db = (dy1+dy4+dyr1)/3;
5346 iv1 = fLevels-(
Int_t)v1;
5348 iv2 = fLevels-(
Int_t)v2;
5350 iv4 = fLevels-(
Int_t)v4;
5366 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5367 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5368 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5369 dd = -da*dx1-db*dy1-dc*z1;
5406 if (pom2!=0) sdx1 = pom1/pom2;
5409 sdy1 = pom1-sdx1*pom2;
5412 if (pom2!=0) sdx2 = pom1/pom2;
5415 sdy2 = pom1-sdx2*pom2;
5418 if (pom2!=0) sdx3 = pom1/pom2;
5421 sdy3 = pom1-sdx3*pom2;
5424 for (sx4=sx1;sx4<=sx2;sx4++) {
5426 sdy4 = sdx1*pom1+sdy1;
5429 sdy4 = sdx2*pom1+sdy2;
5437 if ((sy4<=y5)||(sy5<y5)) {
5443 for (il=sy5;il<=sy4+1;il++) {
5445 if(il<=sy4) dy1 = il;
5447 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5448 else v =(iv1+iv2+iv4)/3;
5460 for (sx4=sx2;sx4<=sx3;sx4++) {
5462 sdy4 = sdx3*pom1+sdy3;
5465 sdy4 = sdx2*pom1+sdy2;
5473 if ((sy4<=y5)||(sy5<y5)) {
5479 for (il=sy5;il<=sy4+1;il++) {
5481 if(il<=sy4) dy1 = il;
5483 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5484 else v =(iv1+iv2+iv4)/3;
5497 for (sx4=sx1;sx4<=sx3;sx4++) {
5499 sdy4 = sdx2*pom1+sdy2;
5502 sdy4 = sdx1*pom1+sdy1;
5510 if ((sy4<=y5)||(sy5<y5)) {
5516 for (il=sy5;il<=sy4+1;il++) {
5518 if(il<=sy4) dy1 = il;
5520 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5521 else v =(iv1+iv2+iv4)/3;
5533 for (sx4=sx3;sx4<=sx2;sx4++) {
5535 sdy4 = sdx3*pom1+sdy3;
5538 sdy4 = sdx1*pom1+sdy1;
5546 if ((sy4<=y5)||(sy5<y5)) {
5552 for (il=sy5;il<=sy4+1;il++) {
5554 if(il<=sy4) dy1 = il;
5556 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5557 else v =(iv1+iv2+iv4)/3;
5569 xtaz = (dx3+dx2+dx4)/3;
5570 ytaz = (dy3+dy2+dy4)/3;
5571 ztaz = (z3+z2+z4)/3;
5577 iv = fLevels-(
Int_t)v;
5580 iv3 = fLevels-(
Int_t)v3;
5590 iv3 = fLevels-(
Int_t)v3;
5606 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5607 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5608 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5609 dd = -da*dx1-db*dy1-dc*z1;
5646 if (pom2!=0) sdx1 = pom1/pom2;
5649 sdy1 = pom1-sdx1*pom2;
5652 if (pom2!=0) sdx2 = pom1/pom2;
5655 sdy2 = pom1-sdx2*pom2;
5658 if (pom2!=0) sdx3 = pom1/pom2;
5661 sdy3 = pom1-sdx3*pom2;
5664 for (sx4=sx1;sx4<=sx2;sx4++) {
5666 sdy4 = sdx1*pom1+sdy1;
5669 sdy4 = sdx2*pom1+sdy2;
5677 if ((sy4<=y5)||(sy5<y5)) {
5683 for (il=sy5;il<=sy4+1;il++) {
5685 if(il<=sy4) dy1 = il;
5687 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5688 else v =(iv2+iv3+iv4)/3;
5700 for (sx4=sx2;sx4<=sx3;sx4++) {
5702 sdy4 = sdx3*pom1+sdy3;
5705 sdy4 = sdx2*pom1+sdy2;
5713 if ((sy4<=y5)||(sy5<y5)) {
5719 for (il=sy5;il<=sy4+1;il++) {
5721 if(il<=sy4) dy1 = il;
5723 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5724 else v =(iv2+iv3+iv4)/3;
5737 for (sx4=sx1;sx4<=sx3;sx4++) {
5739 sdy4 = sdx2*pom1+sdy2;
5742 sdy4 = sdx1*pom1+sdy1;
5750 if ((sy4<=y5)||(sy5<y5)) {
5756 for (il=sy5;il<=sy4+1;il++) {
5758 if(il<=sy4) dy1 = il;
5760 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5761 else v =(iv2+iv3+iv4)/3;
5773 for (sx4=sx3;sx4<=sx2;sx4++) {
5775 sdy4 = sdx3*pom1+sdy3;
5778 sdy4 = sdx1*pom1+sdy1;
5786 if ((sy4<=y5)||(sy5<y5)) {
5792 for (il=sy5;il<=sy4+1;il++) {
5794 if(il<=sy4) dy1 = il;
5796 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5797 else v =(iv2+iv3+iv4)/3;
5813 if ((q1!=q2||smer!=0)&&flag==1) {
5857 if ((q1!=q2||smer!=0)&&flag==1) {
5900 if ((q1!=q2||smer!=0)&&flag==1) {
5995 xtaz = (dx1+dx2+dx4)/3;
5996 ytaz = (dy1+dy2+dy4)/3;
5997 ztaz = (z1+z2+z4)/3;
6001 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6006 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6015 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6020 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6030 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6035 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6045 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6050 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6064 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6069 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6074 da = (dxr1+dx2+dx1)/3;
6075 db = (dyr1+dy2+dy1)/3;
6079 da = (dxr1+dxr2+dx1)/3;
6080 db = (dyr1+dyr2+dy1)/3;
6081 dc = (zr1+zr2+z1)/3;
6084 da = (dxr2+dx1+dx4)/3;
6085 db = (dyr2+dy1+dy4)/3;
6090 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6095 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6100 da = (dx1+dx2+dx3)/3;
6101 db = (dy1+dy2+dy3)/3;
6105 da = (dx2+dxr1+dx3)/3;
6106 db = (dy2+dyr1+dy3)/3;
6110 da = (dx2+dxr2+dxr1)/3;
6111 db = (dy2+dyr2+dyr1)/3;
6112 dc = (z2+zr2+zr1)/3;
6115 da = (dxr2+dx2+dx1)/3;
6116 db = (dyr2+dy2+dy1)/3;
6121 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6126 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6131 da = (dx2+dx3+dx4)/3;
6132 db = (dy2+dy3+dy4)/3;
6136 da = (dx4+dx3+dxr1)/3;
6137 db = (dy4+dy3+dyr1)/3;
6141 da = (dx3+dxr2+dxr1)/3;
6142 db = (dy3+dyr2+dyr1)/3;
6143 dc = (z3+zr2+zr1)/3;
6146 da = (dx2+dxr2+dx3)/3;
6147 db = (dy2+dyr2+dy3)/3;
6152 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6157 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6162 da = (dx1+dx3+dx4)/3;
6163 db = (dy1+dy3+dy4)/3;
6167 da = (dx4+dx3+dxr2)/3;
6168 db = (dy4+dy3+dyr2)/3;
6172 da = (dx4+dxr2+dxr1)/3;
6173 db = (dy4+dyr2+dyr1)/3;
6174 dc = (z4+zr2+zr1)/3;
6177 da = (dx1+dx4+dxr1)/3;
6178 db = (dy1+dy4+dyr1)/3;
6192 iv1 = fLevels-(
Int_t)v1;
6194 iv2 = fLevels-(
Int_t)v2;
6196 iv4 = fLevels-(
Int_t)v4;
6205 iv1 = fLevels-(
Int_t)v1;
6207 iv2 = fLevels-(
Int_t)v2;
6209 iv4 = fLevels-(
Int_t)v4;
6225 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6226 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6227 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6228 dd = -da*dx1-db*dy1-dc*z1;
6245 if (pom2!=0) sdx1 = pom1/pom2;
6248 sdy1 = pom1-sdx1*pom2;
6249 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6251 sdy4 = sdx1*pom1+sdy1;
6260 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6261 else v = (iv1+iv2+iv4)/3;
6275 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6276 else v = (iv1+iv2+iv4)/3;
6300 if (pom2!=0) sdx2 = pom1/pom2;
6303 sdy2 = pom1-sdx2*pom2;
6314 xtaz = (dx3+dx2+dx4)/3;
6315 ytaz = (dy3+dy2+dy4)/3;
6316 ztaz = (z3+z2+z4)/3;
6322 iv = fLevels-(
Int_t)v;
6325 iv3 = fLevels-(
Int_t)v3;
6335 iv3 = fLevels-(
Int_t)v3;
6351 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6352 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6353 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6354 dd = -da*dx1-db*dy1-dc*z1;
6371 if (pom2!=0) sdx1 = pom1/pom2;
6374 sdy1 = pom1-sdx1*pom2;
6375 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6377 sdy4 = sdx1*pom1+sdy1;
6386 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6387 else v = (iv1+iv2+iv4)/3;
6401 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6402 else v = (iv1+iv2+iv4)/3;
6427 if (pom2!=0) sdx1 = pom1/pom2;
6430 sdy1 = pom1-sdx1*pom2;
6431 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6433 sdy4 = sdx1*pom1+sdy1;
6442 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6443 else v = (iv1+iv2+iv4)/3;
6457 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6458 else v = (iv1+iv2+iv4)/3;
6468 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
6470 sdy4 = sdx2p*pom1+sdy2p;
6480 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6481 else v = (iv1+iv2+iv4)/3;
6496 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6497 else v = (iv1+iv2+iv4)/3;
6522 if (pom2!=0) sdx2 = pom1/pom2;
6525 sdy2 = pom1-sdx2*pom2;
6526 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
6528 sdy4 = sdx2*pom1+sdy2;
6537 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6538 else v = (iv1+iv2+iv4)/3;
6552 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6553 else v = (iv1+iv2+iv4)/3;
6580 if (smer==0) q1 += 1;
6588 }
while ((q1!=qv||(q2!=(qv-1) && q2!=w2)||smer!=0||flag!=1) &&
6589 ((q1!=(qv-1) && q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6591 if (qv<=w2&&qv<=w1) {
6634 if (q2<=w2)
goto l2;
6636 }
while (q1<=w1&&q2<=w2);
6649 if (
x2>=
x1) turnj = 1;
6650 if (
x3>=
x2) turni = 1;
6678 if (smer==0) q1 -= 1;
6682 if (smer==0) q2 += 1;
6735 if (smer==0) q1 += 1;
6743 }
while ((q1!=qv||(q2!=(qv-1)&&q2!=w2)||smer!=0||flag!=1) &&
6744 ((q1!=(qv-1)&&q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6746 if (qv<=w2&&qv<=w1) {
6789 if (q2<=w2)
goto lc2;
6791 }
while (q1<=w1&&q2<=w2);
6795 static char chopt[10] =
"";
6797 axis->
PaintAxis(p101x, p101y, p111x, p111y, bmin, bmax, ndivx,
"");
6798 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
6800 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
6805 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6807 strlcat(chopt,
"N",10);
6810 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6815 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6817 strlcat(chopt,
"N",10);
6820 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6828 if (bmin <= 0) bmin=0.001*bmax;
6829 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz,
"G+");
6831 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6832 TGaxis *a1 =
new TGaxis(p010x, p010y, p011x, p011y,
"f1", ndivz,
"SDH+");
6838 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6840 strlcat(chopt,
"N",10);
6843 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, chopt);
6847 axis->
PaintAxis(p001x, p001y, p101x, p101y, bmin, bmax, ndivx,
"");
6848 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
6850 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
6855 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6857 strlcat(chopt,
"N",10);
6860 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6865 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6867 strlcat(chopt,
"N",10);
6870 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6878 if (bmin <= 0) bmin=0.001*bmax;
6879 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz,
"G+");
6881 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6882 TGaxis *a1 =
new TGaxis(p110x, p110y, p111x, p111y,
"f1", ndivz,
"SDH+");
6888 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6890 strlcat(chopt,
"N",10);
6893 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, chopt);
6897 axis->
PaintAxis(p011x, p011y, p001x, p001y, bmin, bmax, ndivx,
"");
6898 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
6900 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
6905 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6907 strlcat(chopt,
"N",10);
6910 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6915 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6917 strlcat(chopt,
"N",10);
6920 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6928 if (bmin <= 0) bmin=0.001*bmax;
6929 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz,
"G+");
6931 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6932 TGaxis *a1 =
new TGaxis(p100x, p100y, p101x, p101y,
"f1", ndivz,
"SDH+");
6938 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6940 strlcat(chopt,
"N",10);
6943 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, chopt);
6947 axis->
PaintAxis(p111x, p111y, p011x, p011y, bmin, bmax, ndivx,
"");
6948 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
6950 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
6955 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6957 strlcat(chopt,
"N",10);
6960 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6965 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6967 strlcat(chopt,
"N",10);
6970 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6978 if (bmin <= 0) bmin=0.001*bmax;
6979 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"G+");
6981 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6982 TGaxis *a1 =
new TGaxis(p000x, p000y, p001x, p001y,
"f1", ndivz,
"SDH+");
6988 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6990 strlcat(chopt,
"N",10);
6993 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"SDH+");
7030 if (color>=0 && style >=
kPenStyleSolid && style <= kPenStyleDashDot && width > 0) {
7044 if (nodesx>1&&nodesy>1) {
7059 if (alpha>=0&&alpha<=90&&beta>=0&&beta<=90&&alpha+beta<=90) {
7104 if (r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&b<=255) {
7118 if (x>=0&&y>=0&&z>=0) {
7171 if (weight>=0&&weight<=1)
fLHweight = weight;
7670 Int_t i1, i2, i3, i4, i5;
7675 while (opt.
Tokenize(token, from,
"[ (]")) {
7681 printf(
"PaintSpectrum: Display modes groups should be in the [0,3] range\n");
7685 if (i2<1 || i2>11) {
7686 printf(
"PaintSpectrum: Display modes should be in the [1,11] range\n");
7692 }
else if (token==
"pa") {
7699 }
else if (token==
"n") {
7705 }
else if (token==
"ca") {
7708 printf(
"PaintSpectrum: Color Algorithm should be in the [0,9] range\n");
7714 }
else if (token==
"zs") {
7717 printf(
"PaintSpectrum: Z-Scale should be in the [0,2] range\n");
7723 }
else if (token==
"ci") {
7730 }
else if (token==
"lhw") {
7735 }
else if (token==
"lp") {
7742 }
else if (token==
"cw") {
7747 }
else if (token==
"b") {
7750 printf(
"PaintSpectrum: Bezier should be in the [0,1] range\n");
7756 }
else if (token==
"s") {
7759 printf(
"PaintSpectrum: Shading should be in the [0,1] range\n");
7764 printf(
"PaintSpectrum: Shadow should be in the [0,1] range\n");
7770 }
else if (token==
"cm") {
7779 }
else if (token==
"cg") {
7785 }
else if (token==
"a" || token==
"a=") {
7792 }
else if (token==
"bf") {
7800 printf(
"Unknown option \"%s\"\n",token.
Data());
void SetDisplayMode(Int_t modeGroup, Int_t displayMode)
Sets display group mode and display mode: -modeGroup - the following group modes can be set: simple m...
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)
void SetAngles(Int_t alpha, Int_t beta, Int_t view)
Sets angles of the view: -alpha - angles of display,alpha+beta must be less or equal to 90...
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: -bezier - determines Bezier interpolation (applies only for simple disp...
void SetShading(Int_t shading, Int_t shadow)
Sets on/off shading and shadow switches: -shading - determines whether the picture will shaded...
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: -colorAlgorithm - rgb smooth alorithm, rgb modulo color component...
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: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels.
virtual void SetFillStyle(Style_t fstyle)
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
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
static const double x2[5]
void GetAngles(Int_t &alpha, Int_t &beta, Int_t &view)
Gets angles of the view: -alpha - angle between base line of Canvas and right lower edge of picture b...
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: -nodesx, nodesy, only the bins at the nodes points are displayed...
void EnvelopeBars(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surfuce removal for Bars, BarsX and BarsY display modes.
void SetContourWidth(Int_t width)
Sets width between horizontal slices: -width - width between contours, applies only for contours disp...
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: -weig...
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: -enable - decides whether t...
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)
void GetContourWidth(Int_t &width)
Gets width between horizontal slices: -width - width between contours, applies only for contours disp...
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)
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: -shading - determines whether the picture will shaded, smoothed (no shading, shading), for rainbowed display modes only -shadow - determines whether shadow will be drawn, for rainbowed display modes with shading according to light.
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: -r, g, b - color increments be...
virtual void SetR2(Double_t r2)
void GetChanGrid(Int_t &enable, Int_t &color)
This function gets attributes for drawing channel: -enable - decides whether the channel grid is show...
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: -enable - decides whether the channel marks are shown or n...
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
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: -x, y, z.
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: -xtaz...
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)
void GetBezier(Int_t &bezier)
Gets Bezier smoothing switch: -bezier - determines Bezier interpolation (applies only for simple disp...
void SetLightHeightWeight(Double_t weight)
Sets weight between shading according to fictive light source and according to channels counts: -weig...
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: -r, g, b - color increments be...
void SetNodes(Int_t nodesx, Int_t nodesy)
Sets nodes in both directions: -nodesx, nodesy, only the bins at the nodes points are displayed...
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: -x, y, z.
Short_t Max(Short_t a, Short_t b)
void SetColorAlgorithm(Int_t colorAlgorithm)
Sets shading color algorithm: -colorAlgorithm - applies only for rainbowed display modes (rgb smooth ...
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: -scale - it can be linear, sqrt or log.
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: -scale - linear, sqrt or log.
static const double x3[11]
const char * Data() const