全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
密封线 学年 学期第 页 共 页题号一二三四五六七八九十总分总分人得分得分阅卷人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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年大庆辅警招聘考试题库及答案详解(有一套)
- 2024年大足县辅警协警招聘考试真题含答案详解(模拟题)
- 2023年赣州辅警协警招聘考试真题完整参考答案详解
- 2024年城口县辅警协警招聘考试真题附答案详解(综合卷)
- 2023年阿克苏辅警协警招聘考试备考题库附答案详解(研优卷)
- 2023年黑龙江辅警招聘考试真题及答案详解(名师系列)
- 2023年铜陵辅警协警招聘考试备考题库及答案详解(典优)
- 2024年双鸭山辅警协警招聘考试备考题库及完整答案详解一套
- 2024年佳木斯辅警招聘考试真题及答案详解(夺冠系列)
- 2023年防城港辅警招聘考试题库及答案详解(名师系列)
- 供应商评估筛选综合考察表样本
- 宜宾市2025四川宜宾高新产业投资服务有限公司第二次招聘聘用人员10人笔试历年参考题库附带答案详解
- 国家事业单位招聘2025国家林业和草原局国家公园(自然保护地)发展中心第二批招聘应届毕业生笔试历年参考题库附带答案详解
- 护理组长述职报告2025
- 长期委外加工合同范本
- 智慧树知道网课《工程伦理学》课后章节测试答案
- 2025年度全国消防安全知识竞赛试题(含答案+解析)
- 超声介入课件
- 2025内蒙古呼伦贝尔农垦谢尔塔拉、特泥河、哈达图、浩特陶海农牧场有限公司招聘笔试题库及参考答案详解1套
- 河南殡葬管理管理办法
- 2025年山西省教师职称考试(音乐)(小学)练习题及答案
评论
0/150
提交评论