Re: POLY2CW ??? what happened to it?



Paul wrote:

It is correct. If you plot the polygon with lines between
the vertices,
like this:

plot(xv,yv,'r')

you'll see that your polygon is self-intersecting in a
kind of hourglass
shape. That explains your result.

--
Steve Eddins
http://blogs.mathworks.com/steve

This is EXACTLY why I was asking about POLY2CW routine. I
have to make the vertices of the polygon ordered clockwise.


I'm not sure that POLY2CW, which is in the Mapping Toolbox as Steve Lord said earlier, will help you. POLY2CW does not reorder the vertices of a self-intersecting polygon to make it non self-intersecting.

--
Steve Eddins
http://blogs.mathworks.com/steve
.



Relevant Pages

  • Re: Arrange points so polygon is not self intersecting
    ... self-intersecting. ... Connect all the points in some order to get a polygon, ... these choices makes two loops, the other keeps it as one loop. ... This algorithm will terminate because the total edge length decreases ...
    (sci.math)
  • Re: Arrange points so polygon is not self intersecting
    ... self-intersecting. ... Connect all the points in some order to get a polygon, ... these choices makes two loops, the other keeps it as one loop. ... This algorithm will terminate because the total edge length decreases ...
    (sci.math)
  • Re: POLY2CW ??? what happened to it?
    ... Steve Eddins wrote in message ... If you plot the polygon with lines between ... This is EXACTLY why I was asking about POLY2CW routine. ... have to make the vertices of the polygon ordered clockwise. ...
    (comp.soft-sys.matlab)
  • Outer normal calculation for self-intersecting 3D polygons
    ... I'd appreciate any suggestions on calculating the outer normal of a ... work with self-intersecting cases - like a bow-tie, ... need to calculate polygon normals for lighting. ...
    (comp.graphics.algorithms)