Can winding number be calculated given a vector of points (samples of a curved line)?

601 Views Asked by At

Assume we have $X=[\mathbf{x},\mathbf{y}]$, where, $\mathbf{x}=x_1,x_2,...$ and $\mathbf{y}=y_1,y_2,...$, representing a curve (sampled) in Cartesian coordinates. The question is whether or not we can find out the winding number by only using $X$?

1

There are 1 best solutions below

0
On

Ok. I found a MATLAB code that does the job very well. It is written in a way that the steps are easy to follow algorithmically:

https://www.mathworks.com/matlabcentral/fileexchange/13351-fast-and-robust-self-intersections/content/selfintersect.m