Introduction to Computer GraphicsFarhana Bandukwala, PhDLecture 11b: Bezier Surface EvaluationExample: Given 16 control points=100 90 45 37 94 85 61 45 98 71 59 26 93 71 52 34 G x=29 35 30 32 20 55 80 30 15 55 79 53 27 43 51 33 G y=104 104 108 100 88 67 65 82 43 33 38 53 31 34 36 21 zGMatrix representation of x-coordinate ofBezier surface[ ]11233,32,31,30,33,22,21,20,23,12,11,10,13,02,01,00,023jjjiiivvvCCCCCCCCCCCCCCCCuuuQx(ui,vj) =Qx(ui,vj) =33323130232221201312111003020100gggggggggggggggg[]**123Muuuiii1**23jjjTvvvMIn this example: x,y & z-coordinate of BeziersurfaceQx(ui,vj) =100 90 45 37 94 85 61 45 98 71 59 26 93 71 52 34 []**123Muuuiii1**23jjjTvvvMQy(ui,vj) =29 35 30 32 20 55 80 30 15 55 79 53 27 43 51 33 []**123Muuuiii1**23jjjTvvvMQz(ui,vj) =104 104 108 100 88 67 65 82 43 33 38 53 31 34 36 21 []**123Muuuiii1**23jjjTvvvM=0 0 0 1 0 0 3 3- 0 3 6- 3 1 3- 3 1- MWhere:Evaluation Method 1: Evaluate equation for discrete values of u & vStep 1: Hold v constant, evaluate u at intervals of .1Vj=0Vj=.25 & Vj=0. 0Evaluation Method 1: Evaluate equation for discrete values of u & vStep 2: Evaluate separate curves for v intervals of .1, in each curve evaluate u at intervals of .1Step 3: Connect the dots along u & v to form polygons (or quads)Evaluation Method 1: Evaluate equation for discrete values of u & vDraw polygons using :glBegin(GL_QUAD_STRIP)for all vertices in vi=[vmin-vmax-1]for all vertices in uj=[umin-umax]glVertex3f(xval(vi,uj),yval(vi,uj),zval(vi,uj))glVertex3f(xval(vj+1,uj),yval(vi +1,uj),zval(vi +1,uj))glEnd()Step 4: Specify shading and color for polygonsEvaluation Method 2: Subdivide along u & v directionP0P1P2P3L0= =R3.5(P1+P2)L1R2L2R1L3=R08 0 0 04 4 0 02 4 2 01 3 3 11/81 3 3 10 2 4 20 0 4 40 0 0 81/8=xxxxLLLL3210xxxxPPPP3210=xxxxRRRR3210xxxxPPPP3210Step 1: Subdivide along u directionEvaluation Method 2: Subdivide along u & v directionStep 1: Subdivide along u directionStep 2: Subdivide along v direction for each of the 7 sets of 4 pointsEvaluation Method 2: Subdivide along u & v directionStep 3: Repeat for each sub-surface (defined by each set of 16 points)Evaluation Method 2: Subdivide along u & v directionStep 4: When desired resolution reached, connect the dots to form polygonsEvaluation Method 2: Subdivide along u & v
View Full Document