摘要
由Weiler-Atherton算法思想,提出一种基于向量交点特征的圆(弧)裁剪算法。算法以裁剪边为对象来研究交点的特征,使交点计算变得快速容易;在遍历追踪时,巧妙地将圆弧的起点和终点并入"出"、"入"交点列表,避免了圆(弧)交点的排序运算,不仅快速得到裁剪后的圆弧段,而且极容易地得出完全"取之"和"弃之"的结果;实际应用程序证明该算法具有较强的稳定性和实用性。
Proposes a new algorithm of circle chpping against rectangular window based on the Weiler-Atherton algorithm. To calculate the intersection points simply and fast, it defines the intersection features with the window edge. Before doing the seek loop, it ingeniously merges the start and end point of arc into the intersection list that includes "out" and "in" points, As a result, it avoids the sort operation for intersection points of arc, and simply gets the clipped arc segments and the result of "whole in" or "whole out". The practical application proves that the algorithm is stable and strong practicability.
关键词
裁剪
圆和圆弧
矩形窗口
交点特征
Clipping
Circle and Arc
Rectangular Window
Intersection Features