polyorient

Versión 1.0.0.0 (1,36 KB) por M MA
Orientation of polygon
2,1K descargas
Actualizado 24 abr 2006

Ver licencia

Returns the orientation and signed area of a 2D polygon

Syntax:
[ORIENT,SAREA] = POLYORIENT(X,Y)

Inputs:
X, Y Vectors with the polygon vertices

Outputs:
ORIENT Polygon orientation. 1 if the orientation is counter-clockwise (direct), 0 otherwise
SAREA Signed area of the polygon, negative if orientation is not direct

Examples:
x1 = [0 0 1 1]; y1 = [1 2 2 1];
x2 = [0 0 1 1]; y2 = [1 0 0 1];
x3 = [x1 x2]; y3 = [y1 y2];

[o1,a1] = polyorient(x1,y1) % 0, -1
[o2,a2] = polyorient(x2,y2) % 1, 1
[o3,a3] = polyorient(x3,y3) % 0, 0

Citar como

M MA (2024). polyorient (https://www.mathworks.com/matlabcentral/fileexchange/10823-polyorient), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R12
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Elementary Polygons en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0