摘要 |
PURPOSE:To rapidly decide whether a segment is included in a window area or not by obtaining a vector connecting the start point of the segment to a corresponding end point in a clip area and deciding whether the center part of the segment is positioned in the clip area or not based upon the outer product of the obtained vector and the segment. CONSTITUTION:The y values (coordinate values rectangular to a scanning line) of both end points of a segment to be processed are compared and the 1st vector directed from the end point having the smaller y value to the end point having the larger y value is calculated. Then the 2nd vector directed from the end point having the smaller y value to a corner point to be the reference of the clip area is calculated and the outer product of the 1st and 2nd vectors is calculated. The positive/negative of the code of the outer product is decided and whether the segment to be processed is decided as a segment only a part of which, truely excluding both ends, is positioned in the clip area or not is decided. Consequently whether the whole range of the segment is positioned on the outside of the clip area can be decided and a time required for processing can be sharply shortened. |