版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
SE-341Computer(SpringSE-341Computer(Spring&hidden-••••HiddenSurface•Clippingof•ClippingofprimitivesisdoneusuallyscanconvertingtheprimitivesReasonsbeingscanconversionneedstodealonlywiththeversionoftheprimitive,whichmightbemuchsmallerthanitsunclippedversionPrimitivesareusuallydefinedintherealworld,theirmappingfromtherealtotheintegerdomainofthedisplaymightresultintheoverflowingoftheintegervaluesresultinginunnecessary•HowwouldweHowwouldwe••••2D3DClippingiseasyforLineandPolygonsClippingishardforcurveandText–Theycanbetransformedto2D2DClipping2D2DClipping2D2DClippingSegment-Segment-IntersectionIntersectionwithaxis-aligned2DClipping2DClipping•••••Sutherland-Cohen裁剪:编中点分割裁剪:除以2,移位运参数化裁剪与梁友栋-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(物体数•理论–如n(物体数)<N(像素数,则对象空间算法的计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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 国际贸易术语的责任义务与风险划分分析
- 机械课程设计总结文章
- 古法练气小班课程设计
- 2024-2025学年浙江省嘉兴市秀洲区数学九年级第一学期开学达标测试试题【含答案】
- 紫外可见分光光度计的基本操作
- 苗木养护专项方案
- 2024年生物医用陶瓷材料项目建议书
- 2024年网红直播项目发展计划
- 2024年电脑测深仪合作协议书
- 遣返协调机制协议书
- 电厂项目选址报告
- 华为交换机检测报告
- 城市交通共建联合体协议书
- 大数据时代薪酬管理新变研究
- 2024年Illustrator教案(多应用)
- 1.1《中国人民站起来了》【中职专用】高一语文(高教版2023基础模块下册)
- 腹高压的护理
- 备品备件消耗分析报告
- 中小学教师违反职业道德行为处理办法
- 酸菜鱼预制菜简介演示
- 倡导医学人文素质教育的价值观
评论
0/150
提交评论