Fixed-Point Arithmetic Line Clipping

 


R. Mollá

Technical University of Valencia
Camino de Vera, s/n
Spain 46022, Valencia

rmolla@dsic.upv.es


P. Jorquera

Technical University of Valencia
Camino de Vera, s/n
Spain 46022, Valencia

pedjorhe@inf.upv.es
R. Vivó

Technical University of Valencia
Camino de Vera, s/n
Spain 46022, Valencia

rvivo@dsic.upv.es

 


ABSTRACT

This algorithm supports line clipping against a rectangular window with edges parallel to the screen. The algorithm combines different partial solutions given in the bibliography such as implicit area codes, decision trees, line ends comparison, symmetry or avoiding redundant calculations, mixing them with fixed-point arithmetic, explicit calculation reusing and dynamic monitoring. It may work in the fractional object space while still using integer arithmetic (fixed-point). It is faster than traditional algorithms. It provides more precision without using floating point arithmetic.

Keywords

Line clipping, fixed-point arithmetic.