资源描述:
《交互式计算机图形学课后答案2》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、CGAssignment5(PaperHomework2Chapters5-8)DeadlineJune202010請將答案寫在Word檔(亦可寫在紙本上用掃描器或像機取像成影像檔・jpg)中上傳至portal.1.Exercise5.2(p.286intextbook)5.2Supposethattheaxisoftheplaneisitszdirectionandupistheydirection.Intheairplane*scoordinatesystem,theroll・pitchandyawcorrespondtorotationsaboutthez,xandya
2、xesrespectively.Thuswecancontroltheorientationrelativetheoriginbyarotationoftheform(volI)Rj(pitch)(yaw).Wemustalsodoatranslationtomovetheairplanetoitsdesiredlocation.2.Exercise5.7(p.286)5.7Theresultfollowsfromthetransformationbeingaffine.Wecanalsotakeadirectapproach.Considerthelinedetermine
3、dbythepoints(忑1,2/1,21)andZ/2,^2)-Anypointalongcanbewrittenparametricallyas(ctxy+(1—a)龙2,ay、+(1—a)?/2,otZ+(1—Considerthesimpleprojectionofthispoint—小2)(曲】+(】一&)爼2,虫/1+(1—Q)92)whichisoftheform+(1—0)^2,+(1一a)92)・Thisformdescribesalinebecausetheslopeisconstant.Notethatthefunction/(a)impliesth
4、atwetraceoutthelineatanonlinearrateasaincreasesfrom0to1.3.Exercise5.15(p.286)5.15Ifweuse0=0=45,weobtaintheprojectionmatrix10-1001-10000000011.Exercise5.17(p.287)5.17Allthepointsontheprojectionofthepoint{x.y^z}inthedirection(1工、d和dz)areoftheform(x+ad巧y+ady^z+adz).Thustheshadowofthepoint(a;,z
5、)isfoundbydeterminingtheaforwhichthelineintersectstheplane,thatisaxs+bys+czs=dSubstitutingandsolving,wefindd—ax—by—cz(idx+bdy+cdzfindxs=z+ad工=However,whatwewantisaprojectionmatrix,Usingthisvalueofawe(idx+bdy+cdzx(bdy+cdx)—dx{d-by-cz)withsimilarequationsforysandz$.Theseresultscanbecomputedby
6、multiplyingthehomogeneouscoordinatepoint1)bytheprojectionmatrixbdy+cdz—Cldy—adz0ad/工+cdz—bdz0Tdyadx+bdy0—ddx_ddy-ddzadx+bdy+cdz2.Exercise6.7(p.327)6.7Let0betheanglebetweenthenormalandthehalfwayvector,0betheanglebetweentheviewerandthereflectionangle,and9betheanglebetweenthenormalandthelights
7、ource.Ifallthevectorslieinthesameplane,theanglebetweenthelightsourceandtheviewercanbecomputereitheras0+20oras2(0+0).Settingthetwoequal,wefind©=20.Ifthevectorsarenotcoplanarthen0V20・3.Exercise6.19(p.328)6.19Shadingrequiresthatwhenwetransformnormalsandpoin