计算机图形学在线考试,计算机图形学考试试卷及答案.doc

计算机图形学考试试卷及答案.doc

学年 学期 第 页 共 页 题号 一 二 三 四 五 六 七 八 九 十 总分 总分人 得分 得分 阅卷人 Part I. Multiple Choice Questions 5 Points each. Note order of the choices is important sometimes 1. The order of the following terms according to its appearance in computer history is _adcb_ a wireframe display b programmable pipeline c texture mapping d shaded solid 2. OpenGL Utility ToolkitGlut provide OpenGL the function such as ab_ a Open a window b Get from mouse and keyboard c Widget such as Slidebars and Dialogues d Widget such as boxes and Menus e Event-driven 3. Give an order of the following phases according the rendering pipeline cebda_ a Fragment Processor b Clipper c Vertex Processor d Rasterizer e Primitive Assembler 4. The following operations belonging to which phase listed above c_ To convert object representations from one coordinate system to another c/d_ To combines the 3D viewer with the 3D objects to produce the 2D image _b To determine which objects are within the view volume a_ To determine the color of the corresponding pixel in the frame buffer 5. _a_ computes color or shade of each object independently, so it cant deal with situations such as cef a Local Lighting b Global Lighting c Some objects are blocked from light d Real time illumination e Light can reflect from object to object f Some objects might be translucent 6. Choose two OpenGL sentences from the follow four candidates to trans the camera from the original position to the destination position Destnation Postion glMatrixModeGL_MODELVIEW glLoadIdentity; _a_ c a glTranslatef0.0, 0.0, -d; d0 b glTranslatef0.0, 0.0, d; d0 c glRotatef-90.0, 0.0, 1.0, 0.0; d glRotatef90.0, 0.0, 1.0, 0.0; 学院专业级学号姓名大学 计算机图形学 课程试卷 第 1 页 共 4 页 密封线 学年 学期 第 页 共 页 得分 阅卷人 Part II Free Questions 50 Points total 1. How to normalize an arbitrary view volumeas blow to an openGL default view volume 8 points 答案一, 平移平移 旋转旋转 剪切剪切 放缩平移放缩平移 答案二 xy shear z values unchanged 1 0 c o t 00 1 c o t 0 , 0 0 1 00 0 0 1H Projection matrix 1 0 0 00 1 0 000000 0 0 1orthMP , orthMHGeneral case , orthP M STH 2002002000 0 0 1r i g h t l e f tr i g h t l e f t r i g h t l e f tt o p b o t t o mt o p b o t t o m t o p b o t t o mSTf a r n e a rn e a r f a r f a r n e a r 2. Given a clip rectangle and a polygon, you are expected to give the corresponding results after top clip, bottom clip, right clip, and left clip consequently. 4 points Answer 2points each step 学院专业级学号姓名大学 计算机图形学 课程试卷 第 2 页 共 4 页 密封线 学年 学期 第 页 共 页 3. Give a description about the Midpoint Line Algorithm 8 Points Void MidpointLineint x0,int y0,int x1, int y1, int value Int dx,dy, incrE, incrNE, d, x, y; dxx1 x0; dyy1 y0; d dy * 2 dx; /*initial value of d */ incrE dy * 2; incrNE dy - dx * 2; x x0; y y0; WritePixelx, y, value; While x * te return false; else ift* ts *tst; else ifr0 ts/r; iftz-buffer 中相应单元内的值 该点颜色填入 f-buffer 该点 z 值填入 z-buffer 4 points 算法的优点 简单、可靠 ,不需要对显示物体的面预先进行排序 算法的缺点 要很大的 z 缓冲器 ,工作量较大显示物体的表面和象素对应的每一个点处都要计算它的 z 值 6. Give a brief introduction about Phong shading, It is said that Phong shading is more expensive than Gouraud shading, but gives high quality highlights. Give your explanation. 10 points 它的基本思想是 对多边形顶点处 (平均) 法向量做双线性插值, 以增加一定的计算量为代价克服了 Gouraud 明暗处理的缺点。 Phong 明暗 处理能正确地模拟高光并能大大减轻马赫带效应。 也可采用扫描线双线性插值方法 求解由多边形近似表示的原曲面的法向量入手,画面真实感较 Gouraud 明暗处理的绘制结果有明显的改进。 由于 N 为矢量,而 I 为标量,故进行法向量插值时计算量较大,这影响了它在一些实时图形系统中的直接应用。 学院专业级学号姓名大学 计算机图形学 课程试卷 第 3 页 共 4 页 密封线 学年 学期 第 页 共 页 得分 阅卷人 Part III. OpenGL Application Questions20 Points total 1. Describe how to use Rubberbanding techniques in OpenGL when you try to drag and draw a cube interactively 8 points. 见书上 151-2 页。 2. Read the following code fragment and illustrate the result the initial setting of the object, light, camera, and the viewport, and the position and animation of the object and light with words and sketches.12 points void reshapeint w, int h glViewport0, 0, w, h; glMatrixModeGL_PROJECTION; glLoadIdentity; gluOrtho2D -3.0, 3.0, -3.0, 3.0; glMatrixModeGL_MODELVIEW; glLoadIdentity; void myidle /* change something */ spin 2; if spin 360 spin - 360; glutPostRedisplay; The idle callback is cuted whenever there are no events in the event queue void displayGLint spin GLfloat light_position 0.0, 1.0, 0.0, 1.0 ; glClear; glLoadIdentity; glTranslatef0.0, 2.0, 0.0; glPushMatrix; glRotatedGLdouble spin, 0.0, 1.0, 0.0; glLightfvGL_LIGHT0, GL_POSITION, light_position; glPopMatrix; drawSphere; draw a sphere with radius 1, the center is the origin of the local coordinate glutSwapBuffers; 学院专业级学号姓名山东大学 计算机图形学 课程试卷 第 4 页 共 4 页 密封线

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值