图形学第六章.ppt

  1. 1、本文档共26页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
图形学第六章.ppt

6. Two-Dimensional Viewing 6-1 THE VIEWING PIPELINE Windows:A world-coordinate area selected for display is called a window. Viewport:An area on a display device to which a window is mapped is called a viewport. Changing the position of the viewport /window What happen? Varying the size of viewports /window What happen? 6-2 VIEWING COORDINATE REFERENCE FRAME Mwc,vc = R * T (6-1) 6-3 WlNDOW-TO-VIEWPORT COORDINATE TRANSFORMATION xv-xvmin/xvmax-xvmin = xw-xwmin/xwmin-xwmin yv-yvmin/yvmax-yvmin=yw-ywmin/ywmax-ywmin xv= yv= (6-3, 6-4) 1. Perform a scaling transformation using a fixed-point position of (xwmin, ywmin) that scales the window area to the size of the viewport. 2. Translate the scaled window area to the position of the viewport. 6-5 CLIPPING OPERATIONS Point Clipping Line Clipping (straight-line segments) Area Clipping (polygons) Curve Clipping Text Clipping 6-6 POINT CLIPPING Assuming that the clip window is a rectangle in standard position, we save a point P = (x, y) for display if the following inequalities are satisfied: ? xwmin=x=xwmax ywmin=y=ywmax (6-5) 6-7 LINE CLIPPING Cohen-Sutherland Line Clipping Every line endpoint in a picture is assigned a four-digit binary code, called a region code. 1.Both endpoint ‘s region code is 0000, the line is in the window. 2. Have a 1 in the same bit position in the region codes for each endpoint , the line is outside the window. Other situations: Liang-Barsky Line Clipping x=x1+ u*?x 0=u=1 , ?x =x2-x1, ?y =y2-y1 y=y1+ u*?y (6-9) xwmin= x1+u *?x = xwmax ywmin=y1+u *?y = ywmax (6-10) u*pk=qk, k = 1,2,3,4 (6-11) where parameters p and q are defined as pl = - ?x, q1 = xl – xwmin p2 = ?x , q2 = xwmax-x1 p3 = - ?y, q3 = y1 – ywmin p4 = ?y, q4 = ywmax-y1 1:left, 2:right, 3:bottom, 4: top * if pk =

文档评论(0)

docinpfd + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:5212202040000002

1亿VIP精品文档

相关文档