liveBook · Manning

Approximation

As explained in Geometry for Programmers

The representation of a mathematical object or data set by another function or model that is close to it rather than necessarily exact.

Approximation represents a complex function, shape, or data set with a simpler one that is close enough for the task. A polynomial can replace a trigonometric function using only additions and multiplications, or reveal a trend without passing through every measured point. section 6.0 section 6.2

Choose the representation according to the required accuracy and purpose:

  • Use approximation when capturing a general trend matters more than matching every data point. section 6.0
  • Use interpolation when the function must pass exactly through specified points; this is valuable for joining geometric curves and surfaces without gaps. section 6.3
  • Balance precision against computation and storage: a coarse model can be useless, while excessive precision can make processing impractical. section 11.2.2 section 11.2.3

A practical approximation

A processor can evaluate sine, cosine, logarithm, or exponent through polynomial substitutes. Increasing polynomial degree can improve precision, but changes the performance trade-off. For geometric models, the same principle appears when a smooth surface becomes a triangle mesh whose accuracy should match its eventual use, such as a 100-micrometer-accurate printer. section 6.2 section 11.2.2

Figure 6.18 When a polynomial approximates the data set with 0 error, every data point belongs to its graph.
06-18

A zero-error approximation places every data point on the polynomial graph, making the distinction between ordinary approximation and interpolation immediately visible. section 6.3

How Geometry for Programmers covers it

How deep it goes
Explains polynomial, least-squares, Taylor, and Maclaurin approaches, then extends the trade-off to triangle-mesh accuracy and model size.
Examples
Uses trigonometric-function substitutes, data trends, exact curve fitting, and triangle meshes calibrated to printing accuracy.
What you can do after
Evaluate and choose polynomial or mesh approximations by weighing accuracy, computation, storage, and intended use.
How it connects
Connects approximation with interpolation, extrapolation, polynomial splines, Taylor series, least squares, and triangle meshes.

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.