Chapter 2, “Geometry Snippets”

Pythagorean Theorem

In a right triangle, the square of the length c of the hypotenuse is equal to the sum of the squares of the lengths a and b of the other two sides: c2 = a2 + b2.

Distance Formula in 2D

where P1(x1,y1) and P2(x2,y2) are points on the line.

Distance Formula in 3D

where P1(x1,y1,z1) and P2(x2,y2,z2) are points on the line.

Midpoint Formula in 2D

is the midpoint between P1(x1,y1) and P2(x2,y2).

Midpoint ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.