Looking for articles on object - spline collision

Started by
2 comments, last by h4tt3n 12 years, 10 months ago
Hello there,

I'm looking for articles or tutorials explaining how to do spline - particle collision detection in 2d. I'm interested in topics like how to find the closest point on a spline relative to a given point, and how to find the tangent and normal vectors for any given point on a spline. I'm mainly concerned with Catmull-Rom splines and cubic Hermite splines. I'm still struggling with the math behind them, but I've managed to setup a simple particle - polynomial collision system, and I hope to work my way up from there, since splines are a form of polynomials too. Please let me know about any good resource covering these topics.

Cheers,
Mike
Advertisement
Ok, now I got around calculating the (normalized) tangent and normal vectors of an arbitrary point on a catmull-rom spline. The tangent is derived from the first derivative of the spline, of course, and then you simply find the normalized normal of that. Collision resolution with friction is relatively easy from there. I still haven't found a way to determine the closest point on a spline, though, and any feedback on that would be appreciated.

Cheers,
Mike
I don't have any first-hand knowledge, but some of these links seem promising: http://www.google.com/search?q=closest+point+on+spline

One thought is that splines for collision detection seem like more trouble than they're worth -- fitting them into a spatial partition (grid or SAP or whatever) seems like it would be a pain. Maybe it's better to just approximate them with linesegs?
Yes, all the methods I've skimmed through are based on some sort of approximation, for instance by dividing the spline up into discrete line segments. I'll probably be going for that solution too if nothing better comes up. I really want to do this, one way or the other - I'm just fed up with polygons :-)

This topic is closed to new replies.

Advertisement