收藏 分销(赏)

三维图形学实验报告.pdf

上传人:曲**** 文档编号:254727 上传时间:2023-05-19 格式:PDF 页数:35 大小:1.63MB
下载 相关 举报
三维图形学实验报告.pdf_第1页
第1页 / 共35页
三维图形学实验报告.pdf_第2页
第2页 / 共35页
点击查看更多>>
资源描述
实验1.(1)三角形:ftinclude /glut,h includes gl.h and glu.h void init(void)glClearColor(0.0,0.0,0.0,0.0);void reshape(int w,int h)glV iewport(0,0,(GLsizei)w,(GLsizei)h);glMatrixMode(GL_PROJECTI ON);/指定哪一个矩阵是当前矩阵 glLoadI dentity();重置当前指定的矩阵为单位矩阵。glu0rtho2D(-l.0,1.0,-1.0,1.0);/The para are:(left,right,bottom,top)定义二 维正交投影矩阵glMatrixMode(GL_MODELV I EW);指定哪一个矩阵是当前矩阵)void display(void)(g1C1ear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer glColor3f(0.0,1.0,0.0);/Set current color to green glB egin(GLPOLY GON);/Draw the triangle glV ertex2f(-0.7,-0.7);glV ertex2f(0.7,-0.7);glV ertex2f(0,0.7);glEndO;glFlush();/Force to display the new drawings immediately int main(int argc,char*argv)glutlnit(&argc,argv);/I nitialize GLUT function callings glutlnitWindowSize(400,400);glutI nitWindowPosition(200,100);/in numbers of pixels glutCreateWindow(,zGreen Triangle);glutDisplayFunc(display);/is created or re-drew init();/I nvoke this function for initialization glutMainLoopO;/Enter the event processing loop return 0;/I ndicate normal termination/(Required by ANSI C)/操作,定义事件回调函数(2)点:void display()glClear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer glColor3f(0.0,1.0,0.0);/Set current color to green glPointSize(10.);glB egin(GL_POI NTS);glV ertex2i(0.5,0.5);glEndO;glFlush();/Force to display the new drawings immediately(3)线段:void display()glClear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer glColor3f(0.0,1.0,0.0);/Set current color to green glLineWidth(3.0);glB egin(GL_LI NES);glV ertex3f(0.,0.,0.);glV ertex3f(0.,1.,0.);glEndO;glFlush();/Force to display the new drawings immediately(4)四边形:void display()glClear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer glColor3f(1.0,0.0,0.0);/Set current color to green glRectf(0.6,0.3,0.2,0.8);int vertexl =0.6,0.3;int vertex2=0.2,0.8;glRectiv(vertexl,vertex2);glFlushO;/Force to display the new drawings immediately2.立方体:3.void reshape(int w,int h)4.(5.glV iewport(0,0,w,h);6.glMatrixMode(GL_PR0JECTI 0N);7.glLoadldentity();8.gl0rtho(-3.0,3.0,-3.0,3.0,-3.0,3.0);9.)10.void display()11.glClear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer12.glMatrixMode(GL_MODELV I EW);13.glLoadldentity();14.gluLookAt(l.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0);15.glutWireCube(0.5);16.glutSwapB uffers();17.glColor3f(0.0,1.0,0.0);18.glB egin(GL_LI NE_LOOP);/Green19.glV ertex3f(0.,0.,0.);glV ertex3f(0.,2,0.);20.glV ertex3f(2,2,0.);glV ertex3f(2,0.,0.);21.glEndO;22.glColor3f(l.0,1.0,0.0);23.glB egin(GL_LI NE_LOOP);/Y ellow24.glV ertex3f(0.,0.,2);glV ertex3f(2,0.,2);25.glV ertex3f(2,2,2);glV ertex3f(0.,2,2);26.glEnd();27.glColor3f(0.0,1.0,1.0);28.glB egin(GL_LI NES);/Cyan29.glV ertex3f(0.,0.,0.);glV ertex3f(0.,0.,2);30.glV ertex3f(0.,2,0.);glV ertex3f(0.,2,2);31.glV ertex3f(2,0.,0.);glV ertex3f(2,0.,2);32.glV ertex3f(2,2,0.);glV ertex3f(2,2,2);33.glEnd();34.glFlush();/Force to display the new drawings immediately3.(1)三角形条带void display()glClear(GL_COLOR_B UFFER_B I T);/Clear the frame bufferGLfloat v0=0.,0.3,vlLJ=0.2,0.6,v2口=0.4,0.3,v3=0.5,0.6),v4口=0.6,0.3),v5口=0.8,0.6),glColor3f(1.0);glB egin(GL_TRI ANGLE_STRI P);三角形条带函数glV ertex2fv(vO);glV ertex2fv(vl);glV ertex2fv(v2);glV ertex2fv(v3);glV ertex2fv(v4);glV ertex2fv(v5);glEndO;glFlush();/Force to display the new drawings immediately3.(2)三角形扇形GLfloat v0=0.,0.3,vl=0.3,0.7,v2=0.5,0.65,v3=0.5,0.5,v4口=0.45,0.4),v5=0.3,0.35,glColor3f(l.0);glB egin(GL_TRI ANGLE_FAN);共享一个顶点glV ertex2fv(vO);glV ertex2fv(vl);glV ertex2fv(v2);glV ertex2fv(v3);glV ertex2fv(v4);glV ertex2fv(v5);glEndO;glFlush();/Force to display the new drawings immediately实验二L点glColor3f(0.0,1.0,0.0);glPointSize(3.);glB egin(GL_POI NTS);glV ertex3f(0.1,0.5,0);glColor3f(l.0,1.0,0.0);glPointSize(5.);glB egin(GL_POI NTS);glV ertex3f(0.5,0.5,0);glColor3f(l.0,0.0,0.0);glPointSize(10.);glB egin(GL_POI NTS);glV ertex3f(0.3,0,4,0);glColor3f(0.0,0.0,1.0);glPointSize(1.);glB egin(GL_POI NTS);glV ertex3f(0.2,0.6,0);glColor3f(l.0,1.0,1.0);glPointSize(4.);glB egin(GL_POI NTS);glV ertex3f(0.3,0.5,0);glEndO;glFlushO;/Force to display the new drawings immediately2.直线glColor3f(0.0,1.0,0.0);glLineWidth(l.0);glB egin(GL_LI NES);glV ertex3f(0.3,0.1,0.0);glV ertex3f(0.3,0.5,0.0);垂直距离glColor3f(l.0,1.0,0.0);glLineWidth(3.);宽度glB egin(GL_LI NES);glV ertex3f(0.2,0.1,0.0);glV ertex3f(0.2,0.5,0.0);glColor3f(l.0,0.0,0.0);glLineWidth(5.);glB egin(GL_LI NES);glV ertex3f(0.5,0.1,0.0);glV ertex3f(0.5,0.5,0.0);glEndO;glFlushO;/Force to display the new drawings immediately3.直线,虚线,点划线glColor3f(l.0,0.0,0.0);glLineWidth(2.0);glB egin(GL_LI NES);glV ertex2f(0.0,0.3);glV ertex2f(0.8,0.3);glEndO;glColor3f(l.0,0.0,0.0);glEnable(GL_LI NE_STI PPLE);glLineStipple(1,0 x0101);glLineWidth(2.0);glB egin(GL_LI NES);glV ertex2f(0.0,0.5);glV ertex2f(0.8,0.5);glEndO;glColor3f(l.0,0.0,0.0);glEnab1e(GL_LI NE_STIPPLE);glLineStipple(l,Oxffcc);glLineWidth(2.0);glB egin(GL_LI NES);glV ertex2f(0.0,0.8);glV ertex2f(0.8,0.8);glEndO;4.顶点不同颜色的三角形平滑填充glShadeModel(GL_SM00TH);glB egin(GL_TRI ANGLES);glColor3f(0.0,0.0,1.0);glPointSize 0);glV ertex2f(0.3,0.3);glColor3f(l.0,0.0,0.0);glPointSize 0);glV ertex2f(0.4,0.6);glColor3f(l.0,1.0,0.0);glPointSize 0);glV ertex2f(0.5,0.4);glEndO;5.调用 glPolygonMode(face,di splay Mode);glPolygonMode(GL_FR0NT_AND_B ACK,GLLI NE);6.两个正方形混合(1)glEnable(GL_B LEND);glB lendFunc(GL_SRC_ALPH A,GL_ONE_MI NUS_SRC_ALPH A);混合glColor4f(0.0,1.0,0.0,0.5);/Set current color to greenglRectf(0.6,0.3,int vertexl=int vertex2=glRectiv(vertexl,0.2,0.8);0.6,0.3;0.2,0.8;vertex2);glColor4f(0.0,0.0,1.0,0.5);/Set current color to green glRectf(0.5,0.2,0.1,0.5);int vertex3=0.5,0.2);int vertex4=0.1,0.5);glRectiv(vertex3,vertex4);(2)3 line|o回 汉glEnable(GL_B LEND);glB lendFunc(GL_SRC_ALPH A,GL_ZERO);glEnable(GLB LEND);glB lendFunc(GL_ONE,GL_ZERO);说明:用函数glB lendFunc(sFactor,dFactor);选择调和因子的值产生不同的混合效果,有GL_0NE,GL_ZERO,GL_SRC_ALPH AGL_DST_ALPH A,GL_ONE_MI NUS_SRC_ALPH A等实验三1.平移glMatrixMode(GL_MODELV I EW);glColor3f(l.0,1.0,0.0);glRectf(0.6,0.3,0.2,0.8);glColor3f(l.0,0.0,0.0);glTranslatef(-0.5,-0.3,0.0);glRectf(0.6,0.3,0.2,0.8);旋转:glColor3f(l.0,1.0,0.0);glRectf(0.6,0.3,0.2,0.8)glLoadldentity();glRotatef(90.0,0.0,0.0,1.0);glRectf(0.6,0.3,0.2,0.8);缩放:glColor3f(0.0,1.0,1.0);glLoadldentity();glScalef(-0.5,1.0,1.0);glRectf(0.6,0.3,0.2,0.8);3.桌子绘制void table()glColor3f(0.0,1.0,1.0);glRectf(-0.5,0.3,0.5,-0.3);glColor3f(l.0,1.0,glRectf(-0.4,0.25,glColor3f(l.0,1.0,glRectf(-0.4,0.25,0.0);0.4,0.15);0.0);-0.3,-0.15);glColor3f(l.0,1.0,0.0);glRectf(0.3,0.25,0.4,-0.15);glColor3f(l.0,1.0,0.0);glRectf(-0.4,-0.15,0.4,-0.25);glColor3f(l.0,0.2,0.0);glRotatef(-45.0,0.0,0.0,1.0);glTranslatef(0.15,0.35,0.0);glRectf(-0.3,-0.15,0.3,-0.25);glLoadldentity();glColor3f(l.0,0.2,0.0);glRotatef(-90,0.0,0.0,1.0);glTranslatef(-0.35,-0.15,0.0);glRectf(-0.3,-0.15,0.3,-0.25);glLoadldentity();glColor3f(l.0,0.2,0.0);glRotatef(-90,0.0,0.0,1.0);glTranslatef(-0.65,0.15,0.0);glRectf(-0.3,-0.15,0.3,-0.25);glLoadldentity();glColor3f(l.0,0.2,0.0);glRotatef(-90,0.0,0.0,1.0);glTranslatef(-0.2,0.6,0.0);glRectf(-0.3,-0.15,0.3,-0.25);void display()glClear(GL_COLOR_B UFFER_B I T|GL_DEPTH _B UFFER_B I T);/Clear the frame buffer glMatrixMode(GL_MODELV I EW);glPushMatrix();glRotatef(-45.0,0.0,0.0,1.0);table();glPopMatrix();glFlushO;4.编程绘制罗马字母IV和X。IV:void word()glColor3f(1.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(-0.25,0.3);glV ertex2f(-0.2,0.3);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(-0.25,0.0);glV ertex2f(-0.15,0.0);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(-0.2,0.0);glV ertex2f(-0.2,0.3);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(-0.2,0.3);glV ertex2f(-0.1,0.3);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(0.1,0.3);glV ertex2f(0.2,0.3);glEndO;void lines()glMatrixMode(GL_MODELV I EW);glLoadldentity();glColor3f(l.0,1.0,1.0);glRotatef(30,0.0,0.0,1.0);glTranslatef(0.03,0.04,0.0);glRectf(-0.01,0.3,0,0);glLoadldentity();glColor3f(1.0,1.0,1.0);glRotatef(-30,0.0,0.0,1.0);glTranslatef(-0.03,0.04,0.0);glRectf(0.01,0.3,0,0);X:void lines()glMatrixMode(GL_MODELV I EW);glLoadldentity();glColor3f(l.0,1.0,1.0);glRotatef(28,0.0,0.0,1.0);glTranslatef(0.03,0.0,0.0);glRectf(-0.01,0.35,0,-0.35);glLoadldentity();glColor3f(1.0,1.0,1.0);glRotatef(-28,0.0,0.0,1.0);glTranslatef(-0.03,0.0,0.0);glRectf(0.01,0.35,0,-0.35);void word()glMatrixMode(GL_MODELV I EW);glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);glV ertex2f(-0.2,0.32);glV ertex2f(-0.1,0.32);glB egin(GL_LI NES);glV ertex2f(0.1,0.32);glV ertex2f(0.2,0.32);glEndO;void display()(glClear(GL_COLOR_B UFFER_B I T|GL_DEPTH _B UFFER_B I T);/Clear the frame buffer glPushMatrix();glScalef(l.0,-1.0,1.0);word();glScalef(1.0,-1.0,1.0);word();lines();glPopMatrix();glFlushO;I.o.回.汉13 line实验四1.绘制房子void reshape(int w,int h)(glV iewport(0,0,w,h);glMatrixMode(GL_PROJECTI ON);glLoadldentity();gl0rtho(-3.0,3.0,-3.0,3.0,-3.0,3.0);void display()glClear(GL_COLOR_B UFFER_B I T);/Clear the frame buffer glMatrixMode(GLJ10DELV I EW);glLoadldentity0;gluLookAt(1.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0);glutSwapB uffers();glShadeModel(GL_FLAT);glColor3f(l.0,1.0,1.0);glB egin(GL_LI NE_LOOP);glV ertex3f(0.4,-0.4,0.4);glV ertex3f(0.4,0.2,-0.4);glV ertex3f(0,0.4,-0.4);glV ertex3f(-0.4,0.2,-0.4);glV ertex3f(-0.4,-0.4,-0.4);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NE_LOOP);glV ertex3f(0.5,-0.4,0.6);glV ertex3f(0.4,0.2,0.4);glV ertex3f(0,0.4,0.4);glV ertex3f(-0.4,0.2,0.4);glV ertex3f(-0.3,-0.4,0.5);glEndO;glColor3f(l.0,1.0,1.0);glB egin(GL_LI NES);/CyanglV ertex3f(0.4,-0.4,-0.4);glV ertex3f(0.5,-0.4,0.6);glV ertex3f(0.4,0.2,-0.4);glV ertex3f(0.4,0.2,0.4);glV ertex3f(0,0.4,-0.4);glV ertex3f(0,0.4,0.4);glV ertex3f(-0.4,0.2,-0.4);glV ertex3f(-0.4,0.2,0.4);glV ertex3f(-0.4,-0.4,-0.4);glV ertex3f(-0.3,-0.4,0.5);glEndO;glFlushO;2.void init()glClear(GL_COLOR_B UFFER_B I T);glMatrixMode(GL_MODELV I EW);gluLookAt(l.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0);glMatrixMode(GL_MODELV I EW);glFrustum(-0.4,0.5,-0.2,0.2,-0.2,0.6);实验五1.1.1 删除代码 glEnable(GL LI GH TO);/the earth/*glPushMatrix();glTranslatef(RAD*cos(theta),RAD*sin(theta),0.);glRotatef(23.5,0,1.,0.);g1Materia1fv(GL_FRONT_AND_B ACK,GL_AMB I ENT,pink);glMaterialfv(GL_FRONT_AND_B ACK,GL_DI FFUSE,pink);glMaterialfv(GL_FRONT_AND_B ACK,GL_SPECULAR,lightO_color);g1Materia1fv(GL_FRONT_AND_B ACK,GL_SH I NI NESS,mat_shininess);glLineWidth(2.);glB egin(GL_LI NES);glV ertex3f(0.,0.,.5);glV ertex3f(0.,0.,5);glEndO;glScalef(.33,.33,.33);g1Materia1fv(GL_FRONT_AND_B ACK,GL_AMB I ENT,cyan);glMaterialfv(GL_FRONT_AND_B ACK,GL_DI FFUSE,cyan);g1Materia1fv(GL_FRONT_AND_B ACK,GL_SPECULAR,lightO_color);g1Materia1fv(GL_FRONT_AND_B ACK,GL_SH I NI NESS,mat_shininess);gluSphere(Q 2,1.,50,50);glPopMatrixO;*/the earth,s equatorial plane/*glPushMatrix();glTranslatef(RAD*cos(theta),RAD*sin(theta),0.);glRotatef(23.5,0,1.,0.);glMaterialfv(GL_FRONT_AND_B ACK,GL_AMB I ENT,clear);g1Materia1fv(GL_FRONT_AND_B ACK,GL_DI FFUSE,clear);g1Materia1fv(GL_FRONT_AND_B ACK,GL_SPECULAR,lightO_color);glMaterialfv(GL_FRONT_AND_B ACK,GL_SH I NI NESS,mat_shininess);glB egin(GLQ UADS);glV ertex3f(-5.*D,-D,0.);glV ertex3f(5.*D,-D,0.);glV ertex3f(5.*D,D,0.);glV ertex3f(-5.*D,D,0.);glEndO;glPopMatrixO;*/1.2关闭光照glDisable(GL_LI GH TI NG);1.3去除太阳的光照处理(LI GH T1)和着色处理,观察效果1.4基于Li,使用以下代码,观察全局环境光的效果:glLightfv(GL_LI GH T1,GL_POSI TI ON,lightl_position);glLightfv(GL_LI GH T1,GL_AMB I ENT,ambient_color);glLightModelfv(GL_L I GH T_M0DEL_ AMB I ENT,black);glEnable(GL_LI GH Tl);1.5基于1.1,使用以下代码观察效果:glMaterialfv(GL_FRONT_AND_B ACK,GL_AMB I ENT,white);glMaterialfv(GL_FRONT_AND_B ACK,GL_AMB I ENT,black);1.6基于1.1,局部环境光设置为红色,环境光材质设为蓝色,观察效果;GLfloat ambient_co1or 二 i.o,0.0,0.0,1.0;局部环境光glMaterialfv(GL_FRONT_AND_B ACK,GL_AMB I ENT,blue);环境光材质回 区IThe earths progression around the sun1.7 基于1.1,只打开漫反射的效果,改变光源1的位置,观察漫反射角度对光照效果的影响;GLfloat lightl_position=1.0,5.0,10.0,0.0;glLightfv(GL_LI GH T1,GL_P0SI TI 0N,lightl_position);glLightfv(GL_LI GH T1,GL_SPECULAR,lightl_color);glShadeModel(GL_FLAT);glLightfv(GL_LI GH T1,GL_P0SI TI 0N,lightl_position);glLightfv(GL_LI GH T1,GL_DI FFUSE,lightl_color);1.8 基于1.1,只打开镜面反射的效果,分别进行以下设置,观察镜面反射角度对光照效果 的影响(将光泽度值设置小一些)只改变光源1的位置GLfloat mat_shininess=15.0;glLightfv(GL_LI GH T1,GL_POSI TI ON,lightl_position);glLightfv(GL_LI GH T1,GL_SPECULAR,lightl_color);glEnable(GL_LI GH Tl);g1Mat er i alfv(GL_FRONT_AND_B ACK,GL_SPECULAR,lightO_color);glMaterialfv(GL_FRONT_AND_B ACK,GL_SH I NI NESS,mat_shininess);只改变视点的位置gluLookAt(0.0,50.0,3.0,2.0,3.0,-1.0,0.0,0.0,1.0);i 1 The earths progression around the sun 同时改变光源1和视点的位置i 1 The earths progression around the sun1.9 基于1.1,为光源1定义聚光灯,并调整3个参数,观察光照效果(参数为GL_SPOT_DI RECTI ON,GL_SP0T_CUT0FF,GL_SPOT_EXPONENT,;1.10 基于1.1,建立光线衰减模型,分别调整常量、一次和二次衰减参数(参数为GL_C0NSTANT_ATTENUATI 0N,GL_LI NEAR_ATTENUATI ON、GL_Q UADRATI C_ATTENUATI ON),观察光照效果;GLfloat spot_direction=0.0,0.0,-1.0;glLightfv(GL_LI GH T1,GL_SPOT_DI RECTI ON,spot_direction);glLightf(GL_LI GH Tl,GL_SPOT_CUTOFF,50.0);glLightf(GL_LI GH Tl,GL_SPOT_EXPONENT,2.5);1.11 基于1.1,分别使用GL_FLAT和GJSMOOTH,观察这两种不同着色处理,并分析;GL FLAT:J The earths progression around the sunGL_SM00TH:1 The earths progression around the sun前者是使用线性插值方式填充,后者是默认为填充的颜色。实验六1.参照texturel.c的例子,在Photoshop生成一幅2D纹理图,并映射在立方体表面;2.ttinclude 3.ttinclude 4.#include 5.6.void myinit(void);7.void makeimage(void);8.9.10./*读取纹理*/11.12.ttdefine TEX_WI DTH 25613.ttdofine TEX_H EI GH T 25614.GLubyte teximageTEX_WI DTH TEX_H EI GH T3;15.16.void readTexture(void)17.(18.FI LE*fd;19.GLubyte ch;20.int i,j,k;21.22.fd=fopen(H ongKong.256.256.raw,rb);23.for(i=0;iTEX_WI DTH;i+)/for each row24.25.for(j=0;jTEX_H EI GH T;j+)/for each column26.(27.for(k=0;k3;k+)/read RGB components of the pixel28.(29.freacK&ch,1,1,fd);30.texlmageijk=(GLubyte)ch;31.32.)33.34.fclose(fd);35.36.37.void myinit(void)38.(39.glClearColor(0.0,0.0,0.0,0.0);40.glEnable(GL_DEPTH _TEST);41.glDepthFunc(GL_LESS);42.43.readTexture();44.glPixelStorei(GL_UNPACK_ALI GNMENT,1);45.46./*定义纹理*/47.glTexI mage2D(GL_TEXTURE_2D,0,3,TEX_WI DTH,48.TEX_H EI GH T,0,GL_RGB,GL_UNSI GNED_B Y TE,&texI mage000);49.50./*控制滤波*/51.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);52.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);53.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FI LTER,GL_NEAREST);54.glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MI N_FI LTER,GL_NEAREST);55.56./*说明映射方式*/57.glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV _MODE,GL_DECAL);58.59./*启动纹理映射*/60.glEnable(GL_TEXTURE_2D);61.62.glShadeModel(GL_FLAT);63.64.65.void display(void)66.(67.glClear(GL_COLOR_B UFFER_B I T|GL_DEPTH _B UFFER_B I T);68.69./*设置纹理坐标和物体几何坐标*/70.glB egin(GL_Q UADS);71.glTexCoord2f(1.0,1.0);glV ertex3f(-2.0,-1.0,0.0);72.glTexCoord2f(l.0,0.0);glV ertex3f(-2.0,1.0,0.0);73.glTexCoord2f(0.0,0.0);glV ertex3f(0.0,1.0,0.0);74.glTexCoord2f(0.0,1.0);glV ertex3f(0.0,-1.0,0.0);75.76.glTexCoord2f(0.0,0.0);glV ertex3f(1.0,-1.0,0.0);77.glTexCoord2f(0.0,1.0);glV ertex3f(1.0,1.0,0.0);78.glTexCoord2f(l.0,1.0);glV ertex3f(2.41421,1.0,-1.41421);79.glTexCoord2f(l.0,0.0);glV ertex3f(2.41421,-1.0,-1.41421)80.glEndO;81.82.glutSwapB uffers();83.84.85.void reshape(GLsizei w,GLsizei h)86.(87.glV iewport(0,0,w,h);88.glMatrixMode(GL_PROJECTI ON);89.glLoadldentity();90.gluPerspective
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 学术论文 > 社科论文

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服