Jump to content

  • Log In with Google      Sign In   
  • Create Account


Looking for articles on object - spline collision


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 h4tt3n   Members   -  Reputation: 963

Like
0Likes
Like

Posted 30 May 2011 - 04:47 AM

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

Sponsor:

#2 h4tt3n   Members   -  Reputation: 963

Like
0Likes
Like

Posted 02 June 2011 - 06:25 AM

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

#3 raigan   Members   -  Reputation: 629

Like
0Likes
Like

Posted 02 June 2011 - 07:54 AM

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?

#4 h4tt3n   Members   -  Reputation: 963

Like
0Likes
Like

Posted 02 June 2011 - 10:09 AM

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 :-)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS