第十七讲 Curves and Surfaces (II)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

计算机图形学讲义-17CurvesandSurfaces(II)Basedon[EA],Chapter10.姜明北京大学数学科学学院更新时间2020年1月28日星期二11时23分14秒计算机图形学讲义-17Outline•HermiteCurvesandSurfaces•BezierCurvesandSurfaces•CubicB-Splines•GeneralB-Splines计算机图形学讲义-17HermiteCurvesandSurfaces•Giventhecontrolpointsp0andp3.•Requestinterpolatingconditionsatu=0andu=1forthegivencontrol-pointdata.•Twootherconditions:weassumethatthederivativesatu=0andu=1aregiven.计算机图形学讲义-17MHistheHermitegeometrymatrix.230122003012321230131230303()p(0),Interpolationconditionsp(1).'()23p''(0),Derivativeconditionsp''(1)23.p1000p1111q=c,q=,p'01p'puccucucupcpccccpuccucupcpcccAAHH.00012310000010c=Mq,M33212211Inmostinteractiveapplications,however,theuserenterspointdataratherthanderivativedata,unlessanalyticalformulationsareavailable.计算机图形学讲义-17BlendingFunctionsH01H23320321322323p()ucuMqb()q,()()b()Mu,()()blendingpolynomials()23,()23,()2,().TTTTuububuubububuuubuuubuuuubuuu,调配函数+1matlabprogram计算机图形学讲义-176Angel:InteractiveComputerGraphics5E©Addison-Wesley2009Example•Herethepandqhavethesametangentsattheendsofthesegmentbutdifferentderivatives.•GeneratedifferentHermitecurves.•Thistechniquesisusedindrawingapplications.计算机图形学讲义-17GeometricandParametricContinuity•Wecanenforcevariouscontinuityconditionsbymatchingthepolynomialsandtheirderivativesatu=1forp(u)andcorrespondingvaluesforq(u)atu=0.C0=G0C1G1计算机图形学讲义-17BezierCurvesandSurfaces•Given4controlpointsp0,p1,p2andp3.•Requestinterpolatingconditionsendpoints.•Usep1andp2toapproximatethetangentsatu=0andu=1.0010113331102133133122(0)pp''(0)3pp.0(1)pp''(1)3pp.1)p(()ppppppp计算机图形学讲义-17MBistheBeziergeometrymatrix.0030123101321230111013312301221201233p(0),Interpolationconditionsp(1).3p3p'(0),Derivativeconditions3p3p'(1)23.3pp,33p233+2p+.33p=c,pcpccccpcpcccccccccccccccA132133BB1000100.10111110003300c=Mp,M36301331AForasetofcontrolpoints,wecanhaveC0continuityatjointpointswithBeziersplines,butwehavegivenuptheC1continuity.计算机图形学讲义-17BlendingFunctionsB01B23302122233p()ucuMpb()p,()()b()Mu,()()blendingpolynomials()1,()31,()31,().TTTTuububuubububuubuuubuuubuu,调配函数matlabprogram计算机图形学讲义-17Bernsteinpolynomialsp(u)mustlieintheconvexhullofthefourcontrolpoints.0330!()(1).!()!0()1,for01,()1.p()()p.kdkkdkddidiiiidbuuukdkbuubuubu计算机图形学讲义-17BezierSurfacePatch3300200011011p(,).p(0,0)9pppp.ijijijuvbubuuvuvItisameasureofthetendencyofthepatchtodivertfrombeingflat,ortotwist,atthecorner.definedoveronly1/9ofregion.计算机图形学讲义-17CubicB-Splines•TheCubicB-SplineCurve•B-SplinesandBasis.matlabprogram•SplineSurfaces计算机图形学讲义-17TheCubicB-SplineCurve•Consider4controlpointsfromasequenceofcontrolpoints.•Insteadofinterpolatingatendpoints,onlygenerateacurvebetweenthemiddletwopointsasugoesfrom0to1.计算机图形学讲义-17AddingPoints•Onenewcontrolpointwillgenerateanewpatchofspline.3ip2ip1ipip1ip计算机图形学讲义-17•{pi-3,pi-2,pi-1,pi}generatesthecurveq(u)betweenpi-2andpi-1.•{pi-2,pi-1,pi,pi+1}generatesthecurvep(u)betweenpi-1andpi.•Wematchconditionsatq(1)andp(0).•p(0)=q(1),requirescontinuityatthejointpoint,withoutrequiringinterpolationofanydata.•Therearemanysetsofconditions;eachsetcandefineadifferentspline.•Wederivethemostpopularspline,byassumingthatthesplinetreatsymmetricallytopointsateachsideofthejointpoint.计算机图形学讲义-173ip2ip1ipip1ip1216(0)(1)p4ppiiipq122'(0)'(1)ppiipq1116(1)p4ppiiip1112'(1)ppiip计算机图形学讲义-17MSistheB-splinegeometrymatrix.10216112210123116112311212126361112212163611122S=p4pp,pp,p4pp,23pp.p01000p000100p,p,,.p01111p000123c=MiiiiiiiiiiiiiicccccccccTcRTRS141030301p,M363061331计算机图形学讲义-17BlendingFunctionsB01B233023123233p()ucuMpb()p,()()b()Mu,()()blendingpolynomials()1,()463,()1333,().TTTTuububuubububuubuuubuuuubuu,调配函数matlabprogram计算机图形学讲义-17Properties•p(u)mustlieintheconvexhullofthefourcontrolpoints.•ThecurvefromasetofcontrolpointshasC1continuity.•Infact,itisC2.•However,thecurveonlyapproximateswellthemiddletwopointsasugoesfrom0to1.30300()1,for01,()1.()()p.kiiiiibuubupubu计算机图形学讲义-17CubicB-splineSurfacePatch3300p(,).ijijijuvbubuuv计算机图形学讲义-17ControlPointandBasisFunction•Considerthecontrolpointpi.•Itscontributiontothewholecurveisweightedbybi(u),i=0,1,2,3,dependingonitsrelativepositioninthecurvesegment.•Ifweshifttheparameteruby1toeachleftinterval,thetotalcontributionofpicanbewrittenasBi(u)pi.01230,2,,21,,1,,1,,12,0,2.iuibuiuibuiuiBubuiuibuiuiui30()()p.iiipuBu计算机图形学讲义-17计算机图形学讲义-17GeneralB-Splines•RecursivelyDefinedB-splines•UniformSplines•NonuniformB-Splines•NURBS计算机图形学讲义-17RecursivelyDefinedB-splines•TheblendingfunctionsforB-splinesformabasisset.–The“B”inB-splineisfor“basis”•Cox-DeBoorrecursionotherwise01)(10,kkkuuuuBkB)()()(1,11,,111uBuBuB

1 / 30
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功