O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applications in Collision Detection

There will be times in game programming when you'll want to know if and where two lines intersect. The lines might represent the side of a building or the ground or the path of an object. You might need to program a conditional based on the intersection of two such lines. Now that you know how to find the equations of these lines, you can put the two equations together to form a system of linear equations. Then you can solve the system mathematically. This section first discusses the three types of solutions you might find, and then it describes methods of finding the numeric solution.

When solving a system of two linear equations, you're really searching for the intersection of two lines. The solution set ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required