摘要
裁剪算法是计算机图形学的一个最基本的算法,但大多数算法都是针对矩形窗口或凸多边形窗口的,已有的凹多边形裁剪主要将其分解为凸多边形处理。本文提出一个凹多边形的快速裁剪算法,并将其用于工程装配图的二维消隐。
In computer graphics, existing methods on removing hidden edges in concave polygons are not yet fully satisfactory. We now propose an efficient algorithm to deal with concave polygons frequently encountered in assembly drawing; of course, it is equally applicable to convex polygons. We analyzed thoroughly the peculiarities of concave polygon in order to avoid using the usual method of breaking a concave polygon into several convex polygons. Four different cases shown in Figs.1 through 4 were analyzed. Fig.1 shows both end points of hidden edge within the polygon. Fig.2 shows one end point within and the other outside the polygon. Fig.3 shows both end points of hidden edge to be outside of the polygon. Fig.4 shows a special and rather complex case. In greatly simplied terms, we call vextex A to be passed an “odd” number of times by hidden edges and vextex B to be passed an “even” number of times by hidden edges. Our algorithm is a part of fixture CAD system planned to be used shortly. In order to ensure that our clipping algorithm can work smoothly within such a system, the following preprocessing is necessary: clearly defining what are the windows and what are the polygons to be clipped.
出处
《西北工业大学学报》
EI
CAS
CSCD
北大核心
1997年第1期12-15,共4页
Journal of Northwestern Polytechnical University
基金
国家自然科学基金
陕西省科学基金