1 / 87

Curve Modeling

Curve Modeling. Dr. S.M. Malaek Assistant: M. Younesi. Parametric Polynomials. Parametric Polynomials. For interpolating n point we need a polynomial of degree n-1 . Parametric Polynomials. Polynomial interpolation has several disadvantages :

trevina
Download Presentation

Curve Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Curve Modeling Dr. S.M. Malaek Assistant: M. Younesi

  2. Parametric Polynomials

  3. Parametric Polynomials • For interpolating n point we need a polynomial of degree n-1.

  4. Parametric Polynomials Polynomial interpolation has several disadvantages: • If the polynomial degree is high, unwanted wiggles are introduced. • If the polynomial degree is law, it gives too little flexibility. • No local operations.

  5. Solution: Polynomial Splines

  6. Spline Curve

  7. Flexible Strip Spline Curve • In drafting terminology, a spline is a flexible strip used to produce a smooth curve through a designated set of points.

  8. Spline Curve • Several smallweightsare distributed along the length of the strip to hold it in position on the drafting table as the curve is drawn. Weights

  9. Spline Curve • The term spline curveoriginally referred to a curve drawn in this manner.

  10. Spline Curve • Inmodeling, the term spline curve refers to a any composite curve formed with polynomial section satisfying specified continuity conditions at the boundary of the pieces.

  11. Control Points • A spline curve is specified by given a set of coordinate positions, called control points. • Control points indicates the general shape of the curve.

  12. Control Points • A spline curve is defined, modified, and manipulated with operations on the control points.

  13. Convex Hull • The convex polygon boundary that enclose a set control points is called the convex hull.

  14. Convex Hull • The convex hull is a rubber band stretched around the positions of the control points so that each control point is either on the perimeter of the hull or inside it.

  15. Convex Remind: • A region is convex if the line segment joining any two points in the region is also within the region.

  16. Shape of the Spline Curve

  17. Shape of the Curve • Control points are fitted with piecewise continuous parametric polynomial function in one of two way: • Interpolation Splines • Approximation Splines

  18. Interpolation Splines • When polynomial sections are fitted so that the curvepassesthrough each control point, the resulting curve is said to interpolate the set of control points.

  19. Interpolation Splines • Interpolation curves are commonly used to digitize drawing or to specify animation paths.

  20. Approximation Splines • When polynomial sections are fitted to the general control point pathwithoutnecessarily passing through any control point, the resulting curve is said toapproximatethe set if control points.

  21. Approximation Splines • Approximation curves are uses as design tools to structure object surfaces.

  22. Parametric Continuity Conditions

  23. Parametric Continuity Conditions • To represent a curve as a series of piecewise parametric curves, these curves to fit together reasonably…Continuity!

  24. Parametric Continuity Conditions • Each section of a spline is described with a set of parametric coordinate functions of the form:

  25. Parametric Continuity Conditions • Let C1(u) and C2(u) , be two parametric Curves. • We set parametric continuity by matching the parametric derivation of adjoining curve sections at their common boundary.

  26. Parametric Continuity Conditions • Zero order parametric (C0): Simply the curves meet, C1(1) = C2(0) . • First order parametric (C1): The first parametric derivations for two successive curve sections are equal at their joining point, C´1(1)= C´2(0)

  27. Parametric Continuity Conditions • Second order parametric (C2): Both the first and second parametric derivatives of the two curve sections are the same at the intersection, C˝1(1)= C˝2(0)

  28. Parametric Continuity Conditions Simple Example: • The curve consists of two parabolas, domains [-1,0] and [0,1], respectively f(u) = ( u, -u2, 0 ) g(v) = ( v, v2, 0 ) f'(u) = ( 1, -2u, 0 ) ,f''(u) = ( 0, -2, 0 ) g'(u) = ( 1, 2v, 0 ) ,g''(v) = ( 0, 2, 0 ) • Two curves are C1 continuous at the origin. • f''(0) = ( 0, -2, 0 ) is not equal to g''(v) = ( 0, 2, 0 ), they are not C2continuous at the origin. • Curvature of f(u) = 2/(1 + 4u2)1.5Curvature of g(v) = 2/(1 + 4v2)1.5 Two curve segments may be C1 continuous and even curvature continuous, but not C2 continuous

  29. Problems with Parametric Continuity Conditions Representation

  30. Problems with Parametric Continuity f(u) = A + u(B - A) g(v) = B + v(C - B) Two line segments: f'(u) = B - A g'(v) = C - B • Thus, f'(u) = B - A is, in general, not equal to g'(v) = C - B and consequently these two line segments are not C1 continuous at the joining point B! Is it strange? Re-parameterizing the curve segments may overcome the problem F(u) = A + u(B - A)/ | B - A | G(v) = B + v(C - B)/ | C - B | uis in the range of 0 and | B - A | and v is in the range of 0 and | C – B|

  31. Problems with Parametric Continuity f(u) = ( -cos(u2 PI/2), sin(u2 PI/2), 0 ) g(v) = ( sin(v2 PI/2), cos(v2 PI/2), 0 ) Semi circle: At (0,1,0) = f(1) = g(0). ‍) C0) f'(u) = ( PI u sin(u2 PI/2), PI u cos(u2 PI/2), 0 ) f''(u) = ( PI2 u2 cos(u2 PI/2), -PI2 u2 sin(u2 PI/2), 0 ) f'(u) × f''(u) = ( 0, 0, -PI3u3 ) | f'(u) | = PI u | f'(u) × f''(u) | = PI3u3 k(u) = 1 g'(v) = ( PI v cos(v2 PI/2), -PI v sin(v2 PI/2), 0 ) g''(v) = ( -PI2 v2 cos(v2 PI/2), -PI2 v2 cos(v2 PI/2), 0 ) g'(v) × g''(v) = ( 0, 0, -PI3u3 ) | g'(v) | = PI v | g'(v) × g''(v) | = PI3v3 k(v) = 1

  32. Problems with Parametric Continuity Let u2 = p in f(u) and let v2 = q in g(v). The new equations are: f(p) = ( -cos(p PI/2), sin(p PI/2), 0 ) g(q) = ( sin(q PI/2), cos(q PI/2), 0) Their derivatives are f'(p) = ( (PI/2) sin(p PI/2), (PI/2) cos(p PI/2), 0 ) f''(p) = ( (PI/2)2 cos(p PI/2), -(PI/2)2 sin(p PI/2), 0 ) g'(q) = ( (PI/2) cos(q PI/2), -(PI/2) sin(q PI/2), 0 ) g''(q) = ( -(PI/2)2 sin(q PI/2), -(PI/2)2 cos(q PI/2), 0 ) Semi circle: Therefore, after changing variables, both f'(1) and g'(0) are equal to ( PI/2, 0, 0 ) and hence they are C1continuous. Moreover, both f''(1) and g''(0) are equal to ( 0, -(PI/2)2, 0 ) and hence they are C2 continuous! They are also curvature continuous because they have curvature 1 everywhere (remember they are circles).

  33. Geometric Continuity Conditions

  34. Geometric Continuity Conditions • Twocurve segments are said Gk geometric continuous at the joining point if and only if there exists two parameterizations, one for each curve segment, such that all i-th derivatives, i less than or equal to k, computed with these new parameterizations agree at the joining point.

  35. Geometric Continuity Conditions • Two C0 curve segments are said G1 geometric continuous at the joining point if and only if vectors f'(u) and g'(v) are in the same direction at the joining point. Note that f'(u) and g'(v) are evaluated at the joining point. The tangent vectors point to the opposite directions, and, as a result, they are not G1 at the joining point

  36. Geometric Continuity Conditions • Two C1 curve segments are said G2 geometric continuous at the joining point if and only if vectorf''(u) - g''(v) is parallel to the tangentvector at the joining point. Note that f''(u) and g''(v) are evaluated at the joining point.

  37. Geometric Continuity Conditions • Example:two parabola segments with joining point at ( 0, 1, 0): • f(u) = ( -1 + u2, 2u - u2, 0 ) g(v) = ( 2u - u2, 1 - u2, 0 ) • f'(u) = ( 2u, 2 - 2u, 0 ) f''(u) = ( 2, -2, 0 ) f'(u) × f''(u) = ( 0, 0, -4 ) | f'(u) | = 2SQRT(1 - 2u + 2u2 ) | f'(u) × f''(u) | = 4 k(u) = 1/(2(1 - 2u + 2u2)1.5) g'(v) = ( 2 - 2v, -2v, 0 ) g''(v) = ( -2, -2, 0 ) g'(v) × g''(v) = ( 0, 0, -4 ) | g'(v) | = 2SQRT(1 - 2v + 2v2 ) | g'(v) × g''(v) | = 4 k(v) = 1/(2(1 - 2v + 2v2)1.5)

  38. Geometric Continuity Conditions • From f'(1) = g'(0) = ( 2, 0, 0 ), we know that these two curve segments are C1at the joining point. Since f''(1) = ( 2, -2, 0 ) is not equal to g''(0) = ( -2, -2, 0 ), they are not C2. • Since the curves are C1, checking for G2is meaningful. Since f''(1) - g''(0) = ( 4, 0, 0 ) is parallel to the tangent vector ( 2, 0, 0 ) at the joining point, these two curve segments are G2continuous at the joining point ( 0, 1, 0 ).

  39. Geometric Continuity Conditions • Geometric Continuity Conditions: Only require parametric derivatives of the two sections to be proportional to each other at their common boundary instead of equal to each other.

  40. Geometric Continuity Conditions • Zero order geometric (G0): Same as C0 C1(1) = C2(0) • First order geometric (G1):The parametric first derivatives are proportional at the intersection of two successive sections. C´1(1)= αC´2(0) • Second order geometric (G2):Both the first and second parametric derivatives of the two curve sections are proportional at their boundary, C˝1(1)= αC˝2(0)

  41. Parametric & Geometric Continuity • A curve generated with geometric continuity condition is similar to one generated with parametric continuity , but with slight differences in curve shape. • With geometric continuity, the curve is pulledtoward the section with the greater tangent vector.

  42. Spline Interpolation

  43. Linear Spline Interpolation

  44. Linear Spline Interpolation • Given a set of control points, linear interpolation spline is obtained by fitting the input points with a piecewise linear polynomial curve that passes through every control points.

  45. Linear Spline Interpolation • A linear polynomial:

  46. Linear Spline Interpolation • We need to determine the values ofa and b in the linear polynomial for each of the n curve section. • Substituting endpoint values 0and 1for parameter u:

  47. Mspline Mgeometry U Linear Spline Interpolation • Solving this equation for the polynomial coefficients: • P(u) can be written in terms of the boundary conditions:

  48. Linear Spline Interpolation • The matrix representation for linear spline representation: • Mgeometry is the matrix containing the geometry constraint values (boundary condition) on the spline. • Mspline is the matrix that transform the geometric constraint values to the polynomial coefficients and provides a characterization for the spline curve (Basis Matrix).

  49. Blending Functions Linear Spline Interpolation • We can expand the matrix representation:

  50. Linear Spline Interpolation • The Linear spline blending function:

More Related