交互式计算机图形学17章课后题答案Word下载.docx
- 文档编号:16511734
- 上传时间:2022-11-24
- 格式:DOCX
- 页数:16
- 大小:89.13KB
交互式计算机图形学17章课后题答案Word下载.docx
《交互式计算机图形学17章课后题答案Word下载.docx》由会员分享,可在线阅读,更多相关《交互式计算机图形学17章课后题答案Word下载.docx(16页珍藏版)》请在冰豆网上搜索。
Oneofthesethreepointscanbeplacedontheyaxis.Tosatisfythe
requirementthatthepointsbeequidistant,thepointmustbeat
(0,2p2/3,−1/3).Theothertwocanbefoundbysymmetrytobeat
(−
p6/3,−
p2/3,−1/3)and(p6/3,−
p2/3,−1/3).
Wecansubdivideeachfaceofthetetrahedronintofourequilateral
trianglesbybisectingthesidesandconnectingthebisectors.However,the
bisectorsofthesidesarenotontheunitcirclesowemustpushthese
pointsouttotheunitcirclebyscalingthevalues.Wecancontinuethis
processrecursivelyoneachofthetrianglescreatedbythebisectionprocess.
InExercise,wesawthatwecouldintersectthelineofwhichthe
linesegmentispartindependentlyagainsteachofthesidesofthewindow.
Wecoulddothisprocessiteratively,eachtimeshorteningthelinesegment
ifitintersectsonesideofthewindow.
Inaone–pointperspective,twofacesofthecubeisparalleltothe
projectionplane,whileinatwo–pointperspectiveonlytheedgesofthe
cubeinonedirectionareparalleltotheprojection.Inthegeneralcaseofa
three–pointperspectivetherearethreevanishingpointsandnoneofthe
edgesofthecubeareparalleltotheprojectionplane.
Eachframefora480x640pixelvideodisplaycontainsonlyabout
300kpixelswhereasthe2000x3000pixelmovieframehas6Mpixels,or
about18timesasmanyasthevideodisplay.Thus,itcantake18timesas
muchtimetorendereachframeifthereisalotofpixel-levelcalculations.
TherearesinglebeamCRTs.Oneschemeistoarrangethephosphors
inverticalstripes(red,green,blue,red,green,....).Themajordifficultyis
thatthebeammustchangeveryrapidly,approximatelythreetimesasfast
aeachbeaminathreebeamsystem.Theelectronicsinsuchasystemthe
electroniccomponentsmustalsobemuchfaster(andmoreexpensive).
Chapter2Solutions
Wecansolvethisproblemseparatelyinthexandydirections.The
transformationislinear,thatisxs=ax+b,ys=cy+d.Wemust
maintainproportions,sothatxsinthesamerelativepositioninthe
viewportasxisinthewindow,hence
x−xmin
xmax−xmin
=
xs−u
w
xs=u+w
.
Likewise
ys=v+h
ymax−ymin
Mostpracticaltestsworkonalinebylinebasis.Usuallyweuse
scanlines,eachofwhichcorrespondstoarowofpixelsintheframebuffer.
Ifwecomputetheintersectionsoftheedgesofthepolygonwithaline
passingthroughit,theseintersectionscanbeordered.Thefirst
intersectionbeginsasetofpointsinsidethepolygon.Thesecond
intersectionleavesthepolygon,thethirdreentersandsoon.
Therearetwofundamentalapproaches:
vertexlistsandedgelists.
Withvertexlistswestorethevertexlocationsinanarray.Themeshis
representedasalistofinteriorpolygons(thosepolygonswithnoother
polygonsinsidethem).Eachinteriorpolygonisrepresentedasanarrayof
pointersintothevertexarray.Todrawthemesh,wetraversethelistof
interiorpolygons,drawingeachpolygon.
Onedisadvantageofthevertexlististhatifwewishtodrawtheedgesin
themesh,byrenderingeachpolygonsharededgesaredrawntwice.We
canavoidthisproblembyforminganedgelistoredgearray,eachelement
isapairofpointerstoverticesinthevertexarray.Thus,wecandraweach
edgeoncebysimplytraversingtheedgelist.However,thesimpleedgelist
hasnoinformationonpolygonsandthusifwewanttorenderthemeshin
someotherwaysuchasbyfillinginteriorpolygonswemustaddsomething
tothisdatastructurethatgivesinformationastowhichedgesformeach
polygon.
Aflexiblemeshrepresentationwouldconsistofanedgelist,avertexlist
andapolygonlistwithpointerssowecouldknowwhichedgesbelongto
whichpolygonsandwhichpolygonsshareagivenvertex.
TheMaxwelltrianglecorrespondstothetrianglethatconnectsthe
red,green,andblueverticesinthecolorcube.
Considerthelinesdefinedbythesidesofthepolygon.Wecanassign
adirectionforeachoftheselinesbytraversingtheverticesina
counter-clockwiseorder.Oneverysimpletestisobtainedbynotingthat
anypointinsidetheobjectisontheleftofeachoftheselines.Thus,ifwe
substitutethepointintotheequationforeachofthelines(ax+by+c),we
shouldalwaysgetthesamesign.
Thereareeightverticesandthus256=28possibleblack/white
colorings.Ifweremovesymmetries(black/whiteandrotational)thereare
14uniquecases.SeeAngel,InteractiveComputerGraphics(Third
Edition)orthepaperbyLorensenandKlineinthereferences.
Chapter3Solutions
Thegeneralproblemishowtodescribeasetofcharactersthatmight
havethickness,curvature,andholes(suchasinthelettersaandq).
Supposethatweconsiderasimpleexamplewhereeachcharactercanbe
approximatedbyasequenceoflinesegments.Onepossibilityistousea
move/linesystemwhere0isamoveand1aline.Thenacharactercanbe
describedbyasequenceoftheform(x0,y0,b0),(x1,y1,b1),(x2,y2,b2),.....
wherebiisa0or1.ThisapproachisusedintheexampleintheOpenGL
ProgrammingGuide.Amoreelaboratefontcanbedevelopedbyusing
polygonsinsteadoflinesegments.
Thereareacoupleofpotentialproblems.Oneisthattheapplication
programcanmapdifferentpointsinobjectcoordinatestothesamepoint
inscreencoordinates.Second,agivenpositiononthescreenwhen
transformedbackintoobjectcoordinatesmaylieoutsidetheuser’s
window.
Eachscanisallocated1/60second.Foragivenscanwehavetotake
10%ofthetimefortheverticalretracewhichmeansthatwestarttodraw
scanlinenat.9n/(60*1024)secondsfromthebeginningoftherefresh.
Butallocating10%ofthistimeforthehorizontalretraceweareatpixelm
onthislineattime.81nm/(60*1024).
Whenthedisplayischanging,primitivesthatmoveorareremoved
fromthedisplaywillleaveatraceormotionbluronthedisplayasthe
phosphorspersist.Longpersistencephosphorshavebeenusedintextonly
displayswheremotionblurislessofaproblemandthelongpersistence
givesaverystableflicker-freeimage.
Chapter4Solutions
Ifthescalingmatrixisuniformthen
RS=RS(α,α,α)=αR=SR
ConsiderRx(θ),ifwemultiplyandusethestandardtrigonometric
identitiesforthesineandcosineofthesumoftwoangles,wefind
Rx(θ)Rx(φ)=Rx(θ+φ)
Bysimplymultiplyingthematriceswefind
T(x1,y1,z1)T(x2,y2,z2)=T(x1+x2,y1+y2,z1+z2)
Thereare12degreesoffreedominthethree–dimensionalaffine
transformation.Considerapointp=[x,y,z,1]Tthatistransformedto
p_=[x_y_,z_,1]TbythematrixM.Hencewehavetherelationship
p_=MpwhereMhas12unknowncoefficientsbutpandp_areknown.
Thuswehave3equationsin12unknowns(thefourthequationissimply
theidentity1=1).Ifwehave4suchpairsofpointswewillhave12
equationsin12unknownswhichcouldbesolvedfortheelementsofM.
Thusifweknowhowaquadrilateralistransformedwecandeterminethe
affinetransformation.
Intwodimensions,thereare6degreesoffreedominMbutpandp_have
onlyxandycomponents.Henceifweknow3pointsbothbeforeandafter
transformation,wewillhave6equationsin6unknownsandthusintwo
dimensionsifweknowhowatriangleistransformedwecandeterminethe
Itiseasytoshowbysimplymultiplyingthematricesthatthe
concatenationoftworotationsyieldsarotationandthattheconcatenation
oftwotranslationsyieldsatranslation.Ifwelookattheproductofa
rotationandatranslation,wefindthattheleftthreecolumnsofRTare
theleftthreecolumnsofRandtherightcolumnofRTistheright
columnofthetranslationmatrix.IfwenowconsiderRTR_whereR_isa
rotationmatrix,theleftthreecolumnsareexactlythesameastheleft
threecolumnsofRR_andtheandrightcolumnstillhas1asitsbottom
element.Thus,theformisthesameasRTwithanalteredrotation(which
istheconcatenationofthetworotations)andanalteredtranslation.
Inductively,wecanseethatanyfurtherconcatenationswithrotationsand
translationsdonotalterthisform.
Ifwedoatranslationby-hweconverttheproblemtoreflectionabout
alinepassingthroughtheorigin.Frommwecanfindananglebywhich
wecanrotatesothelineisalignedwitheitherthexoryaxis.Nowreflect
aboutthexoryaxis.Finallyweundotherotationandtranslationsothe
sequenceisoftheformT−1R−1SRT.
Themostsensibleplacetoputtheshearissecondsothattheinstance
transformationbecomesI=TRHS.Wecanseethatthisordermakes
senseifweconsideracubecenteredattheoriginwhosesidesarealigned
withtheaxes.Thescalegivesusthedesiredsizeandproportions.The
shearthenconvertstherightparallelepipedtoageneralparallelepiped.
Finallywecanorientth
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 交互式 计算机 图形学 17 课后 答案
![提示](https://static.bdocx.com/images/bang_tan.gif)