Intersection between spherical segment and OBB

Recommended Posts

dragongame    538
Hello, I'm trying to solve the problem of intersection of a spherical segment and an OBB. Normal sphere OBB is not that hard. But to determine if the intersection is in the given spherical segment is tough. The Problem in a more detailed look: Given a Sphere and an orientation. Given a max angle (for poloar coordinates) Given a mid point of a box, its orientation and its size. Does the box or part of it lie within the "cone" created from the sphere mid point, along the orientation with the base of the cone the sphere segement. Sorry for bad english.

Share on other sites
oliii    2196
picture might be useful. Not sure I understand.

Share on other sites
Dave Eberly    1173
Are you trying to compute the intersection of a "great circle arc" (spherical arc) and an OBB?

Share on other sites
dragongame    538
Quote:
 Original post by Dave EberlyAre you trying to compute the intersection of a "great circle arc" (spherical arc) and an OBB?

That is exactly what I'm trying to to.

The Problem in 2D:

My problem is in 3D. A link or hint would be welcomed. (A perfekt working solution also)

[Edited by - dragongame on March 7, 2007 1:40:01 AM]

Share on other sites
oliii    2196
Using half-spheres maybe? In the first case, it has to intersect both 1/2 spheres (the sphere portion is the 'intersection' result of two 1/2 spheres), in the second case it has to intersect only one 1/2 sphere (the sphere portion is the 'union' result of two 1/2 spheres).

That should be easy to find out.

If it is more like a cone shaped cut, the first example, it has to intersect the sphere, and intersect the 'cone'. Look for cone-box intersection.

The second one, it has to intersect the sphere and not be 'contained' inside the code. That is relatively easy to do.

If you are looking for a library to do all that and do custom shape intersection (1/2 spheres, cones), GJK is pretty cool for that.

[Edited by - oliii on March 7, 2007 4:21:47 AM]

Share on other sites
dragongame    538
Thank you.