Font Size: a A A

Study And Implementation Of Graphic Clipping Algorithm In The Graphics Processing Unit

Posted on:2019-07-02Degree:MasterType:Thesis
Country:ChinaCandidate:F R BanFull Text:PDF
GTID:2428330572457759Subject:Engineering
Abstract/Summary:PDF Full Text Request
With the wide application of computers and the continuous development of computer technology,computer graphics,which is an important branch of the computer field,has also made considerable progress in recent years.It has become increasingly common to use computer graphics hardware to increase the scale and accuracy of computer graphics.Graphical Processing Unit(GPU)-based graphics hardware technology plays an important role in realizing high realism and high-resolution rendering of images.The graphics rendering pipeline of the Graphical Processing Unit mainly includes a geometric phase and a raster phase,and clipping is an important step in the geometric phase.Clipping can remove the graphics primitives outside the visual scene and retain the graphics primitives in the visual scene,so as to reduce the processing burden of the later modules and save hardware resources and improve processing efficiency.In this paper,Cohen-sutherland linear clipping algorithm and Sutherland-Hodgman polygon clipping algorithm is studied.The algorithm uses the region coding method to quickly determine the line segment completely within the clipping window and completely outside the clipping window.The intersection point is processed and discarding the line segment outside the window.Linear interpolation is used to implement the attribute interpolation of line segment.The Sutherland-Hodgman algorithm polygon clipping adopts the edge-by-edge clipping method.The vertices of the polygon are tested along the boundary of the cropping window.Keep the vertices in the clipping window and delete the vertices outside the clipping window,and the new vertices are inserted at the same time.A new polygon is formed by the sequence of ordered vertices obtained.And the property interpolation of the triangle is implemented through a centroid interpolation method.Based on the above two clipping algorithms,a clipping engine is designed with verilog language,and six user-defined clipping planes are supported.Raster positions and the three basic graphics primitives included points,lines,and triangles can be clipped.Also the clipping engine could complete the plane's attribute stack and the processing of pass-through commands.The detailed design of the clipping engine is given,and the system clock and interface timing are included.Based on the functional requirements of the clipping engine,a verification platform was built with system verilog language,also a function model for clipping was established.Verification items were plotted based on the element of the clipping function,also test scripts were designed.Function simulation was performed on the design.Through the consistency of the model response and the hardware response,the correctness of the function of the clipping engine is verified.The design implements the clipping of three kinds of primitives: points,lines,and triangles.Finally,combined with the clipping algorithm,the test results are analyzed and explained.
Keywords/Search Tags:Computer Graphics, Segment Clipping Algorithm, Polygon Clipping Algorithm, Clipping Engine, Verification
PDF Full Text Request
Related items