Font Size: a A A

The Study Of Improved Algorithm On Genera Ting And Clipping Line With Anti-Aliasing

Posted on:2013-08-23Degree:MasterType:Thesis
Country:ChinaCandidate:P H MaFull Text:PDF
GTID:2248330374998142Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the rapid advancement of information technology and widespread use of various electronic products, such as smart phone, PDA, hand-held game device and music players, computer graphics is now more and more important. Computer graphics is a newly-emerged discipline and one of its main research focuses is graphics with immersed feeling. Although the speedy development of more than fifty years, the current need for computer graphics is still not satisfied, which is chiefly reflected by the facts that some algorithms in computer graphics need to be further improved and the merging demand for different disciplines is increasingly raised. For the purpose of reaching vivid visual effect in showing graphics, we need new efficient algorithms or improved version based on current classical algorithms to grow in running efficiency. The rapid development of related discipline, such as visualization computing, computer animation, computer game, human-computer interaction, posed higher requirements for computer graphics with immersed feeling. Due to the fact that complex graphics is made up of simple ones, it is still very helpful to value certain fundamental algorithms of computer graphics. This paper improved some classical algorithms on generating and clipping straight line, which are better off in satisfying the development of computer graphics in some fields like electronic products.According to the intensive study and analysis of the strengths and weaknesses of Bresenham algorithm and Wu algorithm, this paper proposes an improved algorithm for generating straight line with Antialiasing. The straight line generated by this improved algorithm has certain width and be suitable to complicated backgrounds. In this improved algorithm, when a pixel distance is moved in x axis or y axis each, the corresponding pixels equal to the line’s width are stuffed in the direction of each axis. This algorithm use weighted regional sampling method to obtain the marginal pixels of the target straight line, and its color is determined according to three factors--its background color, line color and the distance between the centre point of current pixel and the borderline of target line. This algorithm not only dynamically obtains the filling color of marginal pixels, but also implements the smoothing transition with certain width in complicated background.On the basis of studies on Cohen-Sutherland algorithm, this paper analyses the problem of low efficiency and proposes the corresponding improved algorithm. First, various judgments is added to this improved algorithm so that we can delete the opposite line without the visible window, which cannot be implemented in the original algorithm. Second, during the implementing process, this algorithm employs the method of adding auxiliary straight-line to directly calculate the valid intersections between the line and visible window, which is exactly inverse of the original algorithm. Our improved algorithm is very simple and easy to be implemented, improving the efficiency of clipping and reaching the desired results.By means of studying the limitations of classical algorithms’efficiency, the improved algorithms furnished in this paper increase their efficiency. Thus, the work of this paper has certain academic value and practical significance.
Keywords/Search Tags:computer graphics, line generating, anti-aliasing, line clipping, rectangular window
PDF Full Text Request
Related items