To set the Level Of Details when rendering geometry shapes.
{
if (randomDist) {
worldRadius =
pow(reqNodes,.5)*sizeBase;
} else {
worldRadius =
pow(reqNodes,.3)*sizeBase;
}
("WORLD", medEmptySpace, worldRadius, worldRadius, worldRadius);
for (i = 0; i < volumeCount; i++) {
char name[128];
sprintf(name, "Volume_%d", i);
if (reqSpheres && reqTubes) {
if (type == 1)
}
else if(reqSpheres)
type = 0;
else if(reqTubes)
if (color ==
kBlack) color += 1;
switch (type) {
case 0: {
volumes[i] = geom->
MakeSphere(name, medSolid, 0., rMax);
printf("Volume %d : Color %d, Sphere, Radius %f\n", i, color, rMax);
break;
}
case 1: {
volumes[i] = geom->
MakeTube(name, medSolid, rMin, rMax, dz);
printf("Volume %d : Color %d, Tube, Inner Radius %f, "
"Outer Radius %f, Length %f\n",
i, color, rMin, rMax, dz);
break;
}
case 2: {
volumes[i] = geom->
MakeTubs(name, medSolid, rMin, rMax, dz,
phi1, phi2);
printf("Volume %d : Color %d, Tube Seg, Inner Radius %f, "
"Outer Radius %f, Length %f, Phi1 %f, Phi2 %f\n",
i, color, rMin, rMax, dz, phi1, phi2);
break;
}
case 3: {
volumes[i] = geom->
MakeCtub(name, medSolid, rMin, rMax, dz,
phi1, phi2, n1[0], n1[1], n1[2],
n2[0], n2[1], n2[2]);
printf("Volume %d : Color %d, Cut Tube, Inner Radius %f, "
"Outer Radius %f, Length %f, Phi1 %f, Phi2 %f, "
"n1 (%f,%f,%f), n2 (%f,%f,%f)\n",
i, color, rMin, rMax, dz, phi1, phi2,
n1[0], n1[1], n1[2], n2[0], n2[1], n2[2]);
break;
}
default: {
}
}
}
printf("\nCreated %d volumes\n\n", volumeCount);
for (i = 0; i < reqNodes; i++) {
if (randomDist) {
} else {
zi = i / (perSide*perSide);
yi = (i / perSide) % perSide;
xi = i % perSide;
}
}
}