- 5
- 0
- 约3.09千字
- 约 21页
- 2017-02-02 发布于江苏
- 举报
Liang_Barsky课件精品
线段裁剪就是将指定窗口作为图形边界,将窗口内的线段保留,而窗口外的线段则被舍弃。 裁剪处理涉及: (1)线段在窗口内外的判别; (2)线段与窗口的求交。 2.Liang--Barsky 算法 (1)算法背景 经典算法 ---写入图形学教科书的唯一中国人算法 1935年7月出生,福建福州人. 1956年毕业于复旦大学数学系,1960年复旦大学数学系研究生毕业 1960年分配到浙江大学数学系任教,1979年至1981年在美国Utah大学计算机系作访问学者 获国家教委科技进步一等奖,1987 获国家自然科学三等奖,1991 (2) 算法思想 (3)The Liang-Barsky Algorithm 1 If pk=0 and qk0 for any k,discard the line and stop.Otherwise proceed to the next step. 2 For all k such that pk0,calculate rk=qk / pk. Let u1=max{rk ,0}. 3 For all k such that pk0,calculate rk=qk / pk. Let u2=min{rk ,1}. 4 If u1 u2,discard the line since it is completely outside the clipping window. Otherwise, use u1 and u2 to calculate endpoints of the clipped line. (4)算法演示 讲课结束,谢谢! * * 直线段裁剪的 Liang--Barsky算法 计算机科学学院 赵景秀 线段裁剪的意义 Liang-Barsky算法 0 问题的提出 1.线段裁剪的意义 Before clipping After clipping Sutherland 梁友栋 苏步青 Barsky 梁友栋的贡献: ––Liang-Barsky算法 ––几何连续理论 ––Communication of ACM 论文(83’) 60s’Cohen-Sutherland的编码方法: Cohen Sutherland 0000 1000 1100 0010 0100 0110 1001 0001 0011 78年Cyrus和Beck的参数化方法---更有效的算法: 84年梁友栋和Barsky提出了更快的参数化线段裁剪算法。 Liang-Barsky算法的几何含义:入边、出边和端点 u2 u1 xmin xmax ymin ymax Parameterized line segment: x = x1 + u(x2 – x1) = x1 + uDx y = y1 + u (y2 – y1) = y1 + uDy 0 ? u ? 1 If a point on the line is inside the clipping window, then: xmin ? x1 + uDx ? xmax ymin ? y1 + uDy ? ymax u2 u1 xmin xmax ymin ymax xmin ? x1 +uDx = (– Dx) u ? x1 – xmin We rewrite the inequalities in the form upk ?qk Left Border, k= 1: pk = – Dx, qk= x1 – xmin Right Border, k= 2: pk = Dx, qk= xmax – x1 Bottom Border, k=3: pk = – Dy, qk= y1 – ymin Top Border, k=4: pk = Dy, qk= ymax – y1 x1 + uDx ? xmax = (Dx) u ? xmax – x1 ymin ? y1 + uDy = (– Dy) u ? y1 – ymin y1 + uDy ? ymax = (Dy) u ? ymax – y1 u2 u1 Case 1: pk ? 0 If pk 0, then the extension of the line segment goes from outside to inside the extended boundary (when moving in direction of incr
您可能关注的文档
最近下载
- 医院电子病历五级工作组工作制度及流程.docx VIP
- 增值税发票开票系统操作流程.doc VIP
- 建筑工程图集 15D202-2:柴油发电机组设计与安装.pdf VIP
- 2024商丘医学高等专科学校教师招聘考试真题及答案.docx VIP
- 现代工程图学习题集(第5版)杨裕根 课后习题答案解析.pdf
- 医院电子病历分级评价现场演练专家问题总结(五级).pdf VIP
- 狂犬病病毒攻毒犬唾液排毒与病毒在体内的分布研究.pdf VIP
- 桩基施工方案桩基桩基施工方案施工方案桩基础施工方案桩基施工.docx
- 屋面防水工程工程施工组织设计方案.docx VIP
- 2025年沈阳市直机关遴选公务员笔试真题汇编带答案解析.docx VIP
原创力文档

文档评论(0)