O'Reilly logo

3D Math Primer for Graphics and Game Development, 2nd Edition by Ian Parberry, Fletcher Dunn

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

Appendix A

Geometric Tests

Chapter 9 discussed a number of calculations that can be performed on a single primitive. Here, we present a number of useful calculations that operate on more than one primitive. This appendix is a collection of various geometric calculations that are sometimes useful. It is also instructive to browse these tests, because many illustrate general principles.

A more comprehensive list of fast intersection methods can be found at http://www.realtimerendering.com/intersections.html.

A.1 Closest Point on 2D Implicit Line

Consider an infinite line L in 2D defined implicitly by all points p such that

pn^=d,

where n^ is a unit vector. Our goal is to find, for any point q, the point q′that is the closest point on L to q. This ...

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