Jump to content


bounding sphere of spheres


2 replies to this topic

#1 peterbone

    New Member

  • Members
  • PipPip
  • 23 posts

Posted 19 September 2005 - 12:22 PM

Hello.

This is my first post here. I used to occasionally post at flipcode. Shame it's gone. I have been developing a software renderer written from scratch in Delphi which can be found here:
http://www.geocities...k/engine3d.html

I have a collection of objects with bounding spheres. I need to find the bounding sphere of these bounding spheres in order to scale and position my viewport to display the objects all fitting tightly inside the screen when the program runs. I could find the bounding sphere of all the objects the same way I do for individual objects (find the bounding box center and then the vertex furthest from this gives the radius). However, since I have the bounding spheres of the objects I thought there may be a quicker way. I've tried thinking of it in terms of the 2D version - bounding circle of circles but I've not worked it out yet.

So, how is it done?

Thanks

Peter Bone

#2 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1050 posts

Posted 19 September 2005 - 03:10 PM

The solution in 2D is pretty simple. Just find 3 points (most-top, most-left, most-bottom for example) and use the algorithm for finding a circle through these 3 points described here: graphics faq. The document also describes a method for finding a sphere around a bunch of points, which is exactly what you need.

Hope that helps!

#3 bladder

    DevMaster Staff

  • Moderators
  • 1057 posts

Posted 20 September 2005 - 04:03 AM

Bam

*~~~~~~~~~~*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users