现有的椭圆窗口裁剪算法需通过求交运算确定裁剪对象,算法复杂,而且只适用于简单图形的裁剪。由于裁剪是计算机图形学中基础算法之一,因此找到一种高效的椭圆窗口裁剪算法具有重要的实际意义。提出了一种基于像素的椭圆窗口裁剪算法,首先采用高效的椭圆算法生成裁剪窗口,然后以窗口作为边界利用扫描线原理确定窗口内像素并输出,完成裁剪过程。该方法无需复杂的求交运算,只需简单的像素读写便可完成裁剪操作,因此裁剪过程简单,执行速度快,算法复杂度低,尤其适合于复杂图形及图像的裁剪处理。
Existing ellipse clipping algorithms determine clipping objects through complicated steps of calculating cross-points which is complex and only suitable for simple graphics clipping. Because dipping is one of basis algorithms in computer graphics, it is necessary to find out a high-efficiency clipping algorithm based on ellipse window. A new clipping algorithm based on ellipse window is proposed, which can efficiently clip arbitrary graphics and images. Firstly, a clipping window is generated through a high-quality ellipse algorithm. Then, pixels in the window is scanned and output through scan-line principle. At last, clipping process is finished. The method has advantages of simple design, fast implementation and low complieacy which is more suitable for clipping complicated graphics and image.