approximate non-linear transformation of affine combination
Considerapplying an arbitrary transformation to an affine combination of some points ,with non-negative weights that sum to unity.Obviously, in general,
However, sometimes it is desirable to compute the imageas if were a linear (or affine) transformation;the result is then hoped to be a good approximationto the true value.(See below for an application.)
Actually, it is possible to show that, provided that is twicecontinuously differentiable, the approximation is good to first order,despite the absence of any derivatives of in the formula.The domain and range of may be any normed vector spaces.
First, we write:
If ,then ,and so the error term in the Taylor expansioncan be simplified to .
Substituting another Taylor expansion
into the first, we obtain:
Furthermore, it is not hard to see,by accounting the error from the Taylor expansions more carefully,that we have the bound:
where is the maximum,as ranges inside the convex hullformed by the points ,of the quantity .Finally, the point over which we performed Taylor expansionscan be replaced by any other point ,and so correspondingly can be replaced by .
Application in computer graphics
The principle just derived is often applied in vector-based computer graphicswhen curved objects are drawn by cubic Bézier curves:
which are affine combinations of the control points .To compute and display a smooth transformation of such curves,it may be too much work to compute repeatedlyfor many parameter values .Provided is not too wavy,computing and displaying is vastly more efficient, and may result in little orno visually perceptible difference.
As a concrete example, consider bending a straight line segmentinto a circle.Mathematically, we are mapping the interval via .If the interval is split into sub-segments,each considered as acubic Bézier curve with its interior control pointsboth set at the midpoint
of the line segment
,then a circle can be approximatedby transforming these control points.The following diagram shows the approximation for 24 segments (three Béziercurves per arc).