void TH2CB::MakeLevel(TH2DrawTool &c, const UInt_t n, set<Int_t>::const_iterator &nexthole, UInt_t& vbins) { const vec& a(shape.at(1)); const vec& b(shape.at(2)); if(n>=4) { ++vbins; if( (nexthole == bins_in_holes.end()) || (*nexthole!=vbins)) { c.Draw(shape); c.FinishShape(); } else if ( nexthole != bins_in_holes.end() ) { ++nexthole; } } else { c.PushMatrix(); c.Scale(1.0/n,1.0/n); for( UInt_t row=0; row<n; ++row){ const UInt_t triganles = 2*row +1; c.PushMatrix(); c.Translate( (n-row-1.0)* b ); for( UInt_t t=0; t<triganles; ++t) { if(t%2==0) { MakeLevel(c,n+1,nexthole,vbins); c.Translate(a);} else { c.Translate(b); c.Scale(-1,-1); MakeLevel(c,n+1,nexthole,vbins); c.Translate(b); c.Scale(-1,-1); } } c.PopMatrix(); } c.PopMatrix(); } }