Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 29 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
29
Dung lượng
746,12 KB
Nội dung
Curve and Surface Outline • Parametric Curves & Splines • Cubic Splines – – – – Hermite Bézier B-Splines NURBS • Subdivision Curves & Surfaces • Appendix: Subdivision Masks How to describe this curve? Control Points • We can specify control points to draw the curve Control Points • Control points are not a unique specification Polynomials • A polynomial is a function of the form: f(t) = antn + an-1tn-1 + … + a1t + a0 • n is the degree of the polynomial • The order of the polynomial is the number of coefficients it has • Always: order = degree + • Examples: f(t) = a1t + a0 Linear f(t) = a2t2 + a1t + a0 Quadratic f(t) = a3t3 + a2t2 + a1t + a0 Cubic Polynomial Curves • Could make a curve that passes through n control points out of a degree (n-1) polynomial – Regression, Lagrange interpolation, etc Polynomial Curves • Polynomial curves wiggle too much when forced to fit more and more points • In technical terms this is called overfitting Why Parametric Curves? • Parametric curves are very flexible • They are not required to be functions • Curves can be multi-valued with respect to any coordinate system Particle Motion • A parametric curve P(t) describes the motion of an imaginary particle through space at time t • We can compute the velocity of the particle: dP(t ) �dx(t ) dy(t ) � v(t ) � � � dt dt � � dt • The tangent line at P(t0) to the curve is: tangent(u) = P(t0) + v(t0)u • The normal at P(t0) perpendicular (t )the � dy (t ) dxto � tangent � � line is n(t0 ) v (t0 ) � � dt dt � t t0 10 Spline Curves • Spline curve - any composite curve formed with piecewise parametric polynomials subject to certain continuity conditions at the boundary of the pieces – Huh? • We have seen parametric polynomials Let’s look at the other terms: – Piecewise – Continuity conditions 15 Piecewise Curves • To avoid overfitting we will want to represent a curve as a series of curves pieced together • A piecewise parametric polynomial curve uses different polynomial functions for different parts of the curve – Advantages: Provides flexibility – Problem: How we fit the pieces together? 16 Parametric Continuity • C0: Curves are joined – “watertight” curve / mesh • C1: First derivative is continuous – d/dt Q(t) = velocity is the same – “looks smooth, no facets” • C2: Second derivative is continuous – d2/dt2Q(t) = acceleration is the same (important for animation and shading) 17 Geometric Continuity • G0: Curves are joined • G1: First derivatives are proportional at the joint point – The tangent vectors have the same directions, but not necessarily the same magnitude – Velocity of a moving point is not continuous • G2: First and second derivatives are proportional at joint point – Acceleration of the point is not continuous • Parametric continuity of order n implies geometric continuity of order n, but not vice-versa 18 Specifying Splines • Control Points - a set of points that influence the curve's shape • Hull - the lines that connect the control points • Interpolating – curve passes through the control points • Approximating – control points merely influence shape 19 Parametric Cubic Curves • In order to assure C2 continuity our functions must be of at least degree three • Here's what a 2D parametric cubic function looks like: • In matrix form: 20 Parametric Cubic Curves • This is a cubic function in 3D: • To avoid the dependency on the dimension we will use the following notation: 21 Parametric Cubic Curves • What does the derivative of a cubic curve look like? 22 Solving for Coefficients • Problem: Polynomial coefficients (the c’s) are amazingly bad control knobs • Usually, we want to control the curve in terms of what it does — passing through control points, etc • The whole story of polynomial splines is deriving their coefficients given a set of control points and continuity conditions • Approach: – State what we want the curve to – Solve for coefficients that satisfy the constraints set by the control points and continuity conditions 23 Outline • Parametric Curves & Splines • Cubic Splines – – – – Hermite Bézier B-Splines NURBS • Subdivision Curves & Surfaces • Appendix: Subdivision Masks 24 Cubic Hermite Specification • Given: – Two control points (P1, P2) – Tangents (derivatives) at the knot points (P’1, P’2): • “Control knob” vector: [P1, P2, P’1, P’2] 25 Hermite Spline • segments, (P1, P2) and (P’1, P’2) for each segment 26 Building it up… • Cubic curve equations: • Boundary constraints: 27 Solve for the c’s 28 29 ... used for designing ship hulls, automobiles, and aircraft fuselage and wings 13 Splines www.abm.org 14 Spline Curves • Spline curve - any composite curve formed with piecewise parametric polynomials... Polynomial Curves • Could make a curve that passes through n control points out of a degree (n-1) polynomial – Regression, Lagrange interpolation, etc Polynomial Curves • Polynomial curves wiggle... to fit more and more points • In technical terms this is called overfitting Why Parametric Curves? • Parametric curves are very flexible • They are not required to be functions • Curves can be