PDA

View Full Version : Bounding boxes. A good way to find them ?



Anonymous Coward
10-09-2000, 11:22 AM
Having a model with a list of polygons, how can I find the bounding box for this model?

10-09-2000, 11:45 AM
just go through your list of vertices and find the 6 values which have the min & max x, y, and z values and that gives you the 2 vertices you need to define a bounding box.

ie. furtherst upper left and closest lower right.

Anonymous Coward
10-10-2000, 02:42 AM
And if the model is like a cylinder? How canI get the centre of the model, to find a bounding sphere?

julien
10-10-2000, 03:20 AM
For any kind of convex objects, you can find the 'center' by calculating the barycentric point of the object. How to do it ...
Just sum the x value of each point of your object and then divide the result by the number of points ... same for y and z and that's it you have the center.

Anonymous Coward
10-10-2000, 09:24 AM
True...thx...