Probability Model for 2D Line Clipping
Chen Guo · Mini-micro Systems · 2003
D line segment clipping (line clipping) against a rectangular window is a basic operation in computer graphics. So far a lot of clipping algorithms have been proposed. Since different algorithms have superiority and inferiority in different conditions, we have to compare their performances in different conditions and can not compare their average performances. In this paper we analyze the probability distribution of the relative positions between the line segment and the window, and get the probability model for 2D line clipping. Then we use this model to calculate the average amounts of computations of some widely used algorithms and compare their average performances. This model also corrects some incorrect viewpoints about the probability distribution of the relative positions between the line segment and the window in some papers.