(Vector vs Cubic surface) collision

This topic is 4783 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I wasn't sure exactly what to call this, but I knew if I just put vector plane collision I'd get a bunch of answers without my post even being read. I need to solve the following equation for all possible combinations of l, t , and p(there should be 3 or 6 I think). V*l = (1-t)^3*A + 3*(1-t)^2*t*B + 3*(1-t)*t^2*C + t^3*D + (1-p^3*A + 3*(1-p)^2*p*E + 3*(1-p)*p^2*F+p^3*G l,t and p (the lowercase letters) are scalars and V,A,B,C,D,E,F and G(capital letters) are vectors. I had a hard time coming up with this equation and now that I have it I'm not entirely sure what to do with it. I don't expect anyone to solve it for me I'd just like some idea of where to begin. This isn't homework, but it isn't technically game related at this point either. You can view my program here. It could be game related eventually though.

Share on other sites
You can try solving this problem numerically, of course.

I guess that Newton's or Broyden's methods are your best friend in this situation.
You can find a reasonably implementation of those algorithms in "Numerical Recipes in C", which is available on-line in PDF form.

Finding all of the solutions might be tricky through.

Share on other sites
generally these types of things are done using newton's method there is no closed form solution for a general quadric/ray equation. there are also subdivision methods for bezier patches, but they're slow too.

Tim

Share on other sites
Basically, I'm testing various methods for drawing curved surfaces. This equation would be used for a raytracing style method where the surface is created from 2 bezier curves. I know it's not the fastest way to go, but it would allow me to sample specific points. So, I guess I don't need all the possible combinations I just need the combination with the lowest "l".

So far I haven't been able to come up with any method for drawing curves that I consider fast enough to use in another program. So I would be interested to here about other methods for that as well.

Share on other sites
Since this field was studied to death, it's a good idea to read some previous work on this subject.

A good place to start is here:
http://www.cs.huji.ac.il/labs/cglab/papers/rtps/

[Edited by - ury on October 8, 2005 6:38:14 PM]

1. 1
2. 2
Rutin
15
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• Forum Statistics

• Total Topics
633269
• Total Posts
3011152
• Who's Online (See full list)

There are no registered users currently online

×