Download presentation
Presentation is loading. Please wait.
Published byCollin Poole Modified over 9 years ago
1
INTERPOLATION & APPROXIMATION
2
Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve will pass through control points –Approximation Curve will pass near control points may interpolate the start and end points.
3
Curve algorithm interpolationapproximation
4
Interpolation vs approximation x f(x) x x x curve must pass through control points curve is influenced by control points
5
Parametric equation of line = Vector equation of a line P(t) = a + ut a u P u 2u P tutu P a u b P(t) = a + (b-a)t u = (b-a) t=0 t=1 0<=t<=1 P t=0.25 P t=0.5 P t=0.75 X(t) = a x + (b x – a x )t Y(t) = a y + (b y – a y )t Z(t) = a z + (b z – a z )t
6
Linear interpolation P(t) = A(1-t) + Bt In matrix form P(t) = = A B.. A B t=0 t=1 X(t) Y(t) Z(t) -1 1 1 0 t1t1 in animation : - path, morphing
7
Interpolation Curves Curve is constrained to pass through all control points Given points P 0, P 1,... P n, find lowest degree polynomial which passes through the points x(t) = a n-1 t n-1 +.... + a 2 t 2 + a 1 t + a 0 y(t) = b n-1 t n-1 +.... + b 2 t 2 + b 1 t + b 0
8
Interpolating curve : piecewise linear Curve defined by multiple segments (linear) Segments joints known as KNOTS Requires too many data points for most shape Representation not flexible enough to editing
9
Interpolating curve : piecewise polynomial Segments defined by polynomial functions Segments join at KNOTS Most common polynomial used is cubic (3 rd order) Segment shape controlled by two or more adjacent control points.
10
Knot points Location where segments join referred to as knots Knots may or may not coincide with control points in interpolating curves.
11
Curve continuity Concern is continuity at knots. Continuity conditions –Point continuity (no slope or curvature restriction / no gap) –Tangent continuity (same slope at knot) –Curvature continuity ( same slope and curvature at knot)
12
Continuity - C n –C 0 continuity – continuity of endpoint only or continuity of position. –C 1 continuity is tangent continuity or first derivative of position –C 2 continuity is curvature continuity or second derivative of position. Curve continuity
13
C0C0 C1C1 C2C2
14
Interpolation curves Typically possess curvature continuity Shape defined by –Endpoint and control point location –Tangent vectors at knots –Curvature at knots
15
Interpolation vs. Approximation Curves Interpolation Curve – over constrained → lots of (undesirable?) oscillations Approximation Curve – more reasonable?
16
Approximation techniques Developed to permit greater design flexibility in the generation of free form curves Common methods in modern CAD systems, bezier, b-spline, NURBS Employ control points (set of vertices that approximate the curve)
17
Curves do not pass directly through points (except start and end) Intermediate points affect shape as if exerting a “pull” on the curve. Allow user to set shape by “pulling” out curve using control point location. Approximation techniques
18
Example – bezier curve
19
Cubic Bézier Curve 4 control points Curve passes through first & last control point Curve is tangent at P 1 to (P 1 -P 2 ) and at P 4 to (P 4 -P 3 )
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.