Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Collision detection with a bezier surface?? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
n e X i u s

February 07, 2003, 04:54 PM

How would I detect the collision between say, a sphere and a bezier surface??

Any ideas?

 
Faelenor

February 07, 2003, 05:11 PM

To collide a Bezier surface with another object, you can use a bounding box made from its control points. Then, you intersect the box with the other object. If there's a collision, then you subdivide the surface with the deCasteljau algorithm. You call the function recursively on the sub-surfaces and you stops when you reach the precision you want, or when you can tell that there's no collision.

This is the subject of my master's thesis (but with NURBS surfaces, that are a generalisation of Bezier surfaces), so you can ask me more details, I should be able to help you!

-Francis

 
n e X i u s

February 07, 2003, 06:20 PM

Thanks for your response

Let me explain my problem in more detail.
At the moment I have a terrain engine based on Catmull-Rom B-Splines (not bezier, I lied for simplicities sake thinking that I could extend the algorithm) with LOD, frustum culling, everything except for collision detection

I could collide with each tesselated polygon, but that would require a lot of memory allocation and deletion and I don't want to do that

From what I know, the deCasteljau algorithm just applies to bezier curves?

What do you think?

 
Faelenor

February 07, 2003, 07:24 PM

All the cubic splines can be converted to cubic Bezier splines. You should take a look to this document:
http://www.cours.polymtl.ca/if540/Articles/patch.pdf
There's everything you know to convert from a basis to another...

Hope this help!

-Francis

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.