Polygon turning number
Versione 1.0.1 (2,88 KB) da
Kenneth Johnson
Calculate a polygon's turning number.
% 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.
Cita come
Kenneth Johnson (2025). Polygon turning number (https://it.mathworks.com/matlabcentral/fileexchange/182831-polygon-turning-number), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2025b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
