图形裁剪的数学概念与方法
Mathematical Concept and Method of Clipping
-
摘要: 裁剪问题是计算机图形学的一个基本问题.裁剪速度又是其中最核心的问题.在许多处理裁剪问题的方法中,Ivan Suther land1968年提出的编码方法及其算法被公认为是最好的裁剪方法,因而在国际上得到了广泛的应用1,2.目前一条线段的裁剪约需5毫秒,十几条线段的裁剪眼睛就能感觉出来,在复杂图形动态显示中甚至会产生扭曲变形.本文给出裁剪问题的数学定义和解的数学形式;把高维(包括二、三和四维)归结为一维的线裁剪;把多边形的裁剪变成解一元不等式组;从而发展了一套简单、快速而直接的裁剪算法.这种算法比线裁剪的编码方法3和多边形逐次裁剪法4的速度约快一倍,程序条数约少一半,逻辑简单而且适于一般计算机语言5,6.Abstract: A New technique for clipping is developed that describes clipping in an exactand mathematical form.The basic ideas form the foundation for a family of algori-thms for line clipping and polygon clipping.This analysis is then embedded in an algorithm.It is shown in performancetests using random data that the new algorithm is much faster than the Sutherlandclipping algorithm.The execution time of new algorithm is about half of what isrequired by the old one.