INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of...
-
Upload
collin-poole -
Category
Documents
-
view
223 -
download
1
Transcript of INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of...
![Page 1: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/1.jpg)
INTERPOLATION & APPROXIMATION
![Page 2: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/2.jpg)
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.
![Page 3: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/3.jpg)
Curve algorithm
interpolation approximation
![Page 4: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/4.jpg)
Interpolation vs approximation
x
f(x)
x
f(x)
x
f(x)
x
f(x)
curve must pass through control points
curve is influenced by control points
![Page 5: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/5.jpg)
Parametric equation of line = Vector equation of a line
• P(t) = a + ut
a
u
P
u 2u
P
tu
P
a
u
b
•P(t) = a + (b-a)t
•u = (b-a)
t=0t=1
0<=t<=1
P
t=0.25
P
t=0.5
P
t=0.75
X(t) = ax + (bx – ax)tY(t) = ay + (by – ay)tZ(t) = az + (bz – az )t
![Page 6: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/6.jpg)
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 11 0
t1
in animation : - path , morphing
![Page 7: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/7.jpg)
Interpolation Curves
• Curve is constrained to pass through all control points
• Given points P0, P1, ... Pn, find lowest degree polynomial which passes through the points
x(t) = an-1tn-1 + .... + a2t2 + a1t + a0
y(t) = bn-1tn-1 + .... + b2t2 + b1t + b0
![Page 8: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/8.jpg)
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
![Page 9: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/9.jpg)
Interpolating curve : piecewise polynomial
• Segments defined by polynomial functions
• Segments join at KNOTS
• Most common polynomial used is cubic (3rd order)
• Segment shape controlled by two or more adjacent control points.
![Page 10: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/10.jpg)
Knot points
• Location where segments join referred to as knots
• Knots may or may not coincide with control points in interpolating curves.
![Page 11: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/11.jpg)
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)
![Page 12: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/12.jpg)
• Continuity - Cn
– C0 continuity – continuity of endpoint only or continuity of position.
– C1 continuity is tangent continuity or first derivative of position
– C2 continuity is curvature continuity or second derivative of position.
Curve continuity
![Page 13: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/13.jpg)
Curve continuity
C0 C1
C2
![Page 14: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/14.jpg)
Interpolation curves
• Typically possess curvature continuity
• Shape defined by– Endpoint and control point location– Tangent vectors at knots– Curvature at knots
![Page 15: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/15.jpg)
Interpolation vs. Approximation Curves
• Interpolation Curve – over constrained → lots of (undesirable?) oscillations
• Approximation Curve – more reasonable?
![Page 16: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/16.jpg)
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)
![Page 17: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/17.jpg)
• 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
![Page 18: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/18.jpg)
Example – bezier curve
![Page 19: INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.](https://reader035.fdocuments.in/reader035/viewer/2022081804/56649efb5503460f94c0d727/html5/thumbnails/19.jpg)
Cubic Bézier Curve• 4 control points• Curve passes through first & last control point
• Curve is tangent at P1 to (P1-P2) and at P4 to (P4-P3)