基于直线特性的直线生成集成算法
摘 要
在分析和比较了现有的直线生成算法后,以Bresenham算法为基础,充分利用直线的对称性、方向性和连续性,设计了一个基于直线特性的直线生成集成算法,以进一步提高直线生成速度.实验表明,该集成算法与Bresenham算法相比,直线绘制速度提高了50%以上.特别是在工程图样中,由于绝大部分直线为水平线、垂直线、±45°方向直线,因此本算法将更为有效.
关键词
A Property-Based Integrated Line-Generating Algorithm
() Abstract
Present line-generating algorithms, which include Bresenham algorithm, symmetrical algorithm and the algorithm based on the chain code theory of the line, are analyzed and compared in this paper. A property-based on the chain code theory of the line, are analyzed and compared in this paper. A property-based integrated line-generating algorithm, which is based on the Bresenham algorithm and makes full use of the symmetry, direction and continuity of the line, is presented to increase the speed of line generating. The results of our experiments have proved that the line-generating speed of the integrated algorithm is increased by more than 50 percent compared to that of Bresenham algorithm. The new algorithm is especially efficient for engineering drawings, in which the in- clinations of most lines are 0°, 180°,±90°,±45°and±135°. In can be thought that the integrated line-generating algorithm has make great progress in the way to reach the minimum value of the operation time in generating a line. Existing CAD&CG algorithms must take into account the particularity and entireness of the object while the integrity and universality of the processing object is pursued. To handle the related algorithms in some special way according to the characteristics of engineering drawings is an effective method to improve present CAD&CG algorithms.
Keywords
|