1 / 86

5. Curves and Curve Modeling

ME 521 Computer Aided Design. 5. Curves and Curve Modeling. Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.tr Makine Mühendisliği Bölümü Gebze Yüksek Teknoloji Enstitüsü. Purpose. 5. Curves and Curve Modeling. Curves are the basics for surfaces

diallo
Download Presentation

5. Curves and 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. ME 521 ComputerAidedDesign 5. Curves and Curve Modeling Dr. Ahmet Zafer Şenalpe-mail: azsenalp@gyte.edu.tr Makine Mühendisliği Bölümü Gebze Yüksek Teknoloji Enstitüsü

  2. Purpose 5. Curves and Curve Modeling • Curves are the basics for surfaces • Before learning surfaces curves have to be known • When asked to modify a particular entity on a CAD system, knowledge of the entities can increase your productivity • Understand how the math presentation of various curve entities relates to a user interface • Understand what is impossible and which way can be more efficient when creating or modifying an entity GYTE-Makine Mühendisliği Bölümü

  3. Purpose 5. Curves and Curve Modeling Curves are the basics for surfaces GYTE-Makine Mühendisliği Bölümü

  4. Why Not Simply Use a Point Matrix toRepresent a Curve? 5. Curves and Curve Modeling • Storage issue and limited resolution • Computation and transformation • Difficulties in calculating the intersections or curvesand physical properties of objects • Difficulties in design (e.g. control shapes of an existing object) • Poor surface finish of manufactured parts GYTE-Makine Mühendisliği Bölümü

  5. Advantages of AnalyticalRepresentationforGeometricEntities 5. Curves and Curve Modeling • A few parameters to store • Designers know the effect of data points on curvebehavior, control, continuity, and curvature • Facilitate calculations of intersections, object properties, etc. GYTE-Makine Mühendisliği Bölümü

  6. CurveDefinitions 5. Curves and Curve Modeling • Explicit form: • Implicit form: GYTE-Makine Mühendisliği Bölümü

  7. Drawbacks of Conventional Representations 5. Curves and Curve Modeling Geleneksel açık (explicit)ve kapalı (implicit)formların sakıncaları vardır. • The represent unbounded geometry • They may be multi-valued • Difficult to evaluate points along the curve • Depends on coordinate system GYTE-Makine Mühendisliği Bölümü

  8. Parametric Representation 5. Curves and Curve Modeling Curves are defined as a function of a single parameter: GYTE-Makine Mühendisliği Bölümü

  9. u u v Parametric Representation 5. Curves and Curve Modeling Surface, P=P(u,v) Curve, P=P(u) P(u)=[x(u),y(u),z(u)]T P(u, v)=[x(u, v), y(u, v), z(u, v)]T GYTE-MakineMühendisliğiBölümü

  10. Parametric Representation 5. Curves and Curve Modeling Changingcurveequationintoparametric form: Let’suse “t” parameter ; GYTE-Makine Mühendisliği Bölümü

  11. ParametricExplicit Form-Implicit Form ConversionExample : 5. Curves and Curve Modeling Planar 2. degreecurve: Howtoobtainimplicit form? t is extracted as: Replacing t in y equation; Rearranging the above equation; Rearranging again; Weobtain implicit form. GYTE-Makine Mühendisliği Bölümü

  12. ParametricExplicit Form-Implicit Form ConversionExample : 5. Curves and Curve Modeling Planar 2. degreecurve : plot GYTE-MakineMühendisliğiBölümü

  13. Curve Classification 5. Curves and Curve Modeling CurveClassification: • AnalyticCurves • Syntheticcurves GYTE-Makine Mühendisliği Bölümü

  14. AnalyticCurves 5. Curves and Curve Modeling Thesecurveshave an analyticequation • point • line • arc • circle • fillet • Chamfer • Conics(ellipse, parabola,andhyperbola)) GYTE-Makine Mühendisliği Bölümü

  15. FormingGeometrywithAnalyticCurves 5. Curves and Curve Modeling line arc circle GYTE-Makine Mühendisliği Bölümü

  16. AnalyticCurvesLine 5. Curves and Curve Modeling Line definition in cartesian coordinate system: • Here; • m:slope of theline • b:pointthatintersects y axis • x:independentvaraible of y function. Parametric form; GYTE-Makine Mühendisliği Bölümü

  17. AnalyticCurvesLineExample:implicit-explicit form change 5. Curves and Curve Modeling Line equation: implicit form explicit form Changingtoparametric form. Inthiscase Let . Replacingthisvalueto y equation. İs obtained. As a result; Parametriclineequation is obtained. Toturnbacktoimplicitorexplicitnonparametric form t is repaced in x and y equalities Fromherethe form at thebeginning is obtained. GYTE-Makine Mühendisliği Bölümü

  18. AnalyticCurvesCircle 5. Curves and Curve Modeling Circle definition in Cartesian coordinate system: • Here; • a,b:x,y coordinates of centerpoint • r: circleradius • Parametric form GYTE-Makine Mühendisliği Bölümü

  19. AnalyticCurvesEllipse 5. Curves and Curve Modeling Ellipse definition in Cartesian coordinate system: • Here; • h,k:x,y coordinates of centerpoint • a: radius of majoraxis • b: radius of minör exis • Parametric form GYTE-Makine Mühendisliği Bölümü

  20. AnalyticCurvesParabola 5. Curves and Curve Modeling Parabola definition in Cartesian coordinate system: • Usual form; y = ax2 + bx + c GYTE-Makine Mühendisliği Bölümü

  21. AnalyticCurvesHyperbola 5. Curves and Curve Modeling Hyperbola definition in Cartesian coordinate system: GYTE-Makine Mühendisliği Bölümü

  22. Synthetic Curves 5. Curves and Curve Modeling As the name impliestheseareartificialcurves • Lagrangeinterpolationcurves • Hermiteinterpolationcurves • Bezier • B-Spline • NURBS • etc. • Analytic curves are usually not sufficient to meet geometricdesign requirements of mechanical parts. • Many products need free-form, or synthetic curvedsurfaces • Thesecurvesuse a series of controlpointseitherinterploatedoraproximated • It is thedefinitionmethosforcomplexcurves. • Itshould be controllablebythedesigner. • Calculationandstorageshould be easy. • At thesame time called as free form curves. GYTE-Makine Mühendisliği Bölümü

  23. Synthetic Curves 5. Curves and Curve Modeling opencurrve closedcurve GYTE-Makine Mühendisliği Bölümü

  24. interpolated approximated Synthetic Curves 5. Curves and Curve Modeling controlpoints GYTE-Makine Mühendisliği Bölümü

  25. 2 1 3 4 Composite Curves 5. Curves and Curve Modeling • Curves can be represented by connected segments to form a composite curve • There must be continuity at the mid-points GYTE-Makine Mühendisliği Bölümü

  26. Degrees of Continuity 5. Curves and Curve Modeling • Position continuity • Slope continuity 1st derivative • Curvature continuity 2nd derivative • Higher derivatives as necessary GYTE-Makine Mühendisliği Bölümü

  27. PositionContinuity 5. Curves and Curve Modeling Mid-pointsareconnected 2 1 3 Connected (C0 continuity) GYTE-Makine Mühendisliği Bölümü

  28. SlopeContinuity 5. Curves and Curve Modeling Both curves have the same 1. derivative value at the connection point. At the same time position continuity is also attained. 1 2 Continuous tangent Tangent continuity (C1 continuity) GYTE-Makine Mühendisliği Bölümü

  29. Curvature Continuity 5. Curves and Curve Modeling Bothcurveshavethesame 2.derivativevalue at theconnectionpoint. At the same time position andslopecontinuity is also attained. 1 2 Continuous curvature Curvature continuity (C2 continuity) GYTE-Makine Mühendisliği Bölümü

  30. 2 1 3 4 Cubic polynomials 5. Curves and Curve Modeling Composite Curves • A cubic spline has C2 continuity at intermediate points • Cubic splines do not allow local control GYTE-Makine Mühendisliği Bölümü

  31. LinearInterpolation 5. Curves and Curve Modeling General Linear Interpolation: One of the simplest method is linear interpolation. GYTE-Makine Mühendisliği Bölümü

  32. Parametric Cubic Polynomial Curves 5. Curves and Curve Modeling • Cubic polynomials are the lowest-order polynomials that can represent a non-planar curve • The curve can be defined by 4 boundary conditions GYTE-Makine Mühendisliği Bölümü

  33. P1’ p1 p3 P0’ p1 p2 p0 Hermite Lagrange p0 Cubic Polynomials 5. Curves and Curve Modeling • Lagrange interpolation - 4 points • Hermite interpolation - 2 points, 2 slopes GYTE-Makine Mühendisliği Bölümü

  34. LagrangeInterpolation 5. Curves and Curve Modeling 2 xi terms should not be the same, For N+1 data points ; (x0,y0),...,(xN,yN) için Lagrange interpolation form is in the form of linear combination: Belowpolynomial is calledLagrangebasepolynomial; GYTE-Makine Mühendisliği Bölümü

  35. LagrangeInterpolation 5. Curves and Curve Modeling This image shows, for four points ((−9, 5), (−4, 2), (−1, −2), (7, 9)), the (cubic) interpolation polynomial L(x) (in black), which is the sum of the scaled basis polynomials y0ℓ0(x), y1ℓ1(x), y2ℓ2(x) and y3ℓ3(x). The interpolation polynomial passes through all four control points, and each scaled basis polynomial passes through its respective control point and is 0 where x corresponds to the other three control points GYTE-Makine Mühendisliği Bölümü

  36. LagrangeInterpolationExample: 5. Curves and Curve Modeling A 3. degree L(x) function has thefollowing x andcorresponding y values; The polynomial corresponding to the above values can be determined by Lagrange interpolation method: l1(x)= l2(x)= l3(x)= l4(x)= l5(x)= L(x)=8l1(x)+6l2(x)-6l3(x)-9l4(x)-l5(x) GYTE-Makine Mühendisliği Bölümü

  37. LagrangeInterpolationExample: 5. Curves and Curve Modeling L(x)= -0,7083x4+7,4167x3-22,2917x2+13,5833x+8 obtained. GYTE-Makine Mühendisliği Bölümü

  38. CubicHermiteInterpolation 5. Curves and Curve Modeling Alsoknown as cubicsplines. Enablesupto C1continuity. There are no algebraic coefficints but there are geometric coefficints General form of CubicHermiteinterpolation: Position vector at the starting point Position vector at the end point Tangent vector at the starting point Tangent vector at the endpoint GYTE-MakineMühendisliğiBölümü

  39. 5. Curves and Curve Modeling CubicHermiteInterpolation Hermite base functions Hermite form is obtainedbythelinearsummation of this 4 function at eachinterval. GYTE-Makine Mühendisliği Bölümü

  40. 5. Curves and Curve Modeling CubicHermiteInterpolation The effect of tangent vector to the curve shape Geometrik katsayı matrisi Geometriccoefficientmatrixcontrolstheshape of thecurve. GYTE-Makine Mühendisliği Bölümü

  41. 5. Curves and Curve Modeling CubicHermiteInterpolation Hermitecurve set withsameendpoints (P0 ve P1), Tangentvectors P0’ and P1’havethesamedirections but P0’ havedifferentmagnitude P1’ is constant P0’ P2 P0 T2 GYTE-Makine Mühendisliği Bölümü

  42. 5. Curves and Curve Modeling CubicHermiteInterpolation All tangent vector magnitudes are equal but the direction of left tangent vector changes. GYTE-Makine Mühendisliği Bölümü

  43. CubicHermiteInterpolation 5. Curves and Curve Modeling CubicHermiteinterpolation form: There are no algebraic coefficints but there are geometric coefficints Can also be written as: GYTE-MakineMühendisliğiBölümü

  44. 5. Curves and Curve Modeling ApproximatedCurves • Bezier • B-Spline • NURBS • etc. GYTE-Makine Mühendisliği Bölümü

  45. 5. Curves and Curve Modeling Bezier Curves • P. Bezier of the French automobile company of Renault first introduced the Bezier curve (1962). • Bezier curves were developed to allow more convenient manipulation of curves • A system for designing sculptured surfaces of automobile bodies (based on the Bezier curve) • A Bezier curve is a polynomial curve approximating a control polygon • Quadratic and cubic Bézier curves are most common • Higher degree curves are more expensive to evaluate. • When more complex shapes are needed, low order Bézier curves are patched together. • Bézier curves are easily programmable. Bezier curves are widely used in computer graphics. • Enables up to C1 continuity. GYTE-Makine Mühendisliği Bölümü

  46. 5. Curves and Curve Modeling Bezier Curves Control polygon GYTE-Makine Mühendisliği Bölümü

  47. 5. Curves and Curve Modeling Bezier Curves GYTE-Makine Mühendisliği Bölümü

  48. 5. Curves and Curve Modeling Bezier Curves General Beziercurve form which is controlledby n+1 Picontrolpoints; wherethepolynomials are known as Bernstein basis polynomials of degree n, defining t0 = 1 and (1 - t)0 = 1. : binomial coefficient. Degree of polynomial is onelessthanthecontrolpointsused. GYTE-Makine Mühendisliği Bölümü

  49. 5. Curves and Curve Modeling • The points Pi are called control points for the Bézier curve • The polygon formed by connecting the Bézier points with lines, starting with P0 and finishing with Pn, is called the Bézier polygon (or control polygon). The convex hull of the Bézier polygon contains the Bézier curve. • The curve begins at P0 and ends at Pn; this is the so-called endpoint interpolation property. • The curve is a straight line if and only if all the control points are collinear. • The start (end) of the curve is tangent to the first (last) section of the Bézier polygon. • A curve can be split at any point into 2 subcurves, or into arbitrarily many subcurves, each of which is also a Bézier curve. GYTE-Makine Mühendisliği Bölümü

  50. 5. Curves and Curve Modeling Bezier CurvesLinearCurves t= [0,1] form of a linearBéziercurveturnsoutto be linearinterpolloation form. Curvepassesthroughpoints P0ve P1. Animation of a linear Bézier curve, t in [0,1]. The t in the function for alinear Bézier curve can be thought of as describing how far B(t) isfrom P0 to P1. For example when t=0.25, B(t) is one quarter of theway from point P0 to P1. As t varies from 0 to 1, B(t) describes acurved line from P0 to P1. GYTE-Makine Mühendisliği Bölümü

More Related