Problems with ROOT visualization


I am designing an asymmetric elliptical beam pipe in ROOT for visualization. The ratio x/y is large and this appears to be causing the resulting visualization to appear sharp. I have attached a picture of this to make it clear what I mean. Is there some way to set some parameters that will cause the beampipe to appear smooth in visualization even with a large x/y ratio?

BP_Design_2.pdf (58.4 KB)

How did you produce this picture ?

I used ROOT’s GL viewer and then save the screen as a pdf.

Good, in this case can you, please, give us code sample and explain, what does it mean “sharp” in your picture?

Attached is the source code for the beam pipe. By sharp I mean that on the elliptical side the beam pipe does not appear smooth. It looks as though it goes to a single point at its maximum x value instead of following the equation of an ellipse
Det.C (4.71 KB)

Equation of an ellipse? You are kidding:)))
That’s a composite shape, right? Do you have an equation of this shape? Do you know how CSG (complex solid geometry) is done in your case? These are polygons, not equations.

P.S. BTW CSG is definitely must be improved, this I can see from your example :slight_smile:

What I meant by the equation of an ellipse, was whether it was possible to have the shape appear smooth as if it were an actual ellipse. So let me rephrase my question how can you increase the number of vertices in this polygon so that it appears smooth?

You can try gGeoManager->SetNsegments(N);//where N can be big number, say 100

Thank you for your help it works like a charm. I have attached a picture created after this modification for anyone having the same problem in the future.
beam_pipe.pdf (65.1 KB)