机械CADChapter 2 Curves

  • 格式:doc
  • 大小:209.50 KB
  • 文档页数:14

Chapter 2 Curves2.1 IntroductionCurves are one of the basic entities in the CAD/CAM systems. All existing CAD/CAM systems provide the users with basic wireframe entities. A wireframe model is created by specifying each edge of the physical object or by connecting an object ’s constituent vertices using straight lines or curves. Wireframe is used in visualization of the underlying design structure of a 3D model. Since wireframe representations are relatively simple and quick to calculate, they are often used in cases where a high screen refresh rate is needed.2.2 Curve RepresentationCurves can be described mathematically by nonparametric or parametric equations. Nonparametric equations can be explicit or implicit. The explicit nonparametric representation of general 3D curve has the form of[][]T T )x (g )x (f x z y x P == (2.1)Where P is the position vector of point P, and (x y z) is the coordinate of the point.The curve described in Eq. (2.1) can be solved by finding the intersection of two surfaces as ⎭⎬⎫==0)z ,y ,x (G 0)z ,y ,x (F (2.2) Equation (2.2) is the implicit form for the curve, where F(x, y, z)=0 and G(x, y, z)=0 represent the two surface equations.However, the equation must be solved to find its roots(y and z values) if a certain value of x is given. This may be inconvenient and lengthy. Besides that, other limitations of nonparametric are:(1) If the slope of a curve at a point is vertical or near vertical, its value becomes infinity or very large, and it is difficult to deal with. Other ill-defined mathematical conditions may result.(2) If the curve is to be displayed as a series of points or a straight line segments, the computations involved could be extensive.Parametric representation of curves overcomes all of the above difficulties. It allows closed and multiple-valued functions to be easily defined and replaces the use of slope with that of tangent vectors. In the case of commonly used curves such as conics and cubics, these equations are polynomials rather than equations involving roots. Hence the parametric form is not only more general but it is also well suited to computations and display.The parametric equation for a three-dimensional curve in space takes the following vector form: []max min TT t t t ,)t (z )t (y )t (x ]z y x [)t (P ≤≤== (2.3) Equation (2.3) implies that the coordinates of a point on the curve are the components of its position vector.There are many advantages with parametric form given by Eq. (2.3). Points on the curve can be computed by substituting the proper parametric values into the equation. Parametric geometry can be easily expressed in terms of vectors and matrices which enables the use of simple computationtechniques to solve complex analytical geometry problems. Parametric form is better suited for display by special graphics hardware.To evaluate the slope of a parametric curve, the tangent vector is defined as P ’(t) in the Cartesian space such that:dt /)t (dP )t ('P = (2.4)Substituting Eq. (2.3) in Eq. (2.4) yield the tangent vector[][]max min Tt t t ,)t ('z )t ('y )t ('x 'z 'y 'x )t ('P ≤≤== (2.5) Where x ’(t), y ’(t) and z ’(t) are the first parametric derivatives of the position vector x(t), y(t) and z(t) respectively. The slopes of the curves are given by⎪⎪⎪⎭⎪⎪⎪⎬⎫===='z 'x dz dx 'y 'z dy dz 'x 'y dt /dx dt /dy dx dy (2.6) The magnitude of the tangent vector is given by222'z 'y 'x )t ('P ++= (2.7) and the direction cosines of the vector are given byk n j n i n )t ('P )t /('P n z y x ++== (2.8) Where n is the unit vector with Cartesian space components n x , n y , n z .There are two categories of curves that can be represented parametrically: analytic and synthetic. Analytic curves are defined by analytic equations such as lines, circles and conics. Synthetic curves are described by a set of data points (control points) such as splins and Bezier curves. Analytic curves provide very compact forms to represent shapes while synthetic curves provide designers with greater flexibility and control of curve shape.2.3 Parametric Representation of Analytical Curves2.3.1 LinesParametric equations for lines are discussed in following two cases:Case 1: A line connecting two points P 1 and P 2 is shown in Fig. 2.3. Define a parameter t such that it has the value 0 and at P 1 and P 2 respectively.The equation of the line is1t 0),P P (t P P 121≤≤-++ (2.9)In scalar form, this equation can be written as)1t 0()z z (t z z )y y (t y y )x x (t x x 121121121≤≤⎪⎭⎪⎬⎫-+=-+=-+= (2.10)The tangent vector of the line is given by12P P 'P -= (2.11)Or in scalar form,⎪⎭⎪⎬⎫-=-=-=121212z z 'z y y 'y x x 'x (2.12)The unit vector n in the direction of the line is given byL /)P P (n 12-= (2.13) Where L is the length of the line21221221212)z z ()y y ()x x (P P L -+-+-=-= (2.14)Case 2: A line passing through a point P 1 in a direction defined by the unit vector n .In three-dimensional space, the line passing through the point P 1(x 1,y 1,z 1) and parallel to the nonzero vector n(n x , n y , n z ) has parametric equation)L (,tn P P 1∞≤≤-∞+= (2.15)L is the parameter in Eq. (2.15) and the tangent vector is n.2.3.2 CirclesFigure 2.5 shows a circle defined by its centre P(x c , y c , z c ) and radius a. the circle is assumed to be located at xy plane for simplicity. The parametric equation of a circle can be written as )2t 0(z z t sin a y y t cos a x x c c c π≤≤⎪⎭⎪⎬⎫=+=+= (2.16)where parameter t is the angle measured from x axis to any point P on the circle.Equation (2.16) is not an effective way to display the circle due to computing the trigonometric functions in the equation for each point. It is desirable to write Eq. (2.16) in an incremental form. Assuming t ∆ is an increment between two consecutive points P n (x n ,y n ,z n ) and P n+1(x n+1,y n+1,z n+1), the following recursive relationship can be written as⎪⎪⎪⎭⎪⎪⎪⎬⎫=∆++=∆++=+=+=+++zn z )t t sin(a y y )t t cos(a x x t sin a y y t cos a x x 1n c 1n c 1n c n c n (2.17)Expanding the xn+1 and yn+1 gives⎪⎭⎪⎬⎫=∆--∆-+=∆--∆-+=+++n 1n c n c n c 1n c n c n c 1n z z t sin )x x (t cos )y y (y y t sin )y y (t cos )x x (x x (2.18)It is only need to calculated cos Δt and sin Δt once, which this eliminates computation of trigonometric functions for each point.Circular arcs are considered to be a special case of circles, a circular arc equation can be written as)t t t (z z t sin a y y t cos a x x e s c c c ≤≤⎪⎭⎪⎬⎫=+=+= (2.16)where ts and te are the starting and ending angles of the arc respectively. Most methods offered by software to create circles and circular arcs are the same.A circle database stores its radius and centre as its essential geometry data, regardless of the information user input and such information is always converted into radius and centre by the software.2.3.3 EllipsesAn ellipse can be defined as the locus of all points, in a plane, which has the same sum of distances from two given fixed points (called foci).The parametric equation of ellipse, elliptic arcs and fillets are similar to those of circles, circular arcs and fillets.The information usually stored in the database of an ellipse are a centre point, half the length of the major axis, half the length of the minor axis, and other information(orientation, starting and ending angles, color, etc.)Figure 2.6 shows an ellipse with point P c as the centre, length of half of the major and minor axes are a and b respectively. The parametric equation of an ellipse is)t 0(z z t s i nb y y tc o s a x x c c c π≤≤⎪⎭⎪⎬⎫=+=+= (2.20) Similar recursive relationships as in the case of circle are useful for generating points on the ellipse for display,⎪⎭⎪⎬⎫=∆--∆-+=∆--∆-+=+++n 1n c n c n c 1n c n c n c 1n z z t sin )x x (b /a t cos )y y (y y t sin )y y (b /a t cos )x x (x x (2.21)2.3.4 ParabolasA parabola may also be considered to be a set of points such that the distances of each point from a given point (the focus) and a given straight line (the directrix) are equal.Unlike the ellipse, the parabola is not a closed curve and two endpoints determine the mount of the parabola to be displayed.The parametric equation for a parabola can be written as)t 0(z z at 2y y at x x v v 2v ∞≤≤⎪⎭⎪⎬⎫=+=+= (2.22)The recursive relationships to generate points on the parabola are⎪⎭⎪⎬⎫=∆+=∆+∆-+=+++n 1n n 1n 2v n n 1n z z t a 2y y )t (a t )y y (x x (2.23)2.3.5 HyperbolasA hyperbola can be defined as the locus of points whose ration of the distance from one focus to a line (called the directrix) is a constant larger than one. This constant is the eccentricity of the hyperbola.The parametric equation of a hyperbola is given by)t 0(z z t sinh b y y t cosh a x x c c v ∞≤≤⎪⎭⎪⎬⎫=+=+= (2.24)2.3.6 ConicsConic curves or sections can be generated when a right circular cone is cut by planes at different angels relative to cone axis. We can see this process in Fig. 2.9.A conic section is a quadratic curve, which has a general form of0g fy dx cy bxy 2ax 22=+++++ (2.25)The development of the parametric representation of conic curves is based on the observation that a quadratic equation can be written as the product of two linear equations.Five conditions are required to completely define a conic curve (coefficient a in Eq. (2.25) is assumed to be one).Figure 2.10 shows a conic curve passing through P 1 to P 5. Defining the two pairs of line (L 1,L 2) and (L 3,L 4). Their equations areL 1=0 L 2=0 L 3=0 L 4=0 (2.26)The four intersection points are defined by points P 1 to P 4. Let us define the two coinc: L 1L 2=0 L 3L 4=0 (2.27)A linear combination of these two conics represents another conic which passes P 1 to P 4, aL 1L 2+bL 3L 4=0 (2.28)Another form of Eq. (2.28) is(1-t)L 1L 2+tL 3L 4=0 0≤t ≤ 1 (2.29)Equation (2.29) gives the parametric equation of a conic curve with parameter t. To use Eq. (2.29), four data points are needed to find the equation for the line L 1 to L 4 and the fifth point is necessary to find value of t.Similar development can be done when a conic is defined by three points and two tangent vectors(Figure 2.11). If we make lines L 1 and L 2 tangent to the conic curve, points P 1 and P 2 become one point, P3 and P4 become another point, and lines L3 and L4 are merged into one line.Equation (2.29) is then reduced to0tL L L )t 1(2321=+- 0≤t ≤ 1 (2.30)Points P 1, P 2, and P 4 in Fig. 2.11 is used to determine the equations for the line L 1 to L 3 and point P 3 is used to find the t value.2.4 Parametric Representation of Synthetic CurvesAnalytic curves are usually not sufficient to meet geometry design requirements. Free-form, synthetic curves and surfaces are required in many industry designs.Synthetic curves represent a curve-fitting problem to construct a smooth curve that passes through the given data points. Therefore, polynomials are the typical forms of these curves. The order of continuity becomes important when a complex curve is modeled by several curve segments connected together. Zero order continuity (C 0) yields a position continuous curve. First(C 1) and second (C 2) order continuity imply slope and curvature continuous curves respectively. A C 1 curve is the minimum acceptable curve for engineering design.The cubic polynomial is the lowest-degree polynomial that permits inflection within vurve segment and that allows representation of nonplanar (twisted) three-dimensional curves in space. Higher-order polynomials are not commonly used in CAD/CAM because they tend to oscillate about control points, and computationally inconvenient.Major CAD/CAM systems provide three types of synthetic curves: Hermite cubic spline, Bezier and B-spline curves. The cubic spline curve passes through the data points. Bezier and B-spline curves in general approximate the data points, that is, they do not pass through them. Both the cubic spline and Bezier curves have the first-order continuity and the B-spline curve has a second-order continuity.2.4.1 Hermite Cubic SplinesHermite cubic spline curves are defined as piecewise third-order polynomial curves. The most common spline curve is a three-dimensional planar curve.Let us first look at one segment: For one cubic spline segment, four conditions are required to determine the coefficients of the equation. The Hermite form of a cubic spline is determined by defining positions and tangent vectors at end points.The parametric equation of a cubic spline segment is given by1t 0,t C )t (P 30i i i ≤≤=∑= (2.31)Where t is the parameter and C i are the polynomial coefficients. In scalar form this equation can be written as⎪⎭⎪⎬⎫+++=+++=+++=z 0z 12z 23z 3y 0y 12y 23y 3x 0x 12x 23x 3C t C t C t C )t (z C t C t C t C )t (y C t C t C t C )t (x (2.32)In matrix form asC T )t (P T = (2.33)Where T T =[t 3, t 2, t, 1]; and C=[C 3, C 2, C 1, C 0]T , is called the coefficients vector.The tangent vector to the curve at any point is given by differentiating Eq. (2.31) with respect to t, this gives1t 0,t C )t ('P 30i 1i i ≤≤=∑=- (2.34)In order to find the coefficients C i , consider the cubic spline curve with the two end points P 0 and P 1 shown in Fig. 2.12.Apply the boundary conditions (P 0, P ’0 at t=0, and P 1, P ’1 at t=1) in Eq. (2.31) and (2.34),⎪⎪⎭⎪⎪⎬⎫++=+++===1231012311000C C 2C 3'P C C C C P C 'P C P (2.35) Solve Eq. (2.25) gives⎪⎪⎭⎪⎪⎬⎫++-=---==='P 'P )P P (2C )'P 'P (2)P P (3C 'P C P C 10103100120100 (2.36) Put Eq. (2.35) into Eqs. (2.31) and (2.32) gives'P )t t ('P )t t 2t (P )t 3t 2(P )1t 3t 2()t (P 123023123023-++-++-++-= 0≤t ≤ 1 (2.37) 'P )t 2t 3('P )1t 4t 3(P )t 6t 6(P )t 6t 6()t ('P 12021202-++-++-+-= 0≤t ≤ 1 (2.38) The functions of t in Eqs. (2.37) and (2.38) are called blending functions.Eq. (2.37) can be written in a matrix formV ]M [T )t (P T =, 0≤t ≤ 1 (2.39)Where [M] is the Hermite matrix and V is the geometry vector,⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎣⎡----=0001010012331122]M [ (2.40) V=[P 0 P 1 P 0’ P 1’]T (2.41)Similarly, Eq. (2.38) can be written asV ]'M [T )t ('P T =, 0≤t ≤ 1 (2.42)Where [M]’ is given by⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎣⎡----=0100246633660000]M [ (2.43) Equation (2.37) is used for one cubic spline segment. If there are several segments as shown inFig. 2.13, we have the following problem:Given a set of n points P 0, P 1, …, P n-1 and two end tangent vectors P 0’ and P n-1’ connect the points with a cubic spline curve, to eliminate the need for computing tangent vectors for intermediate points P 1 through P n-2 the continuity of curvature at these points can be imposed. Consider eliminating P 1’ between the first two segments that connect points P0, P1 and P2. The curvature continuity between the first two segments can be written as0t 1t 21)t (''P )t (''P === (2.44)Where the subscripts of t refer to the segment number. Differentiating Eq. (2.38) and using (2.44) gives4/)'P P 3'P P 3('P 22001+-+-= (2.45)This procedure can be repeated for the rest of segments.The use of the cubic splines in the design applications is not very popular compared to Bezier and B-spline curves. The control of the curve is not very obvious from the input data, a change of the position of a data or an end slope affects the entire shape of the spline. In addition, the order of the curve is always constant (cubic) regardless of the number of data.2.4.2 Bezier CurvesCubic splines are based on interpolation techniques, while Bezier and B-spline curves are examples based on approximation techniques. Bezier and B-spline curves do not pass through the given data points( except for the first and the last one), instead, these points are used to control the shape of the resulting curves. Most often, approximation techniques are preferred because of flexibility and intuitive feeling.Figure 2.14 shows some examples of Bezier curves, where 0,1,2,3 are control points. It can be observed that only the first and last control points lie on the Bezier curve, and the other points define the order, derivatives and shape of the curve. The curve is also always tangent to the first and last polygon segments.Mathematically for n+1 control points, the Bezier curve is defined by∑=≤≤=n1i n ,i i 1t 0),t (B P )t (P (2.46)Where P(t) is any point on the curve and P i is a control point. B i,n are the Bernstein polynomials. 1,)1(),()(--=n i n i t t i n C t B (2.47) Where C(n,i) is the binominal coefficient)!i n (!i !n )i ,n (C -= (2.48) The Bernstein polynomial serves as the blending function for the Bezier curve.With Eqs. (2.47) and (2.48), Eq. (2.46) can be expanded ton n 1n 1n 2n 22n 1n 0t P )t 1(t )1n ,n (C P )t 1(t )2,n (C P 1)t 1(t )1,n (C P )t 1(P )t (P +--+⋅⋅⋅+-+--+-=--- 0≤t ≤ 1 (2.49)The characteristics of Bezier curve are decided by the Bernstein polynomials and can be summarized as follows:1. The degree of a Bezier curve defined by n+1 control points is n.2. The curve passes through the first and last control points, and the curve is tangent to P1-P0 and P n-P n-1 at the endpoints. This can be verified by calculating P0’ and P1’.3. The curve is symmetric with respect to t and (1-t), as B i,n(t) and B i-1,n(t) are symmetry with respect to t. This means that the curve shape is not changed when the sequence of control points is reversed.4. The interpolation polynomial B i,n(t) has a maximum value at t=i/n, which can be obtained from equation d(B i,n(t))/dt=0. For example, P0, P3and P5are most influential when t=0, 3/5 and 1 respectively for a Bezier curve of degree 5(Figure 2.15).5. If the curve is in the plane, no straight line intersects a Bezier curve more times than it intersects the curve’s control polygon, which can be seen in Fig. 2.16.6. The curve shape can be modified by either changing one or more vertices of its polygon (see Fig.2.17), or keeping the polygon fixed and specifying multiple coincident points at a vertex.7. A closed Bezier curve can be generated by closing its characteristic polygon or choosing P0 and Pn to be coincident (see F.g. 2.18).8. Partition of unity: The sum of B i,n(t) is equal to 1 for any valid t.9. Convex property: A curve has the convex hull property if it lies entirely within the convex hull defined by the polygon vertices. The shaded area in Fig. 2.19 defines the convex hull of a Bezier curve.If two or more Bezier segments need to be joined together, maintaining continuity of various orders may be desired. To achieve C0 continuity, it is sufficient to make one of the end control points coincident. To achieve C1 continuity, the end slope of one segment must be equal to the starting slope of the next segment. This requires that the last segment of the first polygon and the first segment of the second polygon to form a straight line.The database of a Bezier curve, including the coordinate of the control points defining its polygon, is stored in the same order as input by the users.The shape of Bezier curve is controlled only by its defining points and the order is related to the number of points defined. The Bezier curve is smoother than the cubic spline because of its higher-order derivatives.Undesirable properties of Bezier curves are their numerical instability for large numbers of control points, and the fact that moving a single control point changes the globe shape of the curve. The former is sometimes avoidable by smoothly patching together low-order Bezier curves.2.4.3 B-Spline CurvesA generalization of the Bezier curve is the B-spline. B-spline curves provide both local control of the curves shape and the ability to add control points without increasing the degree of the curve. Compared with Bezier curve, the degree of B-spline curve is not controlled by the number of the given points. While four control points can always produce a cubic Bezier curve, they can generate a linear, quadratic or cubic B-spline curve.The equation of B-spline curve defined by n+1 control points P i is given by∑=≤≤=n0i max k ,i i t t 0),t (N P )t (P (2.50)Where N i,k are the B-spline functions. The control points forms the vertices of the control polygon. The parameter k controls the degree (k-1) of the resulting B-spline curve and is usually independent of the number of control points. The maximum limit of the parameter t is no longer a unity as in Bezier curves. The recursive relation of B-spline is defined as1i k i 1k ,1i k i 1k i 1k ,i i k ,i t t )t (N )t t (t )t (N )t t ()t (N ++-++-+---+-= (2.51)Where ⎩⎨⎧≤≤=+otherwise,0t t t ,1N 1i i1,i (2.52) Choose 0/0=0 if the denominators in Eq. (2.51) become zero. Eq. (2.52) shows that Ni,1 is a unit step function.Because Ni,1 is constant for k=1, a general value of k produces a polynomial in t degree (k-1) (see Wq. (2.51)). The t i are called parametric knots or knot values, and they form a knot vector. For an open curve, t i are(2.53)Where k n j 0+≤≤ (2.54) and the range of t is2k n t 0+-≤≤ (2.55)Relation (2.54) shows that (n+k+1) knots are needed to create a (k-1) degree curve defined by (n+1) control points. The knots are evenly spaced over the range of t with unit separation (∆t=1) between noncoincident knots. The upper bound in Eq. (2.55) must be greater than the lower bound, this givesn-k+2>0 (2.56) The characteristics of B-spline are summarized below:1. Nonnegativity: For all I, k and t, Ni,k(t) is not negative.2. Local support: the local control of curve can be achieved by changing the position for a control point(s) or by choosing a different degree (k-1). Changing one control point affects only k segment. Such an example is shown in Fig. 2.20.3. Partition of unity: ∑==n i k i t N0,1)(.4. A nonperiodic B-spline curve passes through the first and last control points P0 and Pn+1 and is tangent to the first (P1-P0) and last (Pn+1-Pn) segments of the control polygon(Figure 2.21).⎪⎩⎪⎨⎧>+=≤≤+-<=n j ,2k n n j k ,1k j k j ,0t j5. In general, the less the degree, the closer the curves get to the control points, as shown in Fig.2.22.6. As Fig. 2.23 shows, a second-degree curve is always tangent to the midpoints of all the internal polygon segments.7. The time a straight line intersects a B-spline curve is equal to the time it intersects the curve’s control polygon.8. Convex property: A B-spline curve is contained in the convex hull of its control points.9. If k equals the number of control points (n+1), the B-spline curve becomes a Bezier curve.10. The B-spline curve is pulled more to the control point by increasing the number of control points at the same position.11. Increasing the degree of curves makes it more difficult to control and calculate accurately. Therefore, a cubic B-spline is sufficient for a large number of applications.2.4.4 Rational CurvesB-spline curves have many nice properties for curve design, however, they are not able to represent the simplest curve, the circle. We shall generalize B-spline to rational curves. A rational curve is defined by the algebraic ratio of two polynomials. The most widely used rational curves are NURBS(Non-Uniform Rational B-spline). A brief introduction of rational B-spline curves is given below.A rational B-spline curve defined by n+1 control points P i is given by∑=≤≤=nimax k,iitt),t(RP)t(P(2.57) R i,k(t) are the rational B-spline basis functions given by∑=-=n0 ik,i i1 k,iik,i)t(Nh )t(Nh)t(R(2.58)Equation (2.58) shows that R i,k(t) are a generation of the nonrational basis functionN i,k(t). With hi=1 in the Eq. (2.58), we get R i,k(t)=N i,k(t). The rational basis functions R i,k(t) have nearly all the analytic and geometric characteristics of N i,k(t).NURBS are used extensively in the CAD industry and more widely in computing for 3Dgeometry generation and modeling because of their accuracy, flexibility, commonality of mathematical form for both standard geometric shapes and free-form shapes, B-spline curves and Bezier curves are special cases of NURBS curves.2.5 Curve Manipulation2.5.1 DisplayingThe curve parametric equation is used to generate the coordinate, and display processing unit receives these coordinate and changes them to screen-coordinates. The points are displayed and are connected by short-line segments.Equations of curves that involve trigonometric functions are usually rewritten to minimize computation time to generate points.2.5.2 Evaluating Points on CurvesIn most CAD/CAM systems, the function of evaluating points on curves is available (for example: Create Point on Curve).The curve parametric equation is used in this function, and incremental method is more efficient than method by substituting successive values of parameter into the equation.2.5.3 BlendingThe blending problem is stated below:Given two curve segment P 1 (u 1), 0<u1<a and P 2(u 2), 0<u 2<b, find the conditions for the two segments to be continuous at the point.Three types of continuity can be considered. The first C 0 continuity, that is, the ending point of the first curve and the staring point of the second curve are the same.P 1(a)=P 2(0) (2.59) In the case of C 1 continuity, they must have the slope continuity⎭⎬⎫==T a P T a P 2211)(')('αα (2.60) Where 1α and 2α are constants and T is the common unit tangent vector at the point. For Bezier curve and an open B-spline curve, the last segment of the former control polygon must be collinear with the first segment of the latter polygon.The third continuity is C 2 continuity ,it means the curvature is to be continuous at the joint, in addition to position and slope.Figure 2.24 shows the tangent unit vector T, the normal unit vector N and the centre of curvature O, and the radius of curvature ρ at point P. The curvature is defined as 1/ρ, and the binormal vector B is defined as N T B ⨯= (2.61) The relationship between curve derivatives and B is3''''1P P P B ⨯=ρ (2.62) P ’’ is the second derivative with respect to t. the condition for curvature continuity at the point is32223111)(')('')(')(')('')('a P a P a P a P a P a P ⨯=⨯ (2.63) Substituting Eq. (2.60) into Eq. (2.63))0('')/()(''22211P T a P T ⨯=⨯αα (2.64) This equation can be satisfied if)('')/()0(''12212a P P αα= (2.65)2.5.4 SegmentationSegmentation or curve splitting is defined as replacing one existing curve by one or more curve segments of the same type. It is widely used in the CAD/CAM. For example, during FEM modeling, curves are often divided for the purpose of mesh generation.Curve segmentation is a reparametrization or parameter transformation of the curve. It is easy to split lines,circles and conics. To split a line connecting two P0 and P1 at a point P2, it is needed to define two new lines connecting points P0, P2, and P0, P1. For circles and conics, the angel corresponding to the splitting point together with the starting and ending angels of the original curve define two segments.Polynomial curves such as cubic splines, Bezier curves and B-spline curves require a different parameter transformation. Assume that a polynomial is defined over the range t=[t0, tm]. The curve is divided into two segments at point t=t1, as shown in Fig. 2.25.The parameter transformation takes the form ofs t t t t )(010-+= in the first segment (2.66) s t t t t m )(11-+= in the second segment (2.67) Put Eqs. (2.66) and (2.67) into the equation of the given curve, we can get the equation of each segment in terms of s. Following equation can be used for polynomial curve equation.r n r nr n s t t r n t -=∆⎥⎦⎤⎢⎣⎡=∑)(000 (2.68) Where 010t t t -=∆.2.5.5 TrimmingTrimming is used to truncate or extend a curve, so it is widely used in CAD/CAM systems. Trimming is mathematically identical to the segmentation. The only difference between the two is that there is only one segment of the curve bounded by the trimming boundary left after trimming.2.5.6 IntersectionTwo parametric curves P(t) and Q(s) intersects at point P 1, to find the intersection point P 1, Eq. (2.69) have to be solved.P(t)-Q(s)=0 (2.69)This equation represents three scalar equations in polynomial nonlinear form, where two parameter unknowns. One way to find t and s is to solve the x and y components and then use the z components to verify the solution. The roots of Eq. (2.69) can be found by numerical analysis such as Newton-Raphson method. This method requires and initial guess which can be determined interactively.2.5.7 TransformationWith transformation techniques, the designer can project, translate, rotate, mirror and scale various entities. Transformation is also useful in studying the motion of mechanisms, robots and other objects in space. Homogenous transformations will be discussed in Chapter 5.Geometry properties of curves, surfaces and solids are invariant under rigid-body transformations. For example, originally parallel or perpendicular straight lines remain so after transformations.。