



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
密封线 学年 学期第 页 共 页题号一二三四五六七八九十总分总分人得分得分阅卷人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 solid2. OpenGL Utility Toolkit(Glut) provide OpenGL the function such as _ab_ a) Open a window b) Get input from mouse and keyboardc) Widget such as Slidebars and Dialogues d) Widget such as Input boxes and Menuse) Event-driven3. Give an order of the following phases according the rendering pipeline _ cebda_ a) Fragment Processor b) Clipper c) Vertex Processor d) Rasterizer e) Primitive Assembler4. 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 buffer5. _a_ computes color or shade of each object independently, so it cant deal with situations such as cef a) Local Lighting b) Global Lightingc) Some objects are blocked from light d) Real time illuminatione) Light can reflect from object to objectf) Some objects might be translucent6. Choose two OpenGL sentences from the follow four candidates to transform the camera from the original position to the destination position(Destnation Postion)glMatrixMode(GL_MODELVIEW)glLoadIdentity();_a_ _c_a) glTranslatef(0.0, 0.0, -d); /d0b) glTranslatef(0.0, 0.0, d); /d0c) glRotatef(-90.0, 0.0, 1.0, 0.0);d) glRotatef(90.0, 0.0, 1.0, 0.0); 学院 专业 级 学号 姓名 大学 计算机图形学 课程试卷 第 1 页 共 4 页密封线 学年 学期第 页 共 页得分阅卷人Part II Free Form Questions (50 Points total)1. How to normalize an arbitrary view volume(as blow) to an openGL default view volume (8 points)答案一,答案二 xy shear (z values unchanged) Projection matrix: P = General case: 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 MidpointLine(int x0,int y0,int x1, int y1, int value) Int dx,dy, incrE, incrNE, d, x, y; dx=x1 x0; dy=y1 y0; d = dy * 2 dx; /*initial value of d */ incrE = dy * 2; incrNE =(dy - dx) * 2; x = x0; y= y0; WritePixel(x, y, value); While (x x1) If (d = 0)d+= incrE; Elsed+=incrNE;y+; X+; WritePixel(x, y, value); 4. Give the pseudo code about Liang-Barsky Line-Clipping Algorithm(10 points).double ts,te;double xL,xR,yB,yT;bool visible=false;void Liang_Barsky(double x2,double y2,double *ts,double *te) double dx,dy; visible=false; dx=x1-x0; dy= y1-y0; *ts=0; *te=1; if(clipt(-dx,x0-xL,ts,te) if(clipt(dx,xR-x0,ts,te) if(clipt(-dy,y0-yB,ts,te) if(clipt(dy,yT-y0,ts,te) visible=true; bool clipt(double r,double s,double * ts,double *te) double t; if(r* te) return false;else if(t* ts) *ts=t; else if(r0) t=s/r; if(t*ts) return false; else if(t* te) *te=t; else if(sz-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 Questions(20 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 reshape(int w, int h) glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D (-3.0, 3.0, -3.0, 3.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity();void myidle() /* change something */spin += 2; if (spin 360) spin -= 360;glutPostRedisplay();/The idle callback is executed whenever there are no events in the event queuevoid display(GLint spin)GLfloat light_position = 0.0, 1.0, 0.0, 1.0 ;glClear();glLoadIdentity();glTranslatef(0.0, 2.0, 0.0); glPushMatrix();glRotated(GLdouble
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 瓶栽速写课件
- 农村合作开发建房协议5篇
- 关于猪场技术托管协议6篇
- 琼剧鉴赏教学课件
- 杆线工程保护方案(3篇)
- 渡槽工程设备安装方案(3篇)
- 平南县东来农牧科技有限公司东华镇科技养殖园项目环评报告
- 农业温室项目2025年智能化温室大棚技术集成研究报告
- 农业温室智能化技术应用案例研究报告
- 猫咪饲养员岗前培训课件
- 精神卫生防治业务技能竞赛理论试题及答案
- 幼儿园大班语言《鹅大哥出门》课件
- 品质异常处理流程培训
- 《陆上风电场工程概算定额》NBT 31010-2019
- CFG桩复合地基沉降及承载力自动计算
- 浅析加强物资采购质量的措施
- 2024年天津港集团有限公司招聘笔试参考题库附带答案详解
- 传统体育运动在小学课堂中的应用课件教案
- 类脑计算与神经网络
- 手术授权申请表
- 2023年度全国出版专业技术人员职业资格考试-基础知识(初级)试题
评论
0/150
提交评论