Curved SurfacesCurve Evaluationde Casteljau AlgorithmSlide 4Slide 5Slide 6Bezier CurveRecursive Linear InterpolationExpanding the LerpsBernstein PolynomialsCubic Equation FormCubic Matrix FormSlide 13Matrix FormDerivativesTangentsBezier SurfacesSlide 18Control MeshSurface EvaluationSlide 21Slide 22Slide 23Slide 24Slide 25Slide 26NormalsBezier Surface PropertiesTessellationUniform TessellationAdaptive TessellationMixed TessellationDisplacement MappingScan ConversionTransparencyScanline RenderingSlide 37Surface RenderersSlide 39Other Curve TypesCurved SurfacesCSE167: Computer GraphicsInstructor: Steve RotenbergUCSD, Fall 2006Curve Evaluationp0p1p2p3Find the point x on the curve as a function of parameter t:x(t)•de Casteljau Algorithmp0p1p2p3We start with our original set of pointsIn the case of a cubic Bezier curve, we start with four pointsde Casteljau Algorithmp0q0p1p2p3q2q1 322211100,,,,,,ppqppqppqtLerptLerptLerp baba tttLerp 1,,de Casteljau Algorithmq0q2q1r1r0 211100,,,,qqrqqrtLerptLerpde Casteljau Algorithmr1xr0• 10,, rrx tLerpBezier Curvex•p0p1p2p3Recursive Linear Interpolation 322211100,,,,,,ppqppqppqtLerptLerptLerp 211100,,,,qqrqqrtLerptLerp 10,, rrx tLerp3210pppp210qqq10rrx3210ppppExpanding the Lerps 3221211010322121121101003232221211101001111111,,111,,111,,1,,1,,1,,pppppppprrxppppqqrppppqqrppppqppppqppppqtttttttttttttttLe rptttttttLer ptttttttLerptttLer ptttLerptttLerpBernstein Polynomials !!!133363133363363133333233223312330333223123023inininttintBttBtttBttttBttttBtBttttttttttttiinniiipxppppxCubic Equation Form 010210321023010221033210333633313336333pdppcpppbppppadcbaxppppppppppxttttttCubic Matrix Form 0102103210233336333pdppcpppbppppadcbax ttt 32102300010033036313311ppppdcbadcbax tttCubic Matrix Form zyxzyxzyxzyxpppppppppppptttttt333222111000233210230001003303631331100010033036313311xppppxMatrix Form CtxGBtxxBezBezzyxzyxzyxzyxppppppppppppttt3332221110002300010033036313311DerivativesFinding the derivative (tangent) of a curve is easy:cbaxdcbax ttdtdttt 23223 dcbaxdcbax 01231223ttdtdtttTangentsThe derivative of a curve represents the tangent vector to the curve at some point tdtdx txBezier SurfacesBezier surfaces are a straightforward extension to Bezier curvesInstead of the curve being parameterized by a single variable t, we use two variables, s and tBy definition, we choose to have s and t range from 0 to 1 and we say that an s-tangent crossed with a t-tangent will represent the normal for the front of the surfacest0,01,11,00,1nCurved SurfacesThe Bezier surface is a type of parametric surfaceA parametric surface is a surface that can be parametrized by two variables, s and tParametric surfaces have a rectangular topologyIn computer graphics, parametric surfaces are sometimes called patches, curved surfaces, or just surfacesThere are also some non-parametric surfaces used in computer graphics, but we won’t consider those nowControl MeshConsider a bicubic Bezier surface (bicubic means that it is a cubic function in both the s and t parameters)A cubic curve has 4 control points, and a bicubic surface has a grid of 4x4 control points, p0 through p15p0p1p2p3p4p5p6p7p8p9p10p11p12p13p14p15stSurface EvaluationThe bicubic surface can be thought of as 4 curves along the s parameter (or alternately as 4 curves along the t parameter)To compute the location of the surface for some (s,t) pair, we can first solve each of the 4 s-curves for the specified value of sThose 4 points now make up a new curve which we evaluate at tAlternately, if we first solve the 4 t-curves and to create a new curve which we then evaluate at s, we will get the exact same answerThis gives a pretty straightforward way to implement smooth surfaces with little more than what is needed to implement curvesst(0.2, 0.6)Matrix FormWe saw the matrix form for a 3D Bezier curve is CtxGBtxxBezBezzyxzyxzyxzyxppppppppppppttt3332221110002300010033036313311Matrix FormTo simplify notation for surfaces, we will define a matrix equation for each of the x, y, and z components, instead of combining them into a single equation as for curvesFor example, to evaluate the x component of a Bezier curve, we can use: xxBezxxxxxxpppptttxctgBt32102300010033036313311Matrix FormTo evaluate the x component of 4 curves simultaneously, we can combine 4 curves into a 4x4 matrixTo evaluate a surface, we evaluate the 4 curves, and use them to make a new curve which is then evaluatedThis can be written in a compact matrix form: 11,2323tttssstsxTTBezxBeztstBGBsMatrix Form
View Full Document