Font Size: a A A

The Research Of Line Clipping Algorithm Based On Rectangle Or Circle Window

Posted on:2015-03-27Degree:MasterType:Thesis
Country:ChinaCandidate:J J HanFull Text:PDF
GTID:2298330431498892Subject:Applied Mathematics
Abstract/Summary:PDF Full Text Request
With the development of the computer and Internet technology, the graphics image technology has been widely applied. As a basic subject of computer graphics image technology, computer graphics becomes more and more important. Since the computer graphics became an emerging discipline in the60’s of the20th century, it has already experienced development of more than fifty years. Although the speed of development of computer graphics is very rapid, it still can not satisfy the need of graphics with high immersed feeling. Its main deficiencies are shown by the facts that some algorithms in computer graphics still need to be further improved and that the integration of the different disciplines need to be continually strengthened. In order to reach vivid visual effect in showing graphics, we need improve some classical algorithms in computer graphics or make new algorithms to enhance the running efficiency. With the rapid development of related disciplines, such as computer animation, human-computer interaction, virtual reality, people has put forward higher requirement for computer graphics with realistic feeling. As the complex graphics is composed of simple ones, it is still very necessary to pay attention to the basic algorithms of computer graphics. The clipping as one of the basic operations of computer graphics, its importance is self-evident. The main work of this paper is that improve the classical algorithm of computer graphics and that put forward a line clipping algorithm of circle window.As the Cohen-Sutherland line clipping algorithm cannot reject completely the lines which are completely outside clipping window and may compute invalid intersection points, this paper has put forward an improved algorithm based on Cohen-Sutherland algorithm. By adding simple conditions, the improved algorithm can quickly reject line segments which are completely outside clipping widow, therefore avoiding invalid intersection calculation. And if a line segment intersects with clipping window, the improved algorithm can rapidly judge which clipping window edge has real intersection point(s) with the line segment to quickly calculate the real coordinates of the intersection point. Experiments show that the improved algorithm in this paper can indeed enhance the clipping efficiency.When circle window line clipping algorithm calculates intersection point(s), we need solve the quadratic equations which are very time-consuming. By the analysis of position relationship between circular window and straight line segments, this paper has put forward a new circular window for line clipping algorithm. The new algorithm can quickly reject line segments which are completely outside clipping widow, therefore avoiding invalid intersection calculation. And if a line segment intersects with clipping window, the new algorithm can avoid solution of the quadratic equations. The new algorithm in this paper can improve the speed of clipping.
Keywords/Search Tags:line clipping, Cohen-Sutherland algorithm, intersection calculation, clipping window
PDF Full Text Request
Related items