Download presentation
Presentation is loading. Please wait.
1
5. Curves and Curve Modeling
ME 521 Computer Aided Design 5. Curves and Curve Modeling Assoc.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical University
2
Mechanical Engineering Department, GTU
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 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
3
Mechanical Engineering Department, GTU
Purpose 5. Curves and Curve Modeling Curves are the basics for surfaces Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
4
Why Not Simply Use a Point Matrix to Represent a Curve?
5. Curves and Curve Modeling Storage issue and limited resolution Computation and transformation Difficulties in calculating the intersections or curves and physical properties of objects Difficulties in design (e.g. control shapes of an existing object) Poor surface finish of manufactured parts Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
5
Advantages of Analytical Representation for Geometric Entities
5. Curves and Curve Modeling A few parameters to store Designers know the effect of data points on curve behavior, control, continuity, and curvature Facilitate calculations of intersections, object properties, etc. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
6
Mechanical Engineering Department, GTU
Curve Definitions 5. Curves and Curve Modeling Explicit form : Implicit form : Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
7
Drawbacks of Conventional Representations
5. Curves and Curve Modeling Conventional explicit and implicit forms have several drawbacks. They represent unbounded geometry They may be multi-valued Difficult to evaluate points along the curve Depends on coordinate system Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
8
Parametric Representation
5. Curves and Curve Modeling Curves are defined as a function of a single parameter: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
9
Parametric Representation
5. Curves and Curve Modeling u u Surface, P=P(u,v) Curve, P=P(u) P(u)=[x(u),y(u),z(u)]T v P(u, v)=[x(u, v), y(u, v), z(u, v)]T Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
10
Parametric Representation
5. Curves and Curve Modeling Changing curve equation into parametric form: Let’s use “t” parameter ; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
11
Parametric Explicit Form- Implicit Form Conversion Example :
5. Curves and Curve Modeling Planar 2. degree curve: How to obtain implicit form? t is extracted as: Replacing t in y equation; Rearranging the above equation; Rearranging again; We obtain implicit form. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
12
Parametric Explicit Form- Implicit Form Conversion Example :
5. Curves and Curve Modeling Planar 2. degree curve : plot Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
13
Mechanical Engineering Department, GTU
Curve Classification 5. Curves and Curve Modeling Curve Classification: Analytic Curves Synthetic curves Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
14
Mechanical Engineering Department, GTU
Analytic Curves 5. Curves and Curve Modeling These curves have an analytic equation point line arc circle fillet Chamfer Conics (ellipse, parabola,and hyperbola)) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
15
Forming Geometry with Analytic Curves
5. Curves and Curve Modeling line arc circle Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
16
Mechanical Engineering Department, GTU
Analytic Curves Line 5. Curves and Curve Modeling Line definition in cartesian coordinate system: Here; m: slope of the line b: point that intersects y axis x: independent varaible of y function. Parametric form; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
17
Analytic Curves Line Example: implicit-explicit form change
5. Curves and Curve Modeling Line equation: implicit form explicit form Changing to parametric form. In this case Let Replacing this value into y equation. is obtained. As a result; Parametric line equation is obtained. To turn back to implicit or explicit nonparametric form t is replaced in x and y equalities From here the form at the beginning is obtained. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
18
Analytic Curves Circle
5. Curves and Curve Modeling Circle definition in Cartesian coordinate system: Here; a,b: x,y coordinates of center point r: circle radius Parametric form Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
19
Analytic Curves Ellipse
5. Curves and Curve Modeling Ellipse definition in Cartesian coordinate system: Here; h,k: x,y coordinates of center point a: radius of major axis b: radius of minör exis Parametric form Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
20
Analytic Curves Parabola
5. Curves and Curve Modeling Parabola definition in Cartesian coordinate system: Usual form; y = ax2 + bx + c Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
21
Analytic Curves Hyperbola
5. Curves and Curve Modeling Hyperbola definition in Cartesian coordinate system: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
22
Mechanical Engineering Department, GTU
Synthetic Curves 5. Curves and Curve Modeling As the name implies these are artificial curves Lagrange interpolation curves Hermite interpolation curves Bezier B-Spline NURBS etc. Analytic curves are usually not sufficient to meet geometric design requirements of mechanical parts. Many products need free-form, or synthetic curved surfaces These curves use a series of control points either interploated or aproximated It is the definition method for complex curves. It should be controllable by the designer. Calculation and storage should be easy. At the same time called as free form curves. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
23
Mechanical Engineering Department, GTU
Synthetic Curves 5. Curves and Curve Modeling open curve closed curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
24
Mechanical Engineering Department, GTU
Synthetic Curves 5. Curves and Curve Modeling interpolated control points approximated Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
25
Mechanical Engineering Department, GTU
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 1 2 3 4 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
26
Mechanical Engineering Department, GTU
Degrees of Continuity 5. Curves and Curve Modeling Position continuity Slope continuity 1st derivative Curvature continuity 2nd derivative Higher derivatives as necessary Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
27
Mechanical Engineering Department, GTU
Position Continuity 5. Curves and Curve Modeling Mid-points are connected 2 1 3 Connected (C0 continuity) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
28
Mechanical Engineering Department, GTU
Slope Continuity 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) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
29
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Curvature Continuity Both curves have the same 2.derivative value at the connection point. At the same time position and slope continuity is also attained. 1 2 Continuous curvature Curvature continuity (C2 continuity) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
30
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Composite Curves A cubic spline has C2 continuity at intermediate points Cubic splines do not allow local control 1 2 3 4 Cubic polynomials Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
31
Mechanical Engineering Department, GTU
Linear Interpolation 5. Curves and Curve Modeling General Linear Interpolation: One of the simplest method is linear interpolation. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
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 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
33
Mechanical Engineering Department, GTU
Cubic Polynomials 5. Curves and Curve Modeling Lagrange interpolation - 4 points Hermite interpolation - 2 points, 2 slopes p0 p1 P1’ P0’ Hermite p0 p3 p2 p1 Lagrange Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
34
Lagrange Interpolation
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: Below polynomial is called Lagrange base polynomial; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
35
Lagrange Interpolation
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 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
36
Lagrange Interpolation Example:
5. Curves and Curve Modeling A 3. degree L(x) function has the following x and corresponding y values; The polynomial corresponding to the above values can be determined by Lagrange interpolation method: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
37
Lagrange Interpolation Example:
5. Curves and Curve Modeling L(x)= -0,7083x4+7,4167x3-22,2917x2+13,5833x+8 obtained. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
38
Cubic Hermite Interpolation
5. Curves and Curve Modeling Also known as cubic splines. Enables up to C1 continuity. General form of Cubic Hermite interpolation: Position vector at the starting point Position vector at the end point Tangent vector at the starting point Tangent vector at the end point There are no algebraic coefficints but there are geometric coefficints Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
39
Cubic Hermite Interpolation
5. Curves and Curve Modeling Cubic Hermite Interpolation Hermite base functions Hermite form is obtained by the linear summation of this 4 function at each interval. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
40
Cubic Hermite Interpolation
5. Curves and Curve Modeling Cubic Hermite Interpolation The effect of tangent vector to the curve shape Geometrik katsayı matrisi Geometric coefficient matrix controls the shape of the curve. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
41
Cubic Hermite Interpolation
5. Curves and Curve Modeling Cubic Hermite Interpolation P0 P0’ P2 T2 Hermite curve set with same end points (P0 ve P1), Tangent vectors P0’ and P1’ have the same directions but P0’ have different magnitude P1’ is constant Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
42
Cubic Hermite Interpolation
5. Curves and Curve Modeling Cubic Hermite Interpolation All tangent vector magnitudes are equal but the direction of left tangent vector changes. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
43
Cubic Hermite Interpolation
5. Curves and Curve Modeling Cubic Hermite interpolation form: Can also be written as: There are no algebraic coefficints but there are geometric coefficints Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
44
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Approximated Curves Bezier B-Spline NURBS etc. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
45
Mechanical Engineering Department, GTU
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. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
46
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Bezier Curves Control polygon Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
47
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Bezier Curves Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
48
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Bezier Curves General Bezier curve form which is controlled by n+1 Pi control points; where the polynomials are known as Bernstein basis polynomials of degree n, defining t0 = 1 and (1 - t)0 = 1. : binomial coefficient. Degree of polynomial is one less than the control points used. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
49
Mechanical Engineering Department, GTU
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. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
50
Bezier Curves Linear Curves
5. Curves and Curve Modeling Bezier Curves Linear Curves t= [0,1] form of a linear Bézier curve turns out to be linear interpollation form. Curve passes through points P0 ve P1. Animation of a linear Bézier curve, t in [0,1]. The t in the function for a linear Bézier curve can be thought of as describing how far B(t) is from P0 to P1. For example when t=0.25, B(t) is one quarter of the way from point P0 to P1. As t varies from 0 to 1, B(t) describes a curved line from P0 to P1. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
51
Bezier Curves Quadratic Curves
5. Curves and Curve Modeling Bezier Curves Quadratic Curves Curve passes through P0 , P1 & P2 points. For quadratic Bézier curves one can construct intermediate points Q0 and Q1 such that as t varies from 0 to 1: Point Q0 varies from P0 to P1 and describes a linear Bézier curve. Point Q1 varies from P1 to P2 and describes a linear Bézier curve. Point B(t) varies from Q0 to Q1 and describes a quadratic Bézier curve. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
52
Bezier Curves Higher Order Curves
5. Curves and Curve Modeling Bezier Curves Higher Order Curves For higher-order curves one needs correspondingly more intermediate points. Cubic Bezier Curve Curve passes through P0 , P1, P2 & P3 points. For cubic curves one can construct intermediate points Q0, Q1 & Q2 that describe linear Bézier curves, and points R0 & R1 that describe quadratic Bézier curves Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
53
Bezier Curves Bernstein Polynomials
5. Curves and Curve Modeling Bezier Curves Bernstein Polynomials Most of the graphics packages confine Bézier curve with only 4 control points. Hence n = 3 . t f(t) 1 BB1 BB4 BB2 BB3 Bernstein polinomials Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
54
Bezier Curves Higher Order Curves
5. Curves and Curve Modeling Bezier Curves Higher Order Curves Fourth Order Bezier Curve Curve passes through P0 , P1, P2, P3 & P4 points. For fourth-order curves one can construct intermediate points Q0, Q1, Q2 & Q3 that describe linear Bézier curves, points R0, R1 & R2 that describe quadratic Bézier curves, and points S0 & S1 that describe cubic Bézier curves: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
55
Bezier Curves Polinomial Form
5. Curves and Curve Modeling Bezier Curves Polinomial Form Sometimes it is desirable to express the Bézier curve as a polynomial instead of a sum of less straightforward Bernstein polynomials. Application of the binomial theorem to the definition of the curve followed by some rearrangement will yield: and This could be practical if Cj can be computed prior to many evaluations of B(t); however one should use caution as high order curves may lack numeric stability (de Casteljau's algorithm should be used if this occurs). Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
56
Bezier Curves Example:
5. Curves and Curve Modeling Bezier Curves Example: Coordinatess of 4 control poits are given as: What is the equation of Bezier curve that will be obtained by using above points? What are the coordinate values on the curve corresponding to t=0,1/4,2/4,3/4,1 ? Solution: For 4 points 3. order Bezier form is used: : Bezier curve equation Points on B(t) curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
57
Bezier Curves Example:
5. Curves and Curve Modeling Bezier Curves Example: Equation of Bezier curve: Control points Points on B(t) curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
58
Bezier Curves Disadvantages
5. Curves and Curve Modeling Bezier Curves Disadvantages Difficult to interpolate points Cannot locally modify a Bezier curve Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
59
Bezier Curves Global Change
5. Curves and Curve Modeling Bezier Curves Global Change Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
60
Bezier Curves Local Change
5. Curves and Curve Modeling Bezier Curves Local Change Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
61
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling Bezier Curves Example 2 cubic composite Bézier curve - 6. order Bézier curve comparisson Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
62
Bezier Curves Modeling Example
5. Curves and Curve Modeling Bezier Curves Modeling Example Contains 32 curve Polygon representation Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
63
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling B-Spline Curves B-splines are generalizations of Bezier curves A major advantage is that they allow local control B-spline is a spline function that has minimal support with respect to a given degree, smoothness, and domain partition. A fundamental theorem states that every spline function of a given degree, smoothness, and domain partition, can be represented as a linear combination of B-splines of that same degree and smoothness, and over that same partition. The term B-spline was coined by Isaac Jacob Schoenberg and is short for basis spline. B-splines can be evaluated in a numerically stable way by the de Boor algorithm. A B-spline is simply a generalisation of a Bézier curve, and it can avoid the Runge phenomenon without increasing the degree of the B-spline. The degree of curve obtained is independent of number of control points. Enables up to C2 continuity. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
64
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling B-Spline Curves Pi defines B-Spline curve with given n+1 control points: Here Ni,k(u) is B-Spline functions are proposed by Cox and de Boor in 1972. k parameter controls B-Spline curve degree (k-1) and generally independent of number of control points. aksi durumda ui is called parametric knots or (knot vales) for an open curve B-Spline: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
65
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling B-Spline Curves if a curve with (k-1) degree and ( n+1) control points is to be developed, (n+k+1) knots then are required. This inequality shows that; for linear curve at least 2 for 2. degree curve at least 3 for cubic curve at least 4 control points are necessary. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
66
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling B-Spline Curves Below figures show B-Spline functions: Linear function k=2 2. degree function k=3 cubic function k=4 Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
67
B-Spline Curves Properties
5. Curves and Curve Modeling B-Spline Curves Properties Number of control points is independent than the degree of the polynomial. Linear k=2 vertex Quadratic B-Spline; k=3 Cubic B-Spline; k=4 Fourth Order B-Spline; k=5 n=3 The higher the order of the B-Spline, the less the influence the close control point Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
68
B-Spline Curves Properties
5. Curves and Curve Modeling B-Spline Curves Properties B-spline allows better local control. Shape of the curve can be adjusted by moving the control points. Local control: a control point only influences k segments. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
69
B-Spline Curves Example:
5. Curves and Curve Modeling B-Spline Curves Example: Cubic Spline; k=4, n=3 8 knots are required. reminder : To define a (k-1) degree curve with (n+1) control points (n+k+1) knots are required. Equation results 8 knots Limits of u parameter: Bezier curve equality; reminder : * B-Spline vector can be calculated together with knot vector; Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
70
B-Spline Curves Example:
5. Curves and Curve Modeling B-Spline Curves Example: aksi durumda else Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
71
B-Spline Curves Example:
5. Curves and Curve Modeling B-Spline Curves Example: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
72
B-Spline Curves Example:
5. Curves and Curve Modeling B-Spline Curves Example: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
73
B-Spline Curves Example:
5. Curves and Curve Modeling B-Spline Curves Example: Replacing into Ni,4 * equality; By replacing Ni,3 into the above equality the B-Spline curve equation given below is obtained. This equation is the same with Bezier curve with the same control points. Hence cubic B-Spline curve with 4 control points is the same with cubic Bezier curve with the same control points. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
74
Bezier /B-Spline Curves
5. Curves and Curve Modeling Bezier /B-Spline Curves Bezier Blending Functions; Bi,n B-spline Blending Functions; Ni,k Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
75
Bezier /B-Spline Curves
5. Curves and Curve Modeling Bezier /B-Spline Curves Point that is moved This point is moving This point is not moving Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
76
Uniform B-Spline Curves
5. Curves and Curve Modeling Uniform B-Spline Curves When B-spline is uniform B-spline functions with n degrees are just shifted copies of each other. Knots are equally spaced along the curve. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
77
Rational Curves and NURBS
5. Curves and Curve Modeling Rational Curves and NURBS Rational polynomials can represent both analytic and polynomial curves in a uniform way Curves can be modified by changing the weighting of the control points A commonly used form is the Non-Uniform Rational B-spline (NURBS) Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
78
Rational Bezier Curves
5. Curves and Curve Modeling Rational Bezier Curves The rational Bézier adds adjustable weights to provide closer approximations to arbitrary shapes. The numerator is a weighted Bernstein-form Bézier curve and the denominator is a weighted sum of Bernstein polynomials. Given n + 1 control points Pi, the rational Bézier curve can be described by: or simply Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
79
Rational B-Spline Curves
5. Curves and Curve Modeling Rational B-Spline Curves One rational curve is defined by ratios of 2 polynomials. In rational curve control points are defined in homogenous coordinates. Then rational B-Spline curve can be obtained in the following form: Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
80
Rational B-Spline Curves
5. Curves and Curve Modeling Rational B-Spline Curves Ri,k(u) is the rational B-Spline basis functions. The above equality show that; Ri,k(u) basis functions are the generelized form of Ni,k(u). When hi=1 is replaced in Ri,k(u) equality shows the same properties with the nonrational form. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
81
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling NURBS It is non uniform rational B-Spline formulation. This mathematical model is generally used for constructing curves and surfaces in computer graphics. NURBS curve is defined by its degree, control points with weights and knot vector. NURBS curves and surfaces are the generalized form of both B-spline and Bézier curves and surfaces. Most important difference is the weights in the control points which makes NURBS rational curve. NURBS curves have only one parametric direction (generally named as s or u). NURBS surfaces have 2 parametric directions. NURBS curves enables the complete modeling of conic curves. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
82
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling NURBS General form of a NURBS curve; k: is the number of control points (Pi) wi: weigths The denominator is a normalizing factor that evaluates to one if all weights are one. This can be seen from the partition of unity property of the basis functions. It is customary to write this as Rin: are known as the rational basis functions. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
83
NURBS Examples 5. Curves and Curve Modeling Uniform knot vector
Nonuniform knot vector Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
84
NURBS Development of NURBS
5. Curves and Curve Modeling NURBS Development of NURBS Boeing: Tiger System in 1979 SDRC: Geomod in 1993 University of Utah: Alpha-1 in 1981 Industry Standard: IGES, PHIGS, PDES,Pro/E, etc. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
85
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling NURBS Advantages Serve as a genuine generalizations of non-rational B-spline forms as well as rational and non-rational Bezier curves and surfaces Offer a common mathematical form for representing both standard analytic shapes (conics, quadratics, surface of revolution, etc) and free-from curves and surfaces precisely. B-splines can only approximate conic curves. By evaluating a NURBS curve at various values of the parameter, the curve can be represented in cartesian two- or three-dimensional space. Likewise, by evaluating a NURBS surface at various values of the two parameters, the surface can be represented in cartesian space. Provide the flexibility to design a large variety of shapes by using control points and weights. increasing the weights has the effect of drawing a curve toward the control point. Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
86
Mechanical Engineering Department, GTU
5. Curves and Curve Modeling NURBS Advantages Have a powerful tool kit (knot insertion/refinement/removal, degree elevation, splitting, etc.) They are invariant under affine as well as perspective transformations: operations like rotations and translations can be applied to NURBS curves and surfaces by applying them to their control points. Reasonably fast and computationally stable. They reduce the memory consumption when storing shapes (compared to simpler methods). They can be evaluated reasonably quickly by numerically stable and accurate algorithms. Clear geometric interpretations Dr. Ahmet Zafer Şenalp ME 521 Mechanical Engineering Department, GTU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.