Drawing the Cheongwadae building which is the Presidential Residence of the Republic of Korea, using ROOT geometry class.
This macro was created for the evaluation of Computational Physics course in 2006. We thank to Prof. Inkyu Park for his special lecture on ROOT and to all of ROOT team
void cheongwadae()
{
char nBlocks[100];
int N = 0;
int f=0;
int di[2]; di[0] = 0; di[1] = 30;
for(int k=0;k<7;k++){
for(int i=0;i<20;i++){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.6,1.8,63);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.7,1.8,58);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 26,1.2,63);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 26,2,63);
for(int k=0;k<7;k++){
for(int i=0;i<20;i++){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.6,1.8,63);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.7,1.8,58);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 26,1.2,63);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,22,58);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 3.5,8,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 3.5,8,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.2,0.1);
for(int k=0;k<7;k++){
for(int i=0;i<20;i++){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.6,1.8,63);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 0.7,1.8,58);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 26,1.2,63);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 26,2,63);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 82,2,82);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 85,0.5,85);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 88,2,88);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 30, 0, 180, 0, 180);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 0.1,30,0.1);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeTubs(nBlocks,Iron, 0,30,4,360,360);
for(int i=0;i<8;i++){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 2,22,2);
}
for(int i=0;i<8;i++){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 2,22,2);
}
for(int i=0;i<7;i++){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 2,22,2);
}
for(int i=0;i<7;i++){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 2,22,2);
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 100,0.5,160);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 10,0.01,160);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeSphere(nBlocks, Iron, 0, 5, 0, 180, 0, 180);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 0.1,10,0.1);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 5,3,0.1);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 0.1,10,0.1);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->
MakeBox(nBlocks,Iron, 5,3,0.1);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 7,1.5,5);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 7,1,5);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 7,0.5,5);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->
MakeBox(nBlocks, Iron, 7,0.1,5);
}