全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
密封线 09-10 学年 2 学期第 页 共 页题号一二三四五六七八九十总分总分人得分得分阅卷人Part I. Multiple Choice Questions (5 points each) 1. In a synthetic camera model, which of the following is (are) correct?_d_a) The image plane is behind the center of projection (COP). b) Specifications of the objects and the viewer are dependent.c) The image of an object is flipped relative to the object.d) The projectors meet at the center of projection (COP).2. Give an order of the following phases according to the rendering pipeline _cebda_ a) Fragment Processor b) Clipper c) Vertex Processor d) Rasterizer e) Primitive Assembler3. Which phase (as listed above) does each of the following operations belong to? _c_ To convert object representations from one coordinate system to another_d_ To generate inside fragments for a polygon and calculate their colors_b_ To determine which objects are within the view volume _a_ To determine the color of the corresponding pixel in the frame buffer4. Which of the following statements regarding affine transformations is(are) correct? _abd_ a) Two translations are commutative. b) Two rotations about the same axis are commutative. c) A scaling and a rotation are commutatived) A general rotation about an arbitrary line can be done with translations and rotations around the axes.5. 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);6. Local lighting computes the color or shade of each object independently. So it cant deal with situations such as _acd_ a) Some objects are blocked from the light. b) Real time illumination.c) Light can reflect from object to object.d) Some objects might be translucent.得分阅卷人Part II Free Form Questions (10 points each)1. Given the following code fragment: 学院 专业 级 学号 姓名 山东大学 计算机图形学 课程试卷 A第 1 页 共 4 页glBegin (GL_TRIANGLE_STRIP) glVertex3fv(a); glVertex3fv(b); glVertex3fv(c); glVertex3fv(d);glVertex3fv(e); glVertex3fv(b); glVertex3fv(f);glEnd ( );密封线 09-10 学年 2 学期第 页 共 页(1) Assume that the vertices of the first triangle in the above rendering of a mesh are given in clockwise order. Please draw the mesh in the following space where a, b, c, d, e, and f are the mentioned vertices.(2) Why do we often prefer triangle strips and/or triangle fans to a group of separate triangles in representation of the same 3D object?如果全部用三角形图元绘制的话会有许多点被重复绘制。比较而言。Triangle strips 与triangle fans 可以减少代码执行的代价与数据传输的代价2. Answer the following questions.(1) Give the equation for the Phong lighting model and explain the meaning of each term in it. (2) Describe the improvement the modified Phong model makes and give the modified lighting equation accordingly.(1)I=1/(a+bd+c*d2)(Kd*Ld*Max(l*n,0)+Ks*Ls*Max(r*v)alpha,0)+Ka*LaL:此点指向光源的向量 Ld,Ls,La:分别为漫反射,镜面反射,环境光的光强n:此点的法向量 Kd,Ks,Ka:分别为漫反射,镜面反射,环境光的反射系数r:此点的反射光方向的向量 alpha:镜面反射的高光系数v:此点指向观察着的方向的向量d:聚光源的距离a,b,c:常数,使光照效果变化柔和1/(a+bd+c*d2):距离衰减因子(2)改进的phong模型中的h,n代替r,v,其中h=(l+v)/|l+v|为向量l和v的中值向量,这样就避免了在计算每个点的光照时计算r向量,减少了计算量改进的phong光照模型:I=1/(a+bd+c*d2)(Kd*Ld*Max(l*n,0)+Ks*Ls*Max(h*n)alpha,0)+Ka*La3. Answer the following questions.(1) What is the purpose of projection normalization?(2) How does the graphics system perform the normalization for an orthogonal projection defined by glOrtho(left, right, bottom, top, near, far)? Give the steps and the final projection matrix.(1)投影归一化时将视体统一为长宽高都为2,中心在原点的标准视体,这样使得同样的流水线即可对平行视体进行操作,也可对透视视体进行操作,使处理过程得到统一。同时也简化了裁减过程。(2)平移T(-(right+left)/2,-(top+bottom)/2,(far+near)/2) 伸缩S(2/(right-left),2/(top-bottom),2/(far-near) 正交投影矩阵变换Mortho 计算可得最终投影矩阵为:2/(right-left) 0 0 -(right+left)/(right-left) 0 2/(top-bottom) 0 -(bottom+top)/(top-bottom) 0 0 2/(near-far) (far+near)/(far-near) 0 0 0 14. Answer the following questions.(1) Briefly introduce the Bresenhams algorithm for line segment rasterization.(2) What is the advantage of the Bresenhams algorithm over the DDA algorithm?(1)设斜率m有0m=1如果设直线在x+1处的纵坐标位置离上一个像素中心距离为a,离下一个像素中心距离为b,设d=x(b-a)m=y/x由d的正负情况可以决定究竟画在哪个像素点,而dk+1的值可由dk递推得到有dk+1=dk+2y dk0 2(y-x) 其他因此只需在算第一个d时计算交点b-a,其后就可进行递推运算 学院 专业 级 学号 姓名 山东大学 计算机图形学 课程试卷 A第 2 页 共 4 页密封线 09-10 学年 2 学期第 页 共 页 (2)避免了大量的浮点运算,减少了计算量,提高了效率; 相对于未改进的DDA算法也避免了绘制直线不连续的情况。5. Given the following 2D scene with 6 objects (a, b, d, e, f and g), we have added 5 partitioning planes (A, B, C, D and E) to construct a binary space partitioning (BSP) tree. Draw the BSP tree and explain how to use the BSP tree to render the scene. A B C g E D a d e b f递归地判断视点和每一个树结点的位置关系,先画离视点远的一半空间,再画离视点较近的一半空间。所以,对于此例,顺序应该是 degabf得分阅卷人Part III. OpenGL Application Questions (20 points)1. The following code implements a robot arm. Please read it and answer the questions at the end.#include #include #define BASE_HEIGHT 0.2#define BASE_WIDTH 0.2#define LOWER_ARM_HEIGHT 0.5#define LOWER_ARM_WIDTH 0.05#define UPPER_ARM_HEIGHT 0.5#define UPPER_ARM_WIDTH 0.05void base() glPushMatrix(); glTranslatef(0.0, 0.5*BASE_HEIGHT, 0.0); glScalef(BASE_WIDTH, BASE_HEIGHT, BASE_WIDTH); glutSolidCube(1.0);/ Cube-A glPopMatrix();void upper_arm() glPushMatrix(); glTranslatef(0.0, 0.5*UPPER_ARM_HEIGHT, 0.0); glScalef(UPPER_ARM_WIDTH,UPPER_ARM_HEIGHT, UPPER_ARM_WIDTH); glutSolidCube(1.0);/ Cube-B glPopMatrix(); 学院 专业 级 学号 姓名 山东大学 计算机图形学 课程试卷 A第 3 页 共 4 页密封线 09-10 学年 2 学期第 页 共 页void lower_arm() glPushMatrix(); glTranslatef(0.0, 0.5*LOWER_ARM_HEIGHT, 0.0); glScalef(LOWER_ARM_WIDTH,LOWER_ARM_HEIGHT,LOWER_ARM_WIDTH); glutSolidCube(1.0);/ Cube-C glPopMatrix();void display(void)GLfloat theta = 0.0, 45.0, 45.0;glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);glMatrixMode(GL_MODELVIEW);glLoadIdentity();glColor3f(1.0, 0.0, 0.0);glRotatef(theta0, 0.0, 1.0, 0.0);base();glColor3f(0.0, 1.0, 0.0);glTranslatef(0.0, BASE_HEIGHT, 0.0);glRotatef(theta1, 0.0, 0.0, 1.0);lower_arm(); glColor3f(0.0, 0.0, 1.0);glTranslatef(0.0, LOWER_ARM_HEIGHT, 0.0);glRotatef(theta2, 0.0, 0.0, 1.0);upper_arm(); glFlush();glutSwapBuffers();void main(int argc, char *argv) glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize(500, 500); glutCreateWindow(robot); glEnable(GL_DEPTH_TEST); glClearColor(1.0, 1.0, 1.0, 1.0);glutDisplayFunc(display); glutMainLoop();(1) What is the screen output of this program? Please illustrate with a picture.(2) If we can vary the values
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2027年潮白河职业学院单招职业技能考试模拟试卷含完整答案详解(全优)
- 2024年永州阳明山技师学院单招职业技能考试模拟试卷附参考答案详解【培优A卷】
- 2025年潍坊首阳山职业学院高职单招职业适应性测试考试题库附参考答案详解(黄金题型)
- 公务员公共基础人文常识试题及答案大全
- 2025年陕西富平职业学院单招职业技能考试题库及完整答案详解【考点梳理】
- 2027年湘盛专修高职学院高职单招职业适应性测试考试模拟试卷含完整答案详解【有一套】
- 2027年潍河数字职业学院高职单招职业适应性测试考试题库附答案详解【培优A卷】
- 2026年郴州新能源职业学院高职单招职业适应性测试考试题库附参考答案详解(模拟题)
- 2027年江苏省苏州市高职单招职业技能考试题库附答案详解(巩固)
- 2024年陕西机电职业学院高职单招职业技能考试题库及答案详解一套
- 广西师大附外国语高一入学数学分班考试真题含答案
- 中国未破裂颅内动脉瘤指南解读
- 煤矿安全案例分析课件
- 近五年云南省中考数学真题及答案2025
- 《内科护理》课件-第4章 第06节 肝硬化病人的护理
- 【《某纯电动汽车的电池包结构设计案例分析》1200字】
- 黑龙江新闻高级职称考试题及答案
- 中泰证券2025届秋季校园招聘笔试历年常考点试题专练附带答案详解试卷3套
- (2025版)与生育相关的慢性子宫内膜炎诊治专家共识
- 华西医院风湿科进修汇报
- GB/T 16292-2025医药工业洁净室(区)悬浮粒子的测试方法
评论
0/150
提交评论