{"title":"通过管理凸折线中的多边形边缘来进行线裁剪","authors":"Wencheng Wang, Chunjuan Sun, Jing Li, E. Wu","doi":"10.1080/2151237X.2008.10129261","DOIUrl":null,"url":null,"abstract":"Existing algorithms for clipping line segments against a concave polygon always need to compute all edges, resulting in a time complexity O(n) for computing intersection points, where n is the number of edges of the clipping polygon. This paper presents a new algorithm that first separates polygon edges into convex polylines and then clips lines against them, where a convex polyline is a sequence of edges that can form a convex polygon by themselves. As a result, the time complexity for computing intersection points is reduced, varying adaptively between O(log n) and O(n), and is lower than O(n) in most cases. To further improve clipping efficiency the new algorithm is combined with an axis-aligned BSP tree that is used to manage convex polylines for quickly finding convex polylines that might intersect the clipped lines. Examples show that the new algorithm can be several times faster than existing algorithms for line clipping.","PeriodicalId":318334,"journal":{"name":"Journal of Graphics Tools","volume":"50 1-5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Line Clipping by Managing Polygon Edges in Convex Polylines\",\"authors\":\"Wencheng Wang, Chunjuan Sun, Jing Li, E. Wu\",\"doi\":\"10.1080/2151237X.2008.10129261\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Existing algorithms for clipping line segments against a concave polygon always need to compute all edges, resulting in a time complexity O(n) for computing intersection points, where n is the number of edges of the clipping polygon. This paper presents a new algorithm that first separates polygon edges into convex polylines and then clips lines against them, where a convex polyline is a sequence of edges that can form a convex polygon by themselves. As a result, the time complexity for computing intersection points is reduced, varying adaptively between O(log n) and O(n), and is lower than O(n) in most cases. To further improve clipping efficiency the new algorithm is combined with an axis-aligned BSP tree that is used to manage convex polylines for quickly finding convex polylines that might intersect the clipped lines. Examples show that the new algorithm can be several times faster than existing algorithms for line clipping.\",\"PeriodicalId\":318334,\"journal\":{\"name\":\"Journal of Graphics Tools\",\"volume\":\"50 1-5 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2008-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Graphics Tools\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1080/2151237X.2008.10129261\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Graphics Tools","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1080/2151237X.2008.10129261","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Line Clipping by Managing Polygon Edges in Convex Polylines
Existing algorithms for clipping line segments against a concave polygon always need to compute all edges, resulting in a time complexity O(n) for computing intersection points, where n is the number of edges of the clipping polygon. This paper presents a new algorithm that first separates polygon edges into convex polylines and then clips lines against them, where a convex polyline is a sequence of edges that can form a convex polygon by themselves. As a result, the time complexity for computing intersection points is reduced, varying adaptively between O(log n) and O(n), and is lower than O(n) in most cases. To further improve clipping efficiency the new algorithm is combined with an axis-aligned BSP tree that is used to manage convex polylines for quickly finding convex polylines that might intersect the clipped lines. Examples show that the new algorithm can be several times faster than existing algorithms for line clipping.