Polygon turning number

Calculate a polygon's turning number.
0 Descargas
Actualizado 21 ene 2026

Ver licencia

% Syntax:
% n = polyturn(poly,tol);
% n = polyturn(poly);
%
% Inputs:
%
% poly: 2-column matrix of polygon vertices ([x,y] coordinate pairs),
% size(poly,1)>=3.
%
% tol: scalar, non-negative, proximity tolerance for point equality
% testing, OPTIONAL, default = 0.
%
% Output:
%
% n: integer number of turns or nan. For a non-self-intersecting polygon,
% n is +1 for counterclockwise orientation and -1 for clockwise
% orientation. (n can be zero for a figure-8 polygon.) If any polygon
% segment has an end point within distance tol from an adjacent segment,
% n will be nan.

Citar como

Kenneth Johnson (2026). Polygon turning number (https://la.mathworks.com/matlabcentral/fileexchange/182831-polygon-turning-number), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2025b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Etiquetas Añadir etiquetas
Versión Publicado Notas de la versión
1.0.2

minor changes in test_polyturn.m

1.0.1

Added File Exchange url to code comments.

1.0.0