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++) {
1530 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;
1531 Int_t ix5,iy5,x6,y6,x7,y7,y8,x1d,y1d,x2d=0,y2d=0;
1532 Int_t i1=0,i2=0,i3=0,i4=0,j1=0,j2=0,j3=0,j4=0;
1533 Int_t s1=0,s2=0,s3=0,s4=0,
t1=0,t2=0,t3=0,t4=0;
1534 Double_t dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4,z1,z2,z3,z4,zl,zh;
1535 Double_t xa,xb=0,ya,yb=0,x5=0,y5=0;
1536 Double_t da=0,db=0,dc=0,dd=0,xtaz,ytaz,ztaz,
v,shad_noise;
1537 Int_t iv=0,ekv,stvor,sx1,sx2,sx3,sx4,sx5,sy1,sy2,sy3,sy4,sy5;
1538 Double_t pom1,pom2,sdx1,sdy1,sdx2=0,sdy2,sdx3,sdy3,sdy4,spriz;
1539 Int_t sr1=0,sr2=0,sr3=0,sr4=0,sr5=0,sr6=0,sr7=0,sr8=0;
1540 Int_t tr1=0,tr2=0,tr3=0,tr4=0,tr5=0,tr6=0,tr7=0,tr8=0;
1541 Int_t il,iv1=0,iv2=0,iv3=0,iv4=0;
1542 Double_t v1=0,v2=0,v3=0,v4=0,dxr1,dxr2,dyr1,dyr2,zr1,zr2,bezf;
1543 Double_t dcount_reg,z1l,z2l,z3l,z4l,sdx2p,sdy2p,dap,dbp,dcp,ddp;
1544 Int_t sx1p,sy1p,sx3p,uip=0;
1546 Double_t p000x,p000y,p100x,p100y,p010x,p010y,p110x,p110y;
1547 Double_t p001x,p001y,p101x,p101y,p011x,p011y,p111x,p111y;
1548 Int_t ibezx1=0,ibezy1=0,ibezx2,ibezy2;
1549 unsigned ui1,ui2,ui3;
1552 Double_t mxx,mxy,myx,myy,myz,px,py,kx,ky;
1553 Double_t bxl,bxh,byl,byh,xd,yd,
a,b,rotx,roty;
1563 printf(
"The canvas size exceed the maximum X screen resolution.\n");
1564 printf(
"Use the option bf() to increase the buffer size (it should be greater than %d).\n",
fBx2);
1577 fBx2 =
gPad->XtoPixel(0.99);
1599 alfa = (
fAlpha*3.1415927)/180;
1600 beta = (
fBeta*3.1415927)/180;
1609 mx = (bxh-bxl)/(x3max*(
cos(alfa)+
cos(beta)));
1610 my = (bxh-bxl)/(y3max*(
cos(alfa)+
cos(beta)));
1611 mul = (byh-byl)/(bxh-bxl);
1612 movx = bxl+my*
cos(alfa)*y3max;
1616 myy = mul*((-1)*mx*
sin(beta)*
sin(fi)+my*
sin(alfa)*
cos(fi));
1617 px = rotx*mx*
cos(beta)-roty*my*
cos(alfa)+movx;
1630 fVx = mxx*xmin+mxy*ymin+px;
1632 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1633 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1634 movy = byl+mul*mz*zmax;
1636 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1638 fVy = myx*xmin+myy*ymin+py;
1641 if (zmin>=1) zmin =
log(zmin);
1643 if (zmax>=1) zmax =
log(zmax);
1645 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1646 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1647 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1648 movy = byl+mul*mz*zmax;
1650 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1652 fVy = myx*xmin+myy*ymin+py;
1655 if (zmin>=1) zmin =
sqrt(zmin);
1657 if (zmax>=1) zmax =
sqrt(zmax);
1659 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1660 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1661 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1662 movy = byl+mul*mz*zmax;
1664 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1666 fVy = myx*xmin+myy*ymin+py;
1674 dcount_reg=
log(dcount_reg);
1677 dcount_reg=
sqrt(dcount_reg);
1688 p000y =
gPad->PixeltoY(
fYt)+1;
1691 p100y =
gPad->PixeltoY(
fYt)+1;
1694 p010y =
gPad->PixeltoY(
fYt)+1;
1697 p110y =
gPad->PixeltoY(
fYt)+1;
1701 p001y =
gPad->PixeltoY(
fYt)+1;
1704 p101y =
gPad->PixeltoY(
fYt)+1;
1707 p011y =
gPad->PixeltoY(
fYt)+1;
1710 p111y =
gPad->PixeltoY(
fYt)+1;
1711 Double_t bmin, bmax, binLow, binHigh, binWidth;
1712 Double_t axisLevel, gridDist, gridY1, gridY2;
1720 axis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx,
"");
1721 axis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivx,
"");
1723 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1725 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1726 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1727 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1733 nbins, binWidth,
" ");
1734 for (i = 0; i < nbins + 1; i++) {
1735 axisLevel = binLow+i*binWidth;
1736 gridDist = (axisLevel-bmin)*(p001y-p000y)/(bmax-bmin);
1737 gridY1 = p000y + gridDist, gridY2 = p100y + gridDist;
1738 line->
PaintLine(p000x,gridY1,p100x,gridY2);
1739 gridY2 = p010y + gridDist;
1740 line->
PaintLine(p000x,gridY1,p010x,gridY2);
1744 axis->
PaintAxis(p010x, p010y, p000x, p000y, bmin, bmax, ndivx,
"");
1745 axis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx,
"");
1747 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1749 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1750 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1751 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1757 nbins, binWidth,
" ");
1758 for (i = 0; i < nbins + 1; i++) {
1759 axisLevel = binLow+i*binWidth;
1760 gridDist = (axisLevel-bmin)*(p011y-p010y)/(bmax-bmin);
1761 gridY1 = p010y + gridDist, gridY2 = p000y + gridDist;
1762 line->
PaintLine(p010x,gridY1,p000x,gridY2);
1763 gridY2 = p110y + gridDist;
1764 line->
PaintLine(p010x,gridY1,p110x,gridY2);
1768 axis->
PaintAxis(p110x, p110y, p010x, p010y, bmin, bmax, ndivx,
"");
1769 axis->
PaintAxis(p110x, p110y, p100x, p100y, bmin, bmax, ndivx,
"");
1771 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1773 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1774 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1775 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1781 nbins, binWidth,
" ");
1782 for (i = 0; i < nbins + 1; i++) {
1783 axisLevel = binLow+i*binWidth;
1784 gridDist = (axisLevel-bmin)*(p111y-p110y)/(bmax-bmin);
1785 gridY1 = p110y + gridDist, gridY2 = p010y + gridDist;
1786 line->
PaintLine(p110x,gridY1,p010x,gridY2);
1787 gridY2 = p100y + gridDist;
1788 line->
PaintLine(p110x,gridY1,p100x,gridY2);
1792 axis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivx,
"");
1793 axis->
PaintAxis(p100x, p100y, p000x, p000y, bmin, bmax, ndivx,
"");
1795 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1797 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1798 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1799 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1805 nbins, binWidth,
" ");
1806 for (i = 0; i < nbins + 1; i++) {
1807 axisLevel = binLow+i*binWidth;
1808 gridDist = (axisLevel-bmin)*(p101y-p100y)/(bmax-bmin);
1809 gridY1 = p100y + gridDist, gridY2 = p110y + gridDist;
1810 line->
PaintLine(p100x,gridY1,p110x,gridY2);
1811 gridY2 = p000y + gridDist;
1812 line->
PaintLine(p100x,gridY1,p000x,gridY2);
1830 if (
x2>=
x1) turnj = 1;
1831 if (
x3>=
x2) turni = 1;
1859 if (smer==0) q1 -= 1;
1863 if (smer==0) q2 += 1;
1893 gPad->PixeltoX(x1+1),
gPad->PixeltoY(y1)+1);
1897 gPad->PixeltoX(x2+1),
gPad->PixeltoY(y2)+1);
1900 if ((q1!=q2||smer!=0) && flag==1) {
1995 xtaz = (dx1+dx2+dx4)/3;
1996 ytaz = (dy1+dy2+dy4)/3;
1997 ztaz = (z1+z2+z4)/3;
2001 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2006 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2015 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2020 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2030 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2035 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2045 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2050 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2064 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2069 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2074 da = (dxr1+dx2+dx1)/3;
2075 db = (dyr1+dy2+dy1)/3;
2079 da = (dxr1+dxr2+dx1)/3;
2080 db = (dyr1+dyr2+dy1)/3;
2081 dc = (zr1+zr2+z1)/3;
2084 da = (dxr2+dx1+dx4)/3;
2085 db = (dyr2+dy1+dy4)/3;
2090 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2095 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2100 da = (dx1+dx2+dx3)/3;
2101 db = (dy1+dy2+dy3)/3;
2105 da = (dx2+dxr1+dx3)/3;
2106 db = (dy2+dyr1+dy3)/3;
2110 da = (dx2+dxr2+dxr1)/3;
2111 db = (dy2+dyr2+dyr1)/3;
2112 dc = (z2+zr2+zr1)/3;
2115 da = (dxr2+dx2+dx1)/3;
2116 db = (dyr2+dy2+dy1)/3;
2121 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2126 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2131 da = (dx2+dx3+dx4)/3;
2132 db = (dy2+dy3+dy4)/3;
2136 da = (dx4+dx3+dxr1)/3;
2137 db = (dy4+dy3+dyr1)/3;
2141 da = (dx3+dxr2+dxr1)/3;
2142 db = (dy3+dyr2+dyr1)/3;
2143 dc = (z3+zr2+zr1)/3;
2146 da = (dx2+dxr2+dx3)/3;
2147 db = (dy2+dyr2+dy3)/3;
2152 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2157 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2162 da = (dx1+dx3+dx4)/3;
2163 db = (dy1+dy3+dy4)/3;
2167 da = (dx4+dx3+dxr2)/3;
2168 db = (dy4+dy3+dyr2)/3;
2172 da = (dx4+dxr2+dxr1)/3;
2173 db = (dy4+dyr2+dyr1)/3;
2174 dc = (z4+zr2+zr1)/3;
2177 da = (dx1+dx4+dxr1)/3;
2178 db = (dy1+dy4+dyr1)/3;
2192 iv1 = fLevels-(
Int_t)v1;
2194 iv2 = fLevels-(
Int_t)v2;
2196 iv4 = fLevels-(
Int_t)v4;
2205 iv1 = fLevels-(
Int_t)v1;
2207 iv2 = fLevels-(
Int_t)v2;
2209 iv4 = fLevels-(
Int_t)v4;
2250 xtaz = (dx3+dx2+dx4)/3;
2251 ytaz = (dy3+dy2+dy4)/3;
2252 ztaz = (z3+z2+z4)/3;
2258 iv = fLevels-(
Int_t)v;
2261 iv3 = fLevels-(
Int_t)v3;
2271 iv3 = fLevels-(
Int_t)v3;
2307 if ((q1!=q2||smer!=0)&&flag==1) {
2402 xtaz = (dx1+dx2+dx4)/3;
2403 ytaz = (dy1+dy2+dy4)/3;
2404 ztaz = (z1+z2+z4)/3;
2408 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2413 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2422 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2427 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2437 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2442 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2452 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2457 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2471 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2476 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2481 da = (dxr1+dx2+dx1)/3;
2482 db = (dyr1+dy2+dy1)/3;
2486 da = (dxr1+dxr2+dx1)/3;
2487 db = (dyr1+dyr2+dy1)/3;
2488 dc = (zr1+zr2+z1)/3;
2491 da = (dxr2+dx1+dx4)/3;
2492 db = (dyr2+dy1+dy4)/3;
2497 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2502 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2507 da = (dx1+dx2+dx3)/3;
2508 db = (dy1+dy2+dy3)/3;
2512 da = (dx2+dxr1+dx3)/3;
2513 db = (dy2+dyr1+dy3)/3;
2517 da = (dx2+dxr2+dxr1)/3;
2518 db = (dy2+dyr2+dyr1)/3;
2519 dc = (z2+zr2+zr1)/3;
2522 da = (dxr2+dx2+dx1)/3;
2523 db = (dyr2+dy2+dy1)/3;
2528 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2533 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2538 da = (dx2+dx3+dx4)/3;
2539 db = (dy2+dy3+dy4)/3;
2543 da = (dx4+dx3+dxr1)/3;
2544 db = (dy4+dy3+dyr1)/3;
2548 da = (dx3+dxr2+dxr1)/3;
2549 db = (dy3+dyr2+dyr1)/3;
2550 dc = (z3+zr2+zr1)/3;
2553 da = (dx2+dxr2+dx3)/3;
2554 db = (dy2+dyr2+dy3)/3;
2559 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2564 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2569 da = (dx1+dx3+dx4)/3;
2570 db = (dy1+dy3+dy4)/3;
2574 da = (dx4+dx3+dxr2)/3;
2575 db = (dy4+dy3+dyr2)/3;
2579 da = (dx4+dxr2+dxr1)/3;
2580 db = (dy4+dyr2+dyr1)/3;
2581 dc = (z4+zr2+zr1)/3;
2584 da = (dx1+dx4+dxr1)/3;
2585 db = (dy1+dy4+dyr1)/3;
2599 iv1 = fLevels-(
Int_t)v1;
2601 iv2 = fLevels-(
Int_t)v2;
2603 iv4 = fLevels-(
Int_t)v4;
2612 iv1 = fLevels-(
Int_t)v1;
2614 iv2 = fLevels-(
Int_t)v2;
2616 iv4 = fLevels-(
Int_t)v4;
2632 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2633 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2634 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2635 dd = -da*dx1-db*dy1-dc*z1;
2652 if (pom2!=0) sdx1 = pom1/pom2;
2655 sdy1 = pom1-sdx1*pom2;
2656 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2658 sdy4 = sdx1*pom1+sdy1;
2659 sy4 = (
Int_t)(sdy4);
2667 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2668 else v = (iv1+iv2+iv4)/3;
2682 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2683 else v = (iv1+iv2+iv4)/3;
2707 if (pom2!=0) sdx2 = pom1/pom2;
2710 sdy2 = pom1-sdx2*pom2;
2721 xtaz = (dx3+dx2+dx4)/3;
2722 ytaz = (dy3+dy2+dy4)/3;
2723 ztaz = (z3+z2+z4)/3;
2729 iv = fLevels-(
Int_t)v;
2732 iv3 = fLevels-(
Int_t)v3;
2742 iv3 = fLevels-(
Int_t)v3;
2758 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2759 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2760 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2761 dd = -da*dx1-db*dy1-dc*z1;
2778 if (pom2!=0) sdx1 = pom1/pom2;
2781 sdy1 = pom1-sdx1*pom2;
2782 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2784 sdy4 = sdx1*pom1+sdy1;
2793 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2794 else v = (iv1+iv2+iv4)/3;
2808 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2809 else v = (iv1+iv2+iv4)/3;
2819 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
2821 sdy4 = sdx2p*pom1+sdy2p;
2831 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2832 else v = (iv1+iv2+iv4)/3;
2847 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2848 else v = (iv1+iv2+iv4)/3;
2873 if (pom2!=0) sdx2 = pom1/pom2;
2876 sdy2 = pom1-sdx2*pom2;
2877 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
2879 sdy4 = sdx2*pom1+sdy2;
2888 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2889 else v =(iv1+iv2+iv4)/3;
2903 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
2904 else v =(iv1+iv2+iv4)/3;
2917 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
2922 }
else if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
2950 bezy1 = y1+(y2-y3)/6;
2951 bezy2 = y2-(y4-y1)/6;
2977 for (bezf=0;bezf<1.01;bezf+=0.1) {
2987 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3022 for (bezf=0;bezf<1.01;bezf+=0.1) {
3032 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3046 if ((q1!=q2||smer!=0)&&flag==1) {
3103 i1 = (
Int_t)(zl/dcount_reg+1);
3104 if (z1!=z2||z2!=z3||z3!=z4) {
3124 if (
fZ>zh)
goto eqend;
3128 if ((z2<=
fZ&&
fZ<z1)||(z2<
fZ&&
fZ<=z1)) {
3129 xb = (
fZ-z2)*(dx1-dx2)/(z1-z2)+dx2;
3132 if ((z1<=
fZ&&
fZ<z2)||(z1<
fZ&&
fZ<=z2)) {
3133 xb = (fZ-z1)*(dx2-dx1)/(z2-z1)+dx1;
3136 if (z2==fZ&&fZ==z1) {
3145 if ((z1<=fZ&&fZ<z4)||(z1<fZ&&fZ<=z4)) {
3146 ya = (fZ-z1)*(dy4-dy1)/(z4-z1)+dy1;
3149 if ((z4<=fZ&&fZ<z1)||(z4<fZ&&fZ<=z1)) {
3150 ya = (fZ-z4)*(dy1-dy4)/(z1-z4)+dy4;
3153 if (z4==fZ&&fZ==z1) {
3158 Slice(xa,ya,xb,yb,line);
3165 if ((z3<=fZ&&fZ<z4)||(z3<fZ&&fZ<=z4)) {
3166 xa = (fZ-z3)*(dx4-dx3)/(z4-z3)+dx3;
3169 if ((z4<=fZ&&fZ<z3)||(z4<fZ&&fZ<=z3)) {
3170 xa = (fZ-z4)*(dx3-dx4)/(z3-z4)+dx4;
3173 if (z4==fZ&&fZ==z3) {
3178 Slice(xa,ya,xb,yb,line);
3185 if ((z2<=fZ&&fZ<z3)||(z2<fZ&&fZ<=z3)) {
3186 ya = (fZ-z2)*(dy3-dy2)/(z3-z2)+dy2;
3189 if ((z3<=fZ&&fZ<z2)||(z3<fZ&&fZ<=z2)) {
3190 ya = (fZ-z3)*(dy2-dy3)/(z2-z3)+dy3;
3193 if (z3==fZ&&fZ==z2) {
3198 Slice(xa,ya,xb,yb,line);
3201 if (stvor==4)
Slice(xa,ya,x5,y5,line);
3212 if ((q1!=q2||smer!=0)&&flag==1) {
3224 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3238 if (s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3253 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3267 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3398 if (pom2!=0) sdx1 = pom1/pom2;
3401 sdy1 = pom1-sdx1*pom2;
3404 if (pom2!=0) sdx2 = pom1/pom2;
3407 sdy2 = pom1-sdx2*pom2;
3410 if (pom2!=0) sdx3 = pom1/pom2;
3413 sdy3 = pom1-sdx3*pom2;
3416 for (sx4=sx1;sx4<=sx2;sx4++) {
3418 sdy4 = sdx1*pom1+sdy1;
3421 sdy4 = sdx2*pom1+sdy2;
3429 if ((sy4<=y5)||(sy5<y5)) {
3438 for (sx4=sx2;sx4<=sx3;sx4++) {
3440 sdy4 = sdx3*pom1+sdy3;
3443 sdy4 = sdx2*pom1+sdy2;
3451 if ((sy4<=y5)||(sy5<y5)) {
3461 for (sx4=sx1;sx4<=sx3;sx4++) {
3463 sdy4 = sdx2*pom1+sdy2;
3466 sdy4 = sdx1*pom1+sdy1;
3474 if ((sy4<=y5)||(sy5<y5)) {
3483 for (sx4=sx3;sx4<=sx2;sx4++) {
3485 sdy4 = sdx3*pom1+sdy3;
3488 sdy4 = sdx1*pom1+sdy1;
3496 if ((sy4<=y5)||(sy5<y5)) {
3540 if (pom2!=0) sdx1 = pom1/pom2;
3543 sdy1 = pom1-sdx1*pom2;
3546 if (pom2!=0) sdx2 = pom1/pom2;
3549 sdy2 = pom1-sdx2*pom2;
3552 if (pom2!=0) sdx3 = pom1/pom2;
3555 sdy3 = pom1-sdx3*pom2;
3558 for (sx4=sx1;sx4<=sx2;sx4++) {
3560 sdy4 = sdx1*pom1+sdy1;
3563 sdy4 = sdx2*pom1+sdy2;
3571 if ((sy4<=y5)||(sy5<y5)) {
3580 for (sx4=sx2;sx4<=sx3;sx4++) {
3582 sdy4 = sdx3*pom1+sdy3;
3585 sdy4 = sdx2*pom1+sdy2;
3593 if ((sy4<=y5)||(sy5<y5)) {
3603 for (sx4=sx1;sx4<=sx3;sx4++) {
3605 sdy4 = sdx2*pom1+sdy2;
3608 sdy4 = sdx1*pom1+sdy1;
3616 if ((sy4<=y5)||(sy5<y5)) {
3625 for (sx4=sx3;sx4<=sx2;sx4++) {
3627 sdy4 = sdx3*pom1+sdy3;
3630 sdy4 = sdx1*pom1+sdy1;
3638 if ((sy4<=y5)||(sy5<y5)) {
3773 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
3810 bezy1 = y1+(y2-y3)/6;
3811 bezy2 = y2-(y4-y1)/6;
3837 for (bezf=0;bezf<1.01;bezf+=0.1) {
3847 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3882 for (bezf=0;bezf<1.01;bezf+=0.1) {
3892 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3906 if ((q1!=q2||smer!=0)&&flag==1) {
4001 xtaz = (dx1+dx2+dx4)/3;
4002 ytaz = (dy1+dy2+dy4)/3;
4003 ztaz = (z1+z2+z4)/3;
4007 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4012 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4021 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4026 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4036 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4041 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4051 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4056 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4070 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4075 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4080 da = (dxr1+dx2+dx1)/3;
4081 db = (dyr1+dy2+dy1)/3;
4085 da = (dxr1+dxr2+dx1)/3;
4086 db = (dyr1+dyr2+dy1)/3;
4087 dc = (zr1+zr2+z1)/3;
4090 da = (dxr2+dx1+dx4)/3;
4091 db = (dyr2+dy1+dy4)/3;
4096 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4101 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4106 da = (dx1+dx2+dx3)/3;
4107 db = (dy1+dy2+dy3)/3;
4111 da = (dx2+dxr1+dx3)/3;
4112 db = (dy2+dyr1+dy3)/3;
4116 da = (dx2+dxr2+dxr1)/3;
4117 db = (dy2+dyr2+dyr1)/3;
4118 dc = (z2+zr2+zr1)/3;
4121 da = (dxr2+dx2+dx1)/3;
4122 db = (dyr2+dy2+dy1)/3;
4127 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4132 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4137 da = (dx2+dx3+dx4)/3;
4138 db = (dy2+dy3+dy4)/3;
4142 da = (dx4+dx3+dxr1)/3;
4143 db = (dy4+dy3+dyr1)/3;
4147 da = (dx3+dxr2+dxr1)/3;
4148 db = (dy3+dyr2+dyr1)/3;
4149 dc = (z3+zr2+zr1)/3;
4152 da = (dx2+dxr2+dx3)/3;
4153 db = (dy2+dyr2+dy3)/3;
4158 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4163 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4168 da = (dx1+dx3+dx4)/3;
4169 db = (dy1+dy3+dy4)/3;
4173 da = (dx4+dx3+dxr2)/3;
4174 db = (dy4+dy3+dyr2)/3;
4178 da = (dx4+dxr2+dxr1)/3;
4179 db = (dy4+dyr2+dyr1)/3;
4180 dc = (z4+zr2+zr1)/3;
4183 da = (dx1+dx4+dxr1)/3;
4184 db = (dy1+dy4+dyr1)/3;
4198 iv1 = fLevels-(
Int_t)v1;
4200 iv2 = fLevels-(
Int_t)v2;
4202 iv4 = fLevels-(
Int_t)v4;
4211 iv1 = fLevels-(
Int_t)v1;
4213 iv2 = fLevels-(
Int_t)v2;
4215 iv4 = fLevels-(
Int_t)v4;
4231 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4232 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4233 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4234 dd = -da*dx1-db*dy1-dc*z1;
4250 if (pom2!=0) sdx2 = pom1/pom2;
4253 sdy2 = pom1-sdx2*pom2;
4264 xtaz = (dx3+dx2+dx4)/3;
4265 ytaz = (dy3+dy2+dy4)/3;
4266 ztaz = (z3+z2+z4)/3;
4272 iv = fLevels-(
Int_t)v;
4275 iv3 = fLevels-(
Int_t)v3;
4285 iv3 = fLevels-(
Int_t)v3;
4301 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4302 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4303 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4304 dd = -da*dx1-db*dy1-dc*z1;
4321 if (pom2!=0) sdx1 = pom1/pom2;
4324 sdy1 = pom1-sdx1*pom2;
4325 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4327 sdy4 = sdx1*pom1+sdy1;
4336 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4337 else v =(iv1+iv2+iv4)/3;
4351 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4352 else v =(iv1+iv2+iv4)/3;
4362 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
4364 sdy4 = sdx2p*pom1+sdy2p;
4374 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4375 else v = (iv1+iv2+iv4)/3;
4390 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4391 else v = (iv1+iv2+iv4)/3;
4406 if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
4443 bezy1 = y1+(y2-y3)/6;
4444 bezy2 = y2-(y4-y1)/6;
4470 for (bezf=0;bezf<1.01;bezf+=0.1) {
4480 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
4515 for (bezf=0;bezf<1.01;bezf+=0.1) {
4525 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
4539 if ((q1!=q2||smer!=0)&&flag==1) {
4634 xtaz = (dx1+dx2+dx4)/3;
4635 ytaz = (dy1+dy2+dy4)/3;
4636 ztaz = (z1+z2+z4)/3;
4640 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4645 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4654 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4659 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4669 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4674 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4684 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4689 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4703 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4708 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4713 da = (dxr1+dx2+dx1)/3;
4714 db = (dyr1+dy2+dy1)/3;
4718 da = (dxr1+dxr2+dx1)/3;
4719 db = (dyr1+dyr2+dy1)/3;
4720 dc = (zr1+zr2+z1)/3;
4723 da = (dxr2+dx1+dx4)/3;
4724 db = (dyr2+dy1+dy4)/3;
4729 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4734 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4739 da = (dx1+dx2+dx3)/3;
4740 db = (dy1+dy2+dy3)/3;
4744 da = (dx2+dxr1+dx3)/3;
4745 db = (dy2+dyr1+dy3)/3;
4749 da = (dx2+dxr2+dxr1)/3;
4750 db = (dy2+dyr2+dyr1)/3;
4751 dc = (z2+zr2+zr1)/3;
4754 da = (dxr2+dx2+dx1)/3;
4755 db = (dyr2+dy2+dy1)/3;
4760 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4765 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4770 da = (dx2+dx3+dx4)/3;
4771 db = (dy2+dy3+dy4)/3;
4775 da = (dx4+dx3+dxr1)/3;
4776 db = (dy4+dy3+dyr1)/3;
4780 da = (dx3+dxr2+dxr1)/3;
4781 db = (dy3+dyr2+dyr1)/3;
4782 dc = (z3+zr2+zr1)/3;
4785 da = (dx2+dxr2+dx3)/3;
4786 db = (dy2+dyr2+dy3)/3;
4791 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4796 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4801 da = (dx1+dx3+dx4)/3;
4802 db = (dy1+dy3+dy4)/3;
4806 da = (dx4+dx3+dxr2)/3;
4807 db = (dy4+dy3+dyr2)/3;
4811 da = (dx4+dxr2+dxr1)/3;
4812 db = (dy4+dyr2+dyr1)/3;
4813 dc = (z4+zr2+zr1)/3;
4816 da = (dx1+dx4+dxr1)/3;
4817 db = (dy1+dy4+dyr1)/3;
4831 iv1 = fLevels-(
Int_t)v1;
4833 iv2 = fLevels-(
Int_t)v2;
4835 iv4 = fLevels-(
Int_t)v4;
4844 iv1 = fLevels-(
Int_t)v1;
4846 iv2 = fLevels-(
Int_t)v2;
4848 iv4 = fLevels-(
Int_t)v4;
4864 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4865 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4866 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4867 dd = -da*dx1-db*dy1-dc*z1;
4884 if (pom2!=0) sdx1 = pom1/pom2;
4887 sdy1 = pom1-sdx1*pom2;
4888 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4890 sdy4 = sdx1*pom1+sdy1;
4899 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4900 else v =(iv1+iv2+iv4)/3;
4914 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4915 else v =(iv1+iv2+iv4)/3;
4925 xtaz = (dx3+dx2+dx4)/3;
4926 ytaz = (dy3+dy2+dy4)/3;
4927 ztaz = (z3+z2+z4)/3;
4933 iv = fLevels-(
Int_t)v;
4936 iv3 = fLevels-(
Int_t)v3;
4946 iv3 = fLevels-(
Int_t)v3;
4962 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4963 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4964 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4965 dd = -da*dx1-db*dy1-dc*z1;
4982 if (pom2!=0) sdx2 = pom1/pom2;
4985 sdy2 = pom1-sdx2*pom2;
4986 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
4988 sdy4 = sdx2*pom1+sdy2;
4997 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
4998 else v =(iv1+iv2+iv4)/3;
5012 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5013 else v =(iv1+iv2+iv4)/3;
5043 if ((q1!=q2||smer!=0)&&flag==1) {
5138 xtaz = (dx1+dx2+dx4)/3;
5139 ytaz = (dy1+dy2+dy4)/3;
5140 ztaz = (z1+z2+z4)/3;
5144 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5149 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5158 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5163 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5173 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5178 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5188 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5193 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5207 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5212 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5217 da = (dxr1+dx2+dx1)/3;
5218 db = (dyr1+dy2+dy1)/3;
5222 da = (dxr1+dxr2+dx1)/3;
5223 db = (dyr1+dyr2+dy1)/3;
5224 dc = (zr1+zr2+z1)/3;
5227 da = (dxr2+dx1+dx4)/3;
5228 db = (dyr2+dy1+dy4)/3;
5233 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5238 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5243 da = (dx1+dx2+dx3)/3;
5244 db = (dy1+dy2+dy3)/3;
5248 da = (dx2+dxr1+dx3)/3;
5249 db = (dy2+dyr1+dy3)/3;
5253 da = (dx2+dxr2+dxr1)/3;
5254 db = (dy2+dyr2+dyr1)/3;
5255 dc = (z2+zr2+zr1)/3;
5258 da = (dxr2+dx2+dx1)/3;
5259 db = (dyr2+dy2+dy1)/3;
5264 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5269 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5274 da = (dx2+dx3+dx4)/3;
5275 db = (dy2+dy3+dy4)/3;
5279 da = (dx4+dx3+dxr1)/3;
5280 db = (dy4+dy3+dyr1)/3;
5284 da = (dx3+dxr2+dxr1)/3;
5285 db = (dy3+dyr2+dyr1)/3;
5286 dc = (z3+zr2+zr1)/3;
5289 da = (dx2+dxr2+dx3)/3;
5290 db = (dy2+dyr2+dy3)/3;
5295 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5300 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5305 da = (dx1+dx3+dx4)/3;
5306 db = (dy1+dy3+dy4)/3;
5310 da = (dx4+dx3+dxr2)/3;
5311 db = (dy4+dy3+dyr2)/3;
5315 da = (dx4+dxr2+dxr1)/3;
5316 db = (dy4+dyr2+dyr1)/3;
5317 dc = (z4+zr2+zr1)/3;
5320 da = (dx1+dx4+dxr1)/3;
5321 db = (dy1+dy4+dyr1)/3;
5348 iv1 = fLevels-(
Int_t)v1;
5350 iv2 = fLevels-(
Int_t)v2;
5352 iv4 = fLevels-(
Int_t)v4;
5368 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5369 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5370 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5371 dd = -da*dx1-db*dy1-dc*z1;
5408 if (pom2!=0) sdx1 = pom1/pom2;
5411 sdy1 = pom1-sdx1*pom2;
5414 if (pom2!=0) sdx2 = pom1/pom2;
5417 sdy2 = pom1-sdx2*pom2;
5420 if (pom2!=0) sdx3 = pom1/pom2;
5423 sdy3 = pom1-sdx3*pom2;
5426 for (sx4=sx1;sx4<=sx2;sx4++) {
5428 sdy4 = sdx1*pom1+sdy1;
5431 sdy4 = sdx2*pom1+sdy2;
5439 if ((sy4<=y5)||(sy5<y5)) {
5445 for (il=sy5;il<=sy4+1;il++) {
5447 if(il<=sy4) dy1 = il;
5449 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5450 else v =(iv1+iv2+iv4)/3;
5462 for (sx4=sx2;sx4<=sx3;sx4++) {
5464 sdy4 = sdx3*pom1+sdy3;
5467 sdy4 = sdx2*pom1+sdy2;
5475 if ((sy4<=y5)||(sy5<y5)) {
5481 for (il=sy5;il<=sy4+1;il++) {
5483 if(il<=sy4) dy1 = il;
5485 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5486 else v =(iv1+iv2+iv4)/3;
5499 for (sx4=sx1;sx4<=sx3;sx4++) {
5501 sdy4 = sdx2*pom1+sdy2;
5504 sdy4 = sdx1*pom1+sdy1;
5512 if ((sy4<=y5)||(sy5<y5)) {
5518 for (il=sy5;il<=sy4+1;il++) {
5520 if(il<=sy4) dy1 = il;
5522 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5523 else v =(iv1+iv2+iv4)/3;
5535 for (sx4=sx3;sx4<=sx2;sx4++) {
5537 sdy4 = sdx3*pom1+sdy3;
5540 sdy4 = sdx1*pom1+sdy1;
5548 if ((sy4<=y5)||(sy5<y5)) {
5554 for (il=sy5;il<=sy4+1;il++) {
5556 if(il<=sy4) dy1 = il;
5558 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5559 else v =(iv1+iv2+iv4)/3;
5571 xtaz = (dx3+dx2+dx4)/3;
5572 ytaz = (dy3+dy2+dy4)/3;
5573 ztaz = (z3+z2+z4)/3;
5579 iv = fLevels-(
Int_t)v;
5582 iv3 = fLevels-(
Int_t)v3;
5592 iv3 = fLevels-(
Int_t)v3;
5608 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5609 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5610 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5611 dd = -da*dx1-db*dy1-dc*z1;
5648 if (pom2!=0) sdx1 = pom1/pom2;
5651 sdy1 = pom1-sdx1*pom2;
5654 if (pom2!=0) sdx2 = pom1/pom2;
5657 sdy2 = pom1-sdx2*pom2;
5660 if (pom2!=0) sdx3 = pom1/pom2;
5663 sdy3 = pom1-sdx3*pom2;
5666 for (sx4=sx1;sx4<=sx2;sx4++) {
5668 sdy4 = sdx1*pom1+sdy1;
5671 sdy4 = sdx2*pom1+sdy2;
5679 if ((sy4<=y5)||(sy5<y5)) {
5685 for (il=sy5;il<=sy4+1;il++) {
5687 if(il<=sy4) dy1 = il;
5689 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5690 else v =(iv2+iv3+iv4)/3;
5702 for (sx4=sx2;sx4<=sx3;sx4++) {
5704 sdy4 = sdx3*pom1+sdy3;
5707 sdy4 = sdx2*pom1+sdy2;
5715 if ((sy4<=y5)||(sy5<y5)) {
5721 for (il=sy5;il<=sy4+1;il++) {
5723 if(il<=sy4) dy1 = il;
5725 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5726 else v =(iv2+iv3+iv4)/3;
5739 for (sx4=sx1;sx4<=sx3;sx4++) {
5741 sdy4 = sdx2*pom1+sdy2;
5744 sdy4 = sdx1*pom1+sdy1;
5752 if ((sy4<=y5)||(sy5<y5)) {
5758 for (il=sy5;il<=sy4+1;il++) {
5760 if(il<=sy4) dy1 = il;
5762 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5763 else v =(iv2+iv3+iv4)/3;
5775 for (sx4=sx3;sx4<=sx2;sx4++) {
5777 sdy4 = sdx3*pom1+sdy3;
5780 sdy4 = sdx1*pom1+sdy1;
5788 if ((sy4<=y5)||(sy5<y5)) {
5794 for (il=sy5;il<=sy4+1;il++) {
5796 if(il<=sy4) dy1 = il;
5798 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
5799 else v =(iv2+iv3+iv4)/3;
5815 if ((q1!=q2||smer!=0)&&flag==1) {
5859 if ((q1!=q2||smer!=0)&&flag==1) {
5902 if ((q1!=q2||smer!=0)&&flag==1) {
5997 xtaz = (dx1+dx2+dx4)/3;
5998 ytaz = (dy1+dy2+dy4)/3;
5999 ztaz = (z1+z2+z4)/3;
6003 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6008 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6017 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6022 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6032 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6037 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6047 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6052 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6066 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6071 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6076 da = (dxr1+dx2+dx1)/3;
6077 db = (dyr1+dy2+dy1)/3;
6081 da = (dxr1+dxr2+dx1)/3;
6082 db = (dyr1+dyr2+dy1)/3;
6083 dc = (zr1+zr2+z1)/3;
6086 da = (dxr2+dx1+dx4)/3;
6087 db = (dyr2+dy1+dy4)/3;
6092 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6097 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6102 da = (dx1+dx2+dx3)/3;
6103 db = (dy1+dy2+dy3)/3;
6107 da = (dx2+dxr1+dx3)/3;
6108 db = (dy2+dyr1+dy3)/3;
6112 da = (dx2+dxr2+dxr1)/3;
6113 db = (dy2+dyr2+dyr1)/3;
6114 dc = (z2+zr2+zr1)/3;
6117 da = (dxr2+dx2+dx1)/3;
6118 db = (dyr2+dy2+dy1)/3;
6123 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6128 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6133 da = (dx2+dx3+dx4)/3;
6134 db = (dy2+dy3+dy4)/3;
6138 da = (dx4+dx3+dxr1)/3;
6139 db = (dy4+dy3+dyr1)/3;
6143 da = (dx3+dxr2+dxr1)/3;
6144 db = (dy3+dyr2+dyr1)/3;
6145 dc = (z3+zr2+zr1)/3;
6148 da = (dx2+dxr2+dx3)/3;
6149 db = (dy2+dyr2+dy3)/3;
6154 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6159 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6164 da = (dx1+dx3+dx4)/3;
6165 db = (dy1+dy3+dy4)/3;
6169 da = (dx4+dx3+dxr2)/3;
6170 db = (dy4+dy3+dyr2)/3;
6174 da = (dx4+dxr2+dxr1)/3;
6175 db = (dy4+dyr2+dyr1)/3;
6176 dc = (z4+zr2+zr1)/3;
6179 da = (dx1+dx4+dxr1)/3;
6180 db = (dy1+dy4+dyr1)/3;
6194 iv1 = fLevels-(
Int_t)v1;
6196 iv2 = fLevels-(
Int_t)v2;
6198 iv4 = fLevels-(
Int_t)v4;
6207 iv1 = fLevels-(
Int_t)v1;
6209 iv2 = fLevels-(
Int_t)v2;
6211 iv4 = fLevels-(
Int_t)v4;
6227 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6228 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6229 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6230 dd = -da*dx1-db*dy1-dc*z1;
6247 if (pom2!=0) sdx1 = pom1/pom2;
6250 sdy1 = pom1-sdx1*pom2;
6251 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6253 sdy4 = sdx1*pom1+sdy1;
6262 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6263 else v = (iv1+iv2+iv4)/3;
6277 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6278 else v = (iv1+iv2+iv4)/3;
6302 if (pom2!=0) sdx2 = pom1/pom2;
6305 sdy2 = pom1-sdx2*pom2;
6316 xtaz = (dx3+dx2+dx4)/3;
6317 ytaz = (dy3+dy2+dy4)/3;
6318 ztaz = (z3+z2+z4)/3;
6324 iv = fLevels-(
Int_t)v;
6327 iv3 = fLevels-(
Int_t)v3;
6337 iv3 = fLevels-(
Int_t)v3;
6353 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6354 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6355 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6356 dd = -da*dx1-db*dy1-dc*z1;
6373 if (pom2!=0) sdx1 = pom1/pom2;
6376 sdy1 = pom1-sdx1*pom2;
6377 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6379 sdy4 = sdx1*pom1+sdy1;
6388 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6389 else v = (iv1+iv2+iv4)/3;
6403 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6404 else v = (iv1+iv2+iv4)/3;
6429 if (pom2!=0) sdx1 = pom1/pom2;
6432 sdy1 = pom1-sdx1*pom2;
6433 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6435 sdy4 = sdx1*pom1+sdy1;
6444 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6445 else v = (iv1+iv2+iv4)/3;
6459 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6460 else v = (iv1+iv2+iv4)/3;
6470 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
6472 sdy4 = sdx2p*pom1+sdy2p;
6482 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6483 else v = (iv1+iv2+iv4)/3;
6498 if (dcp!=0) v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6499 else v = (iv1+iv2+iv4)/3;
6524 if (pom2!=0) sdx2 = pom1/pom2;
6527 sdy2 = pom1-sdx2*pom2;
6528 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
6530 sdy4 = sdx2*pom1+sdy2;
6539 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6540 else v = (iv1+iv2+iv4)/3;
6554 if (dc!=0) v = (-dd-da*dx1-db*dy1)/dc;
6555 else v = (iv1+iv2+iv4)/3;
6582 if (smer==0) q1 += 1;
6590 }
while ((q1!=qv||(q2!=(qv-1) && q2!=w2)||smer!=0||flag!=1) &&
6591 ((q1!=(qv-1) && q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6593 if (qv<=w2&&qv<=w1) {
6636 if (q2<=w2)
goto l2;
6638 }
while (q1<=w1&&q2<=w2);
6651 if (
x2>=
x1) turnj = 1;
6652 if (
x3>=
x2) turni = 1;
6680 if (smer==0) q1 -= 1;
6684 if (smer==0) q2 += 1;
6737 if (smer==0) q1 += 1;
6745 }
while ((q1!=qv||(q2!=(qv-1)&&q2!=w2)||smer!=0||flag!=1) &&
6746 ((q1!=(qv-1)&&q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6748 if (qv<=w2&&qv<=w1) {
6791 if (q2<=w2)
goto lc2;
6793 }
while (q1<=w1&&q2<=w2);
6797 static char chopt[10] =
"";
6799 axis->
PaintAxis(p101x, p101y, p111x, p111y, bmin, bmax, ndivx,
"");
6800 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
6802 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
6807 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6809 strlcat(chopt,
"N",10);
6812 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6817 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6819 strlcat(chopt,
"N",10);
6822 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6830 if (bmin <= 0) bmin=0.001*bmax;
6831 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz,
"G+");
6833 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6834 TGaxis *a1 =
new TGaxis(p010x, p010y, p011x, p011y,
"f1", ndivz,
"SDH+");
6840 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6842 strlcat(chopt,
"N",10);
6845 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, chopt);
6849 axis->
PaintAxis(p001x, p001y, p101x, p101y, bmin, bmax, ndivx,
"");
6850 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
6852 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
6857 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6859 strlcat(chopt,
"N",10);
6862 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6867 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6869 strlcat(chopt,
"N",10);
6872 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6880 if (bmin <= 0) bmin=0.001*bmax;
6881 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz,
"G+");
6883 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6884 TGaxis *a1 =
new TGaxis(p110x, p110y, p111x, p111y,
"f1", ndivz,
"SDH+");
6890 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6892 strlcat(chopt,
"N",10);
6895 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, chopt);
6899 axis->
PaintAxis(p011x, p011y, p001x, p001y, bmin, bmax, ndivx,
"");
6900 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
6902 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
6907 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6909 strlcat(chopt,
"N",10);
6912 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6917 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6919 strlcat(chopt,
"N",10);
6922 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6930 if (bmin <= 0) bmin=0.001*bmax;
6931 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz,
"G+");
6933 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6934 TGaxis *a1 =
new TGaxis(p100x, p100y, p101x, p101y,
"f1", ndivz,
"SDH+");
6940 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6942 strlcat(chopt,
"N",10);
6945 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, chopt);
6949 axis->
PaintAxis(p111x, p111y, p011x, p011y, bmin, bmax, ndivx,
"");
6950 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
6952 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
6957 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6959 strlcat(chopt,
"N",10);
6962 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6967 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6969 strlcat(chopt,
"N",10);
6972 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6980 if (bmin <= 0) bmin=0.001*bmax;
6981 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"G+");
6983 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6984 TGaxis *a1 =
new TGaxis(p000x, p000y, p001x, p001y,
"f1", ndivz,
"SDH+");
6990 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6992 strlcat(chopt,
"N",10);
6995 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"SDH+");
7032 if (color>=0 && style >=
kPenStyleSolid && style <= kPenStyleDashDot && width > 0) {
7046 if (nodesx>1&&nodesy>1) {
7061 if (alpha>=0&&alpha<=90&&beta>=0&&beta<=90&&alpha+beta<=90) {
7106 if (r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&b<=255) {
7120 if (x>=0&&y>=0&&z>=0) {
7173 if (weight>=0&&weight<=1)
fLHweight = weight;
7674 Int_t i1, i2, i3, i4, i5;
7679 while (opt.
Tokenize(token, from,
"[ (]")) {
7685 printf(
"PaintSpectrum: Display modes groups should be in the [0,3] range\n");
7689 if (i2<1 || i2>11) {
7690 printf(
"PaintSpectrum: Display modes should be in the [1,11] range\n");
7696 }
else if (token==
"pa") {
7703 }
else if (token==
"n") {
7709 }
else if (token==
"ca") {
7712 printf(
"PaintSpectrum: Color Algorithm should be in the [0,9] range\n");
7718 }
else if (token==
"zs") {
7721 printf(
"PaintSpectrum: Z-Scale should be in the [0,2] range\n");
7727 }
else if (token==
"ci") {
7734 }
else if (token==
"lhw") {
7739 }
else if (token==
"lp") {
7746 }
else if (token==
"cw") {
7751 }
else if (token==
"b") {
7754 printf(
"PaintSpectrum: Bezier should be in the [0,1] range\n");
7760 }
else if (token==
"s") {
7763 printf(
"PaintSpectrum: Shading should be in the [0,1] range\n");
7768 printf(
"PaintSpectrum: Shadow should be in the [0,1] range\n");
7774 }
else if (token==
"cm") {
7783 }
else if (token==
"cg") {
7789 }
else if (token==
"a" || token==
"a=") {
7796 }
else if (token==
"bf") {
7804 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...
Int_t GetFirst() const
Return first bin on the axis i.e.
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 Style_t GetLineStyle() const
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...
Double_t BezierBlend(Int_t i, Double_t bezf)
This function calculates Bezier approximation.
Float_t GetLabelOffset() const
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...
Float_t GetTickSize() const
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.
Double_t Atof() const
Return floating-point value contained in string.
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
ClassImp(TSpectrum2Painter) TSpectrum2Painter
TSpectrum2Painter normal constructor.
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)
double beta(double x, double y)
Calculates the beta function.
virtual void Paint(Option_t *option="")
Paint this ellipse with its current attributes.
const char * Data() const
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"...
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]
Int_t Atoi() const
Return integer value of string.
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 Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
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.
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 Color_t GetLineColor() const
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
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 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.
void SetLabelOffset(Float_t labeloffset)
static const double x1[5]
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
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...
virtual Int_t GetNdivisions() const
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...
Int_t GetLast() const
Return last bin on the axis i.e.
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 ...
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.
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...
virtual Width_t GetLineWidth() const
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...
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]