




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
SE-341Computer(SpringSE-341Computer(Spring&hidden-????HiddenSurface?Clippingof?ClippingofprimitivesisdoneusuallyscanconvertingtheprimitivesReasonsbeingscanconversionneedstodealonlywiththeversionoftheprimitive,whichmightbemuchsmallerthanitsunclippedversionPrimitivesareusuallydefinedintherealworld,theirmappingfromtherealtotheintegerdomainofthedisplaymightresultintheoverflowingoftheintegervaluesresultinginunnecessary?HowwouldweHowwouldwe????2D3DClippingiseasyforLineandPolygonsClippingishardforcurveandText–Theycanbetransformedto2D2DClipping2D2DClipping2D2DClippingSegment-Segment-IntersectionIntersectionwithaxis-aligned2DClipping2DClipping?????Sutherland-Cohen裁剪:編中點分割裁剪:除以2,移位運參數(shù)化裁剪與梁友棟-Barsky裁剪:高效率的裁Nicholl-Lee-Nicholl裁剪:更為精細的判(outcode1OR(outcode1ORoutcode2)==linesegmentis(outcode1ANDoutcode2)!=linesegmentistotally(outcode1ANDoutcode2)==linesegmentpotentiallycrossesclipFalseSomelinesegmentsthatareclassifiedascrossingtheclipregionactuallyCheckLineCheckLineIfP1P2iscompletelyinside,acceptit;ifP1P2isoutside,rejectit;otherwisegotostepFindanendpointP1(orP2)oflineP1P2outsideofFindtheintersectionpointP’1toreplaceP1(orIfP1P2iscompletelyinside,thenacceptthisline,elsetostep3D3DPipelinePipelinesystemofLinePolygonPolygonPolygonPolygonPolygonPolygonBoundingBoundingBoundingBounding????HiddenSurfaceWhyeliminatinginvisibleWhyeliminatinginvisible??VisibleandinvisibleportionsofEnhancereality(增加圖形的真實感Projection?3Dspace2D2Dspace?sortingaccordingtodepthmayadd3DWhyeliminatinginvisibleWhyeliminatinginvisibleHiddensurfaceremoval(HSR)mayBC(a)CubeBisthenearestā(c)CtheVisibleSurfaceVisibleSurfaceGiven:asetof3DobjectsandViewing Determine:thosepartsoftheobjectsthatarevisiblewhenviewedalongthedirectionofprojection.Orequivalently,eliminationofhiddenparts(hiddenlinesandsurfaces)Visiblepartswillbedrawn/shownwithpropercolorsandshads.???Hiddensurface?ImageHiddensurface?ImageSpaceMethod?圖像空間 Workonper-pixel/peroffragmentafterscanMuchfaster,butresolutionZ-Buffer/DepthObjectSpaceMethod?對象空間Workin3DbeforescanUsuallyindependentofImportanttomaintainindependenceofoutputdevice(screen/printeretc.)FrameworkofFrameworkofHSRinimagefor(Eachpixelintheimage)connectthepixelandtheviewpointfindthenearestobjectācomputethecolorforthe}?Theimageis?Theimageisconstrainedbyresolutionofdisplaydevices受分辨率限制)ComplexityO(nN)?Objectsshouldbesortedforeachpixelusen:thenumberofprimitivesN:thenumberofAlgorithms?z-buffer,scanline??FrameworkofHSRinFrameworkofHSRinobjectfor(eachobjectinworldcoordinate{determinethosepartsoftheobjectviewisunobstructedbyotherpartsofitoranyotherobject;drawthosepartsintheappropriate}?Highresolution?Highresolution (適合于精密的CAD工程領域?ComplexityEachobjectshouldbecomparedwiththeothern:objectBacksurface??理論–如n(物體數(shù)?理論–如n(物體數(shù))<N(像素數(shù),則對象空間算法的計O(n2)小于圖像空間算法對象空間和圖像空間的混合消隱??Hiddensurface?ImageHiddensurface?ImageSpaceZ-Buffer/DepthObjectSpaceZ-bufferZ-bufferZ-bufferFrame-buffer:Z-bufferFrame-buffer:storethecolorofZ-buffer?storez-coordinatesofViewingsystem(oxyzprojectionplanez=0;viewingdirection(0,0,-1);orthogonalprojection(平行投影)Depthvalueofapointisitsz-Thelargerofthez-valuetheshorterofthedistancetotheviewpoint(z越大離視點越近)?DepthColorDepthColorOutlineofz-Initializecolor(frame)-bufferOutlineofz-Initializecolor(frame)-bufferbackgroundInitializez-buffer視點最遠的z以任意順序掃描各多a)對于多邊形中的每一像素,計算其深度值比較z(x,y)與z緩沖器中已有的值如果z(x,y)zbuffer(x,y)計算該像素y)的光亮值屬性并寫入幀緩更新zzbuffer(x,Z-BufferZ-BufferZ-BufferZ-BufferZ-BufferZ-BufferObjectObjectSpaceBackBackfaceBackface?LetBackface?LetVbetheviewingdirectionfromthetothecamera;nthenormalofthefacetobe––BackBackface?Only?Onlyapplicabletoconvex?Only?OnlyapplicabletoconvexPainter’sPainter’sForFor2DForFor2DForFor2DPainter’sPainter’sWhatPainter’sPainter’sWhatPainter’sPainter’sBinaryBinarySpacePartitioningBinaryBinarySpacePartitionCreatingCreatingBSPTrees:CreatingCreatingBSPTrees:CreatingCreatingBSPTrees:CreatingCreatingBSPTrees:CreatingCreatingBSPTrees:SplittingSplittingBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-Trees:ViewpointBSP-Trees:BSP-
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 地區(qū)總代理合同協(xié)議
- 保安臨時服務合同
- 歷史文物鑒賞知識點總結與試題
- 公司續(xù)簽勞動合同書
- 世界城市經(jīng)濟發(fā)展趨勢表
- u型渠道施工方案
- 排水管道安裝施工方案
- DB3709T 037-2025 泰山茶 茶葉鮮葉采摘分級技術規(guī)范
- 山東3d卡布燈箱施工方案
- 2025年抗甲狀腺藥項目發(fā)展計劃
- 中國高血壓防治指南(2024年修訂版)解讀課件
- 酒店安全緊急疏散預案
- 混合碳酸稀土項目立項申請報告
- 2024年度林下經(jīng)濟發(fā)展與合作合同
- 2024-2030年中國馬鈴薯全粉行業(yè)市場深度調(diào)研及發(fā)展前景與投資研究報告
- 2024安全員知識考試題(全優(yōu))
- 高考招生咨詢服務合同
- 玻璃加工工藝流程單選題100道及答案解析
- 《二倍角的正弦、余弦、正切公式》名師課件2
- RTCADO-311A-2017原版完整文件
- DB11T 213-2014 城鎮(zhèn)綠地養(yǎng)護管理規(guī)范
評論
0/150
提交評論