Publishing Service

Polishing & Checking

Journal of Zhejiang University SCIENCE A

ISSN 1673-565X(Print), 1862-1775(Online), Monthly

Line clipping against polygonal window algorithm based on the multiple virtual boxes rejecting

Abstract: This paper presents a new algorithm for line clipping against a polygonal window by exploiting the local relationship between each line segment and the polygon. Firstly, a minimal enclosing box (MEB) of the polygon is adopted to reject the invisible line segments located outside the MEB. Secondly, a 45° rotated box is used to encode the endpoint of the line segment, and then reject a portion of the invisible segments crossing polygon corners. Finally, instead of encoding the endpoints of all line segments with respect to the polygonal window, each vertex of the polygon is encoded, taking the line segment to be clipped as reference. For efficient encoding of the polygon vertices, a new concept, termed with slope adaptive virtual box, is introduced regarding each line segment. Such a box can not only conveniently reject all totally invisible lines lying outside the MEB conveniently, but also precisely identify the edges of the polygon with which the line segment potentially intersects. With the summation of the vertex codes, it can be verified whether the line segment is separated from or potentially intersects the polygon window. Based on the product of the codes of adjacent vertices, singular cases of intersection can be solved accurately. Experimental results demonstrate the efficiency and stability of the new algorithm.

Key words: Polygon vertex encoding, Adaptive virtual box, Line segment rejection, Line segment intersection, Line clipping


Share this article to: More

Go to Contents

References:

<Show All>

Open peer comments: Debate/Discuss/Question/Opinion

<1>

Please provide your name, email address and a comment





DOI:

10.1631/jzus.2005.AS0100

CLC number:

TP312

Download Full Text:

Click Here

Downloaded:

2960

Clicked:

3825

Cited:

0

On-line Access:

Received:

2005-02-10

Revision Accepted:

2005-07-10

Crosschecked:

Journal of Zhejiang University-SCIENCE, 38 Zheda Road, Hangzhou 310027, China
Tel: +86-571-87952276; Fax: +86-571-87952331; E-mail: jzus@zju.edu.cn
Copyright © 2000~ Journal of Zhejiang University-SCIENCE