Page 1 of 1

rotation collision response?

Posted: Wed Sep 02, 2015 10:10 pm
by Isawyou
Hi all!
when this impulse based equation can equal to zero:
w'=w+(j/I)*r*n;
n normal contact;j impulse;I inertia; from wiki https://en.wikipedia.org/wiki/Collision_response[^]
seems wrong to me;
I'm just talking about center of percussion! what happen to angular velocity?http://labman.phys.utk.edu/phys135/modu ... ge3294.gif it's zero right, not working in impulse based method(and also the sens of angular velocity, I get it always wrong)!
can somebody give a source code about how to calculate angular velocity, or just give me some implementation examples, please I'm lost thanx!

Re: rotation collision response?

Posted: Thu Sep 03, 2015 5:51 pm
by Dirk Gregorius
It looks as if a cross product is missing. It should be r x n. Here is a good derivation:
http://www.essentialmath.com/AngularImpulse.pdf

Re: rotation collision response?

Posted: Thu Sep 03, 2015 11:37 pm
by Isawyou
well! thanks I figure that out!

Re: rotation collision response?

Posted: Fri Sep 04, 2015 12:44 am
by Isawyou
I have two points manifold, should I apply W to them both?
c for center;p1 and p2 contact point ;

-----------------c-----------------
p2_________________ p1

this bar won't fall!


--------------------------c-----------------------
p2|___________| p1

this bar will fall!

Re: rotation collision response?

Posted: Fri Sep 04, 2015 2:33 am
by Dirk Gregorius
You apply equal and opposite impulses at each contact point. Each off center impulse will indeed affect the angular velocity. I don't want to sound offensive, but you might want to study some basic rigid body mechanics before trying to implement a physics engine.

Re: rotation collision response?

Posted: Fri Sep 04, 2015 2:32 pm
by Isawyou
I'm doing my best! :wink:

Re: rotation collision response?

Posted: Fri Sep 04, 2015 6:37 pm
by Dirk Gregorius
Good luck! :)

Re: rotation collision response?

Posted: Sun Sep 06, 2015 5:33 pm
by Isawyou
Is v=w*r a cross product too? :shock: is r a vector or magnitude? how to calculate v=wr?(that's crazy if there is vx and vy in 2d)