A winding number algorithm for closed polygonal paths (not necessarily simple) is derived using classical complex analysis results and techniques.The algorithm is designed specifically to handle large cases efficiently.The performance of a computer program based on the algorithm is discussed and compared with the performance of a computer program which obtains the winding number directly by antidifferentiation. Introduction.The algorithm does not involve the division operation, inverse trigonometric functions, or integral approximation techniques, making it quite suitable for computer programs which must process any combination of many polygonal paths, polygonal paths with many sides, and/or compute many winding numbers.In addition, if all the complex numbers in a given application are Gaussian integers, then a computer program based on the algorithm can be written completely in fixed point mode.The algorithm has proven to be computationally efficient.Results of efficiency tests of a FORTRAN program based on the algorithm are given in the final section.To avoid ambiguity, we define briefly the mathematical terminology which is used.By a curve, we mean a continuous function C from a closed real interval [a, b] (called the parameter interval) into the complex plane.C(a) is called the initial point, C() the terminal point of C. The inverse C of C is given by C(/) = C(a + b -t), a ^ t ^ b.C is closed provided C(a) = C().C* denotes the range of C; i.e., C* = {C(/) | a ; t ^ b}.A path is a piecewise continuously differentiable curve.If C is a path and o ( C*, then the winding number of z0, Wciz0), with respect to C is given by 2xiWciz0) = c(z -Zp)~l dz.Given complex numbers z and w, the directed line from z to w is defined by [z, w] = {(1 -t)z + tw | 0 ^ ^ 1}.The distinction between a closed real interval and a directed line in the complex plane is always clear from context.A path P with parameter interval [a, b] is called a polygonal path provided there exists a subdivision a = U < < tN = b of [a, b] such that P([t"-U tn]) = [Pitn-i), P(Q], for each n = 2, 3, , N. The turn-points of P are Pitn), n = 1, 2, , N. For convenience of notation, we identify a polygonal path by its turn-points; P : pn = xn + iyn, n = 1,2, , N, where pn = P{tn), for each n.
Read more