Math formula problem

Started by
2 comments, last by karwosts 14 years, 1 month ago
The following formula is list in essential mathmatics for gams and interactive applications. It is from page 640 and involves response impulse to collisions. Specifically what is listed on a particular line is this: float denominator = (1.0/Mass + 1.0/otherMass)*(collisionNormal.Dot(collisionNormal)); It seems to me the author is saying at the end of the statement to multiply by the dot product of a normal with itself. Isnt the dot product of any vector with itself always 1. And there fore the state is saying to multiple by one at the end,, which would be useless. Am I reading this wrong??? Thanks, Matthew
Advertisement
I assume it should be something like

float denominator = (1.0/Mass + 1.0/otherMass)*(collisionNormal.Dot(OTHERcollisionNormal));

I think this would give you a measure of how direct the collision was between two objects, whether it was head-on or just a graze. I'm not totally sure how hes defining a collisionNormal though, so this might not be right.
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
No, there is only one collision normal.
Oh my bad, I was thinking of a different setup.

The dot product of a vector with itself is only one if it is normalized. Otherwise it is equal to the length squared of the vector. Or for vector v:

|v| = sqrt(v.v)

http://en.wikipedia.org/wiki/Dot_product

[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game

This topic is closed to new replies.

Advertisement