{ new TGeoManager("xtru", "poza12"); TGeoMaterial *mat = new TGeoMaterial("Al", 26.98,13,2.7); TGeoMedium *med = new TGeoMedium("MED",1,mat); TGeoVolume *top = gGeoManager->MakeBox("TOP",med,100,100,100); gGeoManager->SetTopVolume(top); TGeoVolume *vol = gGeoManager->MakeXtru("XTRU",med,4); TGeoXtru *xtru = (TGeoXtru*)vol->GetShape(); Double_t x[8] = {-30,-30,30,30,15,15,-15,-15}; Double_t y[8] = {-30,30,30,-30,-30,15,15,-30}; xtru->DefinePolygon(8,x,y); xtru->DefineSection(0,-40, -20., 10., 1.5); xtru->DefineSection(1, 10, 0., 0., 0.5); xtru->DefineSection(2, 10, 0., 0., 0.7); xtru->DefineSection(3, 40, 10., 20., 0.9); top->AddNode(vol,1); gGeoManager->CloseGeometry(); gGeoManager->SetNsegments(80); top->Draw(); if (gPad) { TView *view = gPad->GetView(); if (view) view->ShowAxis(); } }