Iv'e read an article about collision dectection , and there was one thing I did not understand :
from this
Iv'e read an article about collision dectection , and there was one thing I did not understand :
from this
That's a linear system with ua and ub as variables. You can solve it in different ways and reach the same expression or an equivalent one.
In this case it looks like it's solved using the Cramer's rule: http://mathworld.wolfram.com/CramersRule.html
I guess it doesn't really matter the step by step solution, it won't make much difference to your programming knowledge. If you're learning about collision detection don't waste too much time on stuff like that, there are much more usefull concepts involved.
To echo the guy above me: often times you can solve collision detection problems by writing down functions and solving them, but that usually gives nothing back to the developer in terms of geometric intuition. Sometimes the geometric approach can lead to simpler or alternative (optimized) solutions.
how did he do that ?
I'm with you. I hate it when I'm using an algorithm that I don't understand. I have run into many stumbling blocks in the "Real Time Rendering" equations where there are giant leaps in math without any explanation. I like to know how they got from A to B. It is of no use when you're just coding, but when you are trying to lean how someone came up with the algorithm, giant leaps in math with no explanation doesn't help.
That's a linear system with ua and ub as variables. You can solve it in different ways and reach the same expression or an equivalent one.
In this case it looks like it's solved using the Cramer's rule: http://mathworld.wolfram.com/CramersRule.html
I guess it doesn't really matter the step by step solution, it won't make much difference to your programming knowledge. If you're learning about collision detection don't waste too much time on stuff like that, there are much more usefull concepts involved.
To echo the guy above me: often times you can solve collision detection problems by writing down functions and solving them, but that usually gives nothing back to the developer in terms of geometric intuition. Sometimes the geometric approach can lead to simpler or alternative (optimized) solutions.
how did he do that ?
I'm with you. I hate it when I'm using an algorithm that I don't understand. I have run into many stumbling blocks in the "Real Time Rendering" equations where there are giant leaps in math without any explanation. I like to know how they got from A to B. It is of no use when you're just coding, but when you are trying to lean how someone came up with the algorithm, giant leaps in math with no explanation doesn't help.
I really need to understand this for implementing something similar
But are you going to implement the middle steps too?
Try applying the Cramer's rule and you'll probably get that same result, in that link I quoted there's a step by step description of the method.
If you want a simpler to understand method that doesn't involve determinants and works for 2 equations, try this:
That method uses less concepts, but you can easily mess up with all those coeficients.
That method uses less concepts, but you can easily mess up with all those coeficients.
I started this on my whiteboard. Yuck. Stick with the above suggestions!
If the book's primary concern is not teaching math, I think that step is perfectly fine. It is not trying to teach you how to solve a linear system of equations, it's just solving one. You can learn about how you solve systems of equations elsewhere, and then you can check that you get the same result.