[ Pobierz całość w formacie PDF ]
.Given n + 1 real values (not points) Pi, we start withthe polynomial c(t) = PiBni(t) and employ the identityn(i/n)Bni(t) =t (6.30)i=0to create the curvenP(t) = t, c(t) = (i/n, Pi)Bni(t).i=0(This identity is satisfied by the Bernstein polynomials and can be proved by induction.)It is clear that this version of the curve is defined by the control points (i/n, Pi) whichare equally-spaced on the x axis.This version of the Bézier curve exists only for two-dimensional curves.In thegeneral case, where t varies in the interval [a, b], the control points are (a + i(b -a))/n, Pi.6.15 Rational Bézier CurvesThe rational Bézier curve is an extension of the original Bézier curve [Equation (6.5)] tonn nwiPiBn,i(t) wiBn,i(t)i=0n nP(t) = = Pi = PiRn,i(t), 0 d" t d" 1.wjBn,j(t) wjBn,j(t)j=0 j=0i=0 i=0The new weight functions Rn,i(t) are ratios of polynomials (which is the reason for theterm rational) and they also depend on weights wi that act as additional parametersthat control the shape of the curve.Note that negative weights might lead to a zero de-nominator, which is why nonnegative weights are normally used.A rational curve seemsunnecessarily complicated (and for many applications, it is), but it has the followingadvantages:1.It is invariant under projections.Section 6.4 mentions that the Bézier curve isinvariant under affine transformations.If we want to rotate, reflect, scale, or shear sucha curve, we can apply the affine transformation to the control points, then use the newpoints to compute the transformed curve.The Bézier curve, however, is not invariantunder projections.If we compute a three-dimensional Bézier curve and project everypoint of the curve by a perspective projection, we end up with a plane curve P(t).Ifwe then project the three-dimensional control points and compute a plane Bézier curveQ(t) from the projected, two-dimensional points, the two curves P(t) and Q(t) willgenerally be different.One advantage of the rational Bézier curve is its invariance underprojections.218 6.Bézier Approximation2.The rational Bézier curve provides for accurate control of curve shape, such asprecise representation of conic sections (Appendix A).Section 7.5 shows that the Bézier curve is a special case of the B-spline curve.Asa result, many current software systems use the rational B-spline (Section 7.14) whenrational curves are required.Such a system can produce the rational Bézier curve as aspecial case.Here is a quick example showing how the rational Bézier curve can be useful.Giventhe three points P0 =(1, 0), P1 =(1, 1), and P2 =(0, 1), The Bézier curve defined bythe points is quadratic and is therefore a parabola P(t) =(1-t)2P0+2t(1-t)P1+t2P2 =(1 - t2, 2t(1 - t)), but the rational Bézier curve with weights w0 = w1 = 1 and w2 =2results in the more complex expression(1 - t)2P0 +2t(1 - t)P1 +2t2P2 1 - t2 2tP(t) = = ,(1 - t)2 +2t(1 - t) +2t2 1+t2 1+t2which is a circle, as illustrated by Figure 1.6a.In general, a quadratic rational Bézier curve with weights w0 = w2 = 1 is a parabolawhen w1 = 1, an ellipse for w1 1.A quarter circle isobtained when w1 = cos(±/2) where ± is the angle formed by the three control points P0,P1, and P2 (the control points must also be placed as the three corners of an isoscelestriangle).Page 261 of [Beach 91] proves this construction for the special case ± =90æ%.Appendix A shows, among other features, that the canonical ellipse is representedas the rational expression1 - t2 2ta , b , -" {"cmr10",10},DisplayFunction->$DisplayFunction,ViewPoint->{2.783,-3.090,1.243}];Figure 6.27: A Rational Bézier Surface Patch.234 6.Bézier Approximation6.23 Triangular Bézier SurfacesThe first surface to be derived with Bézier methods was the triangular patch, not therectangular.It was developed in 1959 by de Casteljau at Citroën.The triangular Bézierpatch, and its properties, is the topic of this section, but it should be noted that theideas and techniques described here can be extended to Bézier surface patches with anynumber of edges.[DeRose and Loop 89] discusses one approach, termed S-patch, to thisproblem.The triangular Bézier patch is based on control points Pijk arranged in a roughlytriangular shape.Each control point is three-dimensional and is assigned three indexesijk such that 0 d" i, j, k d" n and i + j + k = n.The value of n is selected by the userdepending on how large and complex the patch should be and how many points aregiven.Generally, a large n allows for a finer control of surface details but involves morecomputations.The following convention is used here.The first index, i, corresponds tothe left side of the triangle, the second index, j, corresponds to the base, and the thirdindex, k, corresponds to the right side.The indexing convention for n =1, 2, 3, and 4are shown in Figure 6.28.There are n+1 points on each side of the triangle and because1of the way the points are arranged there is a total of (n + 1)(n + 2) control points:2P040P030 P031 P130P020 P021 P120 P022 P121 P220P010 P011 P110 P012 P111 P210 P013 P112 P211 P310P001 P100 P002 P101 P200 P003 P102 P201 P300 P004 P103 P202 P301 P400Figure 6.28: Control Points for Four Triangular Bézier Patches.The surface patch itself is defined by the trinomial theorem [Equation (6.3)] asn!nP(u, v, w) = Pijk uivjwk = PijkBijk(u, v, w), (6.37)i! j! k!i+j+k=n i+j+k=nwhere u + v + w = 1.Note that even though P(u, v, w) seems to depend on threeparameters, it only depends on two since their sum is constant.The quantitiesn!nBijk(u, v, w) = uivjwki! j! k!are the Bernstein polynomials in two variables (bivariate).They are listed here forn =1, 2, 3, and4v4v3 4v3w 4uv3v2 3v2w 3uv2 6v2w2 12uv2w 6u2v2v 2vw 2uv 3vw2 6uvw 3u2v 4vw3 12uvw2 12u2vw 4u3vwu w2 2uw u2 w3 3uw2 3u2w u3 w4 4uw3 6u2w2 4u3w u46.23 Triangular Bézier Surfaces 235The three boundary curves are obtained from Equation (6.37) by setting each ofthe three parameters in turn to zero.Setting, for example, u = 0 causes all terms ofEquation (6.37) except those with i = 0 to vanish.The result isn!P(0, v, w) = P0jk vjwk, where v + w =1.(6.38)j! k!j+k=nSince v + w = 1, Equation (6
[ Pobierz całość w formacie PDF ]