# Looking for articles on object - spline collision

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

## Recommended Posts

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

##### Share on other sites
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

##### Share on other sites
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?

##### Share on other sites
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 :-)

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631781
• Total Posts
3002314
×