Sign in to follow this  

Computing Bounding sphere for a bunch of Triangles

Recommended Posts

I am trying to generate a bounding sphere for given list of Triangles, which contains all the points within. I don't want it to be super-accurate, but yes, it should be reasonable. Here's what I have come up with. I cannot evaluate if it will yield a good approximation or not: - Iterate over all Triangles - Iterate over each vertex of the triangle - find the minX, minY, minZ and maxX, maxY, maxZ from these vertices (minX, minY or minZ values may not belong to the same vertex, its just a minima of the vertices along coordinate axis) - Find the midpoint between min and max - this yields the sphere center and radius (Also, I thought of this another approach..which builds on the bounding sphere iteratively. The idea being: - take a vertex and construct a sphere S around it with min radius (say 0.1) - iterate over all the other vertices (Vnew) of all the other triangles, and at each iteration, check: - if S does not contain Vnew - expand S to contain Vnew by taking the midpt btw S and Vnew as the new center; => update S - else (ie if S contains Vnew) - continue onto next vertex IMO, I think the second approach would be a more tight fit, but slow wrt first approach. What do you think of these ? I can really use some suggestions here. Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this