A Method of Determining the Direction of Two Dimensional Curves
Two-dimensional curves are represented by a list of vertices and other parameters that control the shape or curvature of the segments. In computer programming to deal with closed two-dimensional curves, it is often required to know the direction of the curve, which is reflected by the sequence of the vertex data. It can be anticlockwise or clockwise. This paper presents a robust, linear algorithm to determine the direction of a closed two-dimensional curve, by computing the total angular change of a tangent vector travelling along the curve for a complete cycle. A new, robust linear algorithm is proposed for the determination of the positional relationship of a point to a two-dimensional curve. For curves that consist of line and arc segments, which are most commonly used in engineering applications in computer aided design, the paper presents algorithms and procedures for solving the above problems.