山东大学计算机图形学2010试卷A(含答案)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

09-10学年2学期第页共页题号一二三四五六七八九十总分总分人得分得分阅卷人PartI.MultipleChoiceQuestions(5pointseach)1.Inasyntheticcameramodel,whichofthefollowingis(are)correct?___d___a)Theimageplaneisbehindthecenterofprojection(COP).b)Specificationsoftheobjectsandthevieweraredependent.c)Theimageofanobjectisflippedrelativetotheobject.d)Theprojectorsmeetatthecenterofprojection(COP).2.Giveanorderofthefollowingphasesaccordingtotherenderingpipeline_cebda__a)FragmentProcessorb)Clipperc)VertexProcessord)Rasterizere)PrimitiveAssembler3.Whichphase(aslistedabove)doeseachofthefollowingoperationsbelongto?___c__Toconvertobjectrepresentationsfromonecoordinatesystemtoanother___d__Togenerateinsidefragmentsforapolygonandcalculatetheircolors___b__Todeterminewhichobjectsarewithintheviewvolume___a__Todeterminethecolorofthecorrespondingpixelintheframebuffer4.Whichofthefollowingstatementsregardingaffinetransformationsis(are)correct?____abd___a)Twotranslationsarecommutative.b)Tworotationsaboutthesameaxisarecommutative.c)Ascalingandarotationarecommutatived)Ageneralrotationaboutanarbitrarylinecanbedonewithtranslationsandrotationsaroundtheaxes.5.ChoosetwoOpenGLsentencesfromthefollowfourcandidatestotransformthecamerafromtheoriginalpositiontothedestinationposition(DestnationPostion)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.Locallightingcomputesthecolororshadeofeachobjectindependently.Soitcan’tdealwithsituationssuchas_______acd________a)Someobjectsareblockedfromthelight.b)Realtimeillumination.c)Lightcanreflectfromobjecttoobject.d)Someobjectsmightbetranslucent.得分阅卷人PartIIFreeFormQuestions(10pointseach)1.Giventhefollowingcodefragment:学院专业级学号姓名山东大学计算机图形学课程试卷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)Assumethattheverticesofthefirsttriangleintheaboverenderingofamesharegiveninclockwiseorder.Pleasedrawthemeshinthefollowingspacewherea,b,c,d,e,andfarethementionedvertices.abcdfe(2)Whydoweoftenprefertrianglestripsand/ortrianglefanstoagroupofseparatetrianglesinrepresentationofthesame3Dobject?如果全部用三角形图元绘制的话会有许多点被重复绘制。比较而言。Trianglestrips与trianglefans可以减少代码执行的代价与数据传输的代价2.Answerthefollowingquestions.(1)GivetheequationforthePhonglightingmodelandexplainthemeaningofeachterminit.(2)DescribetheimprovementthemodifiedPhongmodelmakesandgivethemodifiedlightingequationaccordingly.(1)I=1/(a+bd+c*d^2)(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*d^2):距离衰减因子(2)改进的phong模型中的h,n代替r,v,其中h=(l+v)/|l+v|为向量l和v的中值向量,这样就避免了在计算每个点的光照时计算r向量,减少了计算量改进的phong光照模型:I=1/(a+bd+c*d^2)(Kd*Ld*Max(l*n,0)+Ks*Ls*Max((h*n)^alpha,0))+Ka*La3.Answerthefollowingquestions.(1)Whatisthepurposeofprojectionnormalization?(2)HowdoesthegraphicssystemperformthenormalizationforanorthogonalprojectiondefinedbyglOrtho(left,right,bottom,top,near,far)?Givethestepsandthefinalprojectionmatrix.(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)00-(right+left)/(right-left)02/(top-bottom)0-(bottom+top)/(top-bottom)002/(near-far)(far+near)/(far-near)00014.Answerthefollowingquestions.(1)BrieflyintroducetheBresenham’salgorithmforlinesegmentrasterization.(2)WhatistheadvantageoftheBresenham’salgorithmovertheDDAalgorithm?(1)设斜率m有0m=1如果设直线在x+1处的纵坐标位置离上一个像素中心距离为a,离下一个像素中心距离为b,设d=x(b-a)m=y/x由d的正负情况可以决定究竟画在哪个像素点,而dk+1的值可由dk递推得到有dk+1=dk+2ydk02(y-x)其他因此只需在算第一个d时计算交点b-a,其后就可进行递推运算学院专业级学号姓名山东大学计算机图形学课程试卷A第2页共4页……………………………………密………………………封………………………线…………………………………09-10学年2学期第页共页(2)避免了大量的浮点运算,减少了计算量,提高了效率;相对于未改进的DDA算法也避免了绘制直线不连续的情况。5.Giventhefollowing2Dscenewith6objects(a,b,d,e,fandg),wehaveadded5partitioningplanes(A,B,C,DandE)toconstructabinaryspacepartitioning(BSP)tree.DrawtheBSPtreeandexplainhowtousetheBSPtreetorenderthescene.ABCgEDadebf递归地判断视点和每一个树结点的位置关系,先画离视点远的一半空间,再画离视点较近的一半空间。所以,对于此例,顺序应该是degabf得分阅卷人PartIII.OpenGLApplicationQuestions(20points)1.Thefollowingcodeimplementsarobotarm.Pleasereaditandanswerthequestionsattheend.#includeGL/glut.h#includestdlib.h#defineBASE_HEIGHT0.2#defineBASE_WIDTH0.2#defineLOWER_ARM_HEIGHT0.5#defineLOWER_ARM_WIDTH0.05#defineUPPER_ARM_HEIGHT0.5#defineUPPER_ARM_WIDTH0.05voidbase(){glPushMatrix();glTranslatef(0.0,0.5*BASE_HEIGHT,0.0);glScalef(BASE_WIDTH,BASE_HEIGHT,BASE_WIDTH);glutSolidCube(1.0);//Cube-AglPopMatrix();}voidupper_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-BglPopMatrix();}学院专业级学号姓名山东大学计算机图形学课程试卷A第3页共4页……………………………………密………………………封………………………线………………………………………………………………………密…

1 / 5
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功