Need precise line intersections in computer graphics? This paper presents an efficient algorithm for computing the closest possible representable intersection point between two lines in a plane. The algorithm addresses the challenge of accurately determining line intersections when using single-precision floating-point numbers. It leverages an iterative binary search procedure to find the best possible representable floating-point numbers. Unlike computationally expensive methods that solve equations exactly, this approach focuses on achieving required precision through efficient comparison tests. Interval arithmetic is incorporated to further accelerate the process. The algorithm's novelty lies in its ability to derive accurate results without relying on complex calculations, making it suitable for real-time applications. Experimental results demonstrate that this algorithm is, on average, ten times faster than implementations using exact arithmetic libraries like CORE. These findings have practical implications for image processing, computer graphics, and other fields requiring efficient and accurate line intersection computations.
Published in the International Journal of Image and Graphics, this paper contributes to the journal’s focus on computer science, specifically in the areas of computer software and electronic computers. By introducing a new algorithm for computing line intersections, it aligns with the journal’s interest in advancements in image and graphics processing.