第二章04--计算机图形学.ppt

  1. 1、本文档共46页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2.9 Displaying 尹章才 1. Displaying Lines, Characters and Polygons Displaying lines, characters and polygons are some of the essential elements of a raster graphics display. 1.1 Line Display Recalling the discussion of frame buffers in Chapter 1, conceptually a frame buffer can be considered as a simple drawing surface. Assuming that the frame buffer is a simple line drawing display, the frame buffer is first cleared or set the background intensity or color. The line is then rasterized, using, for example, either the Bresenham or the DDA algorithm; and the appropriate pixels are written to the frame buffer. When the picture or frame is complete, the display controller reads the frame buffer in scan line order and passes the result to the video monitor Selective erase of lines in a frame buffer Selective erase of lines can be implemented by again using the rasterizing algorithm to write the appropriate pixels to the frame buffer in the background intensity or color. This eliminates the line. However, there is a problem with this technique. If the erased line crosses another line, then a hole is left in the line. It is not difficult to detect these holes and fill them; it is only necessary to determine the intersection of the deleted line with all other lines in the picture. For a complex picture, this is time-consuming. Boxing or minimax tests Boxing or minimax tests are used to reduce the work required. This technique is show: Only lines which pass through the dashed box formed from the minimum and maximum values of x and y for the line segment ab can possibly intersect ab. The tests for each line segment are then minimax or boxing test if Xlinemax Xboxmin or Xlinemin Xboxmax or Ylinemax Yboxmin or Ylinemin Yboxmax then no intersection else calculate intersection end if finish Boxing or minimax tests are fundamental to many computer graphics algorithms. 1.2 Character Display Alphanumeric character

文档评论(0)

好文精选 + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档