liveBook · Manning

Projection

As explained in Geometry for Programmers

A mapping that sends a point or vector to a corresponding point or vector on a specified geometric object or subspace.

Projection maps a point to the closest point on a line, plane, segment, or other geometric object. The connecting vector meets the object at a right angle, making projection a practical way to reduce distance and reason about position. section 3.3.1 section 10.1.3

Projection also explains the geometric meaning of the dot product. When vector a has unit length, a · b gives the length of b projected onto a; for arbitrary lengths, a · b = ‖a‖‖b‖cosθ. section 9.2.1

For computational geometry, projection supports several useful decisions:

  • Projecting alternately onto two intersecting lines moves an initial point toward their intersection, the solution of the corresponding equations. section 3.3.1
  • Projecting a point onto a segment requires checking whether the normalized projection lies before the first endpoint, between endpoints, or beyond the second endpoint. section 10.1.4
  • A projection inside a triangle identifies the point-to-plane distance as the triangle distance; otherwise, compare the nearest edge or vertex. section 10.1.3

Projection in a signed distance function

A rectangle signed-distance implementation projects an input point onto each edge. If the projection falls within an edge, it uses the point-to-line distance; if it falls outside, it uses the nearer endpoint distance, then applies the line-derived sign. section 10.1.4

Figure 3.5 A point is being projected on the bottom line.
03-05

A geometric figure shows the perpendicular drop from a point to a line, making closest-point projection immediately visible. section 3.3.1

How Geometry for Programmers covers it

How deep it goes
Defines perpendicular closest-point projection, connects it to dot products, and gives branching distance procedures without pursuing numerical-method internals.
Examples
Uses intersecting lines, vector projections, triangle meshes, segments, and a two-dimensional rectangle signed-distance function.
What it assumes
Assumes familiarity with points, vectors, lines, and distances while developing the needed dot-product and geometric reasoning through examples.
What you can do after
Apply projection to classify segment locations, compute point-to-object distances, and implement simple signed-distance geometry.
How it connects
Connects projection with iteration, dot product, trigonometry, signed distance functions, cross product, and Euclidean distance.

Also explained in

Compare how 6 books explain projection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.