00001 {
00002
00003
00004
00005 float D[] = {0.5,0.2};
00006 float d2rad = asin(1)/90.;
00007 float fStep = d2rad*360./10;
00008 float f0 = 90.*d2rad - 2*fStep;
00009 D[1] = D[0]*cos(2*fStep)/cos(fStep);
00010
00011 TCanvas cc("STARC","STARC",0,0,400,400);
00012 TPad pad("STAR","STAR",0,0,1,1);
00013 pad.Draw();
00014 pad.cd();
00015 TPolyLine sLine(10);
00016 double d;
00017 int id = 0;
00018 int j = 0;
00019 for (j=0;j<10;j++,f0+=fStep){
00020 d = D[id];
00021 sLine.SetPoint(j,d*cos(f0)+0.5,d*sin(f0)+0.45);
00022 if (id) id = 0;
00023 else id = 1;
00024 }
00025 sLine.SetFillColor(19);
00026 sLine.SetLineColor(2);
00027 sLine.SetLineWidth(7);
00028 sLine.Draw();
00029 TLatex *text = new TLatex(0.49,0.43,"STAR");
00030 text->SetTextColor(2);
00031 text->SetTextFont(52);
00032 text->SetTextSize(0.2);
00033 text->SetLineWidth(4);
00034 text->Draw();
00035 pad->Modified();
00036 cc.Update();
00037 }