2010.02.20XUEBAO33[]1671-802X(2010)01-0033-02基于OpenGL的双三次Bezier曲面的绘制程飞*[]2009-11-15[](1970-),,(安徽电子信息职业技术学院,安徽蚌埠233000)[]Bezier,OpenGL,Bezier[]OpenGL[]TN2[]B1.OpenGLOpenGLSGI(3DAPI),,,OpenGLVC++6.0,VC.NETWindows,JavaOpenGL,OpenGL,,,OpenGL,,VC++6.0,,OpenGL,Windows:opengl32.lib,glu32.lib,glaux.lib,glut32.lib,WindowsSystemOpenGLopengl32.dllglu32.dll,OpenGL()2.BezierBezier,,BezierBezier,,CADBezierBezier:pij(i=0,1,!!n;j=0,1,!!,m)(n+1)∀(m+1),m∀nBezieru,v#[0,1],,Bi,n(u)=Cinui(1-u)n-i,uuBernstein,S(u,v)=x(u,v)y(u,v)z(x,y),pij(i=0,1,!!,n;j=0,1,!!,m),n=4,m=4,BezierBezier,,Bi,3(u)=ci3ui(1-u)3-i,Bi,3(v)=ci3vi(1-v)3-iBeziers(u,v)=B0,n(u),B1,n(u),!!,Bnn(u)p00p01!p0mp10p11!p1m!!!pn0pn1!pnmB0,m(u)B1,m(u)!Bm,m(u)(1),Bi,n(u)=cinui(1-u)n-,iBi,mv=cimvi(1-v)m-iBernstein3.OpenGLBezierBezier:GL_FULL,GL_POINT,GL_LINE,,,.,,.OpenGL:(1)pij(i=0,1,!!,n;j=,1,!!,m),u,v(2),(1)(3)ui=in,vj=jn,,ij=0,1,2,3,!!n.(ui,vj),(ui,vj)Qij(i=0,1,!!,n;j=0,1,!!,n),Qiju,v,.Bezier.4.OpenGLBezier201019(46)JOURNALOFANHUIVOCATIONALCOLLECEOFELECTRONICS&INFORMATIONTECHNOLOGYNo.12010GeneralNo.46Vo.l934XUEBAO2010.02.20Bezier,(1):(p00,p01,p02,p03,p10,p11,p12,p13,p20,p21,p22,p23,p30,p31,p32,p33)=-10-5510-10-55101010101055551515151515-15-1515-10-5510-10-5510-5-5-5-5-10-10-10-1015-15-151515151515,v,u,OpenGL,ctrlpoint[u][v][3],:GLfloatctrlpoints[UPOINTS][VPOINTS][3]={{{-10,10,15},{-5,10,15},{5,10,15},{10,10,15}},{{-10,5,15},{-5,5,-15},{5,5,-15},{10,5,15}},{{-10,-5,15},{-5,-5,-15},{5,-5,-15},{10,-5,15}},{{-10,-10,15},{-5,-10,15},{5,-10,15},{10,-10,15}}};(2)glmap2,,gMlap2f,u,v,:ustride,vstride,:(i)(1),,(ii)uv,ustridevstride,ctrlpoints[UPOINTS][VPOINTS][3],3vx,ustride=3X4=12,vstride=3,:gMlap2f(GL_MAP2_VERTEX_3,//UV,3D0.0,f1.0,f//U[0,1]VPOINTS*3,//ustride4,//U0.0,f1.0,f//V[0,1]3,//vstride4,//V&ctrlpoints[0][0][0]);(3)gMlapGrid2,uv,uvn,m,u(0,1),(0,1),(0,1)n=m=4:gMlapGrid2f(//Bezierpatch50.0,f//U500.0,f1.0,//[0,1]50.0,f//V500.0,f1.0f);//[0,1](4)glEvaMlesh2,,ctrlpoints[UPOINTS][VPOINTS][3],(1),Bezier,uv:glEvaMlesh2(GL_FILL,0,50,0,50);//BezierSurface5.Bezier,OpenGL,OpenGLGLU,,Bezier1,,图1OpenGL绘制的双三次Bezier曲面的网格图[][1][]DonaldHearn,M.PaulineBaker,,,:,2002.[2],.(OpenGL)[M/CD].:,2004.TheMethodofChoosingParameteronRenderingofSurfacebyOpenGLChenFeiAbstrac:tIntergratingdefinitionofBeziersurface,thepaperdiscussesthemethodofchoosingparameteronrenderingofsurfacebyOpenGL.Anexamplewhichbasedonthetechniqueisgiven.Keywords:OpenGL;parameter∃∃∃OpenGLBezier1