Alright I got 6 planes each comes from the viewing frustum of a 3D camera.
I can define the planes myself given the projection matrix * view matrix...the values can then easily be derived from that.
That I have working.
Now I want to create a sphere from the frustum planes.
The frustum is pretty much a cone, symmetrical, spreading out as it gets farther away...So fitting a sphere around the frustum is somewhat off...but should be plausable.
I figured I could use the distance between the nearplane and the farplane, Half of that should be the center. The other planes are now unimportant if we can find the radius...
The radius is giving me some problems...because the farplanes gets bigger the farther away it is from the near plane....
So anyone have an idea on how to create a sphere center/radius which could very well encompass all 6 planes (near, far, top, bottom, left, right) of the viewing frustum.


Reply With Quote