[Closed] algorithmic brain teaser
I think you’ll find that it does I did use the sdk to generate the numbers but you can produce them from knowing the first vert index and counting them off the screen.
mxs unfortunately doesn’t provide methods to get poly triangles and poly diagonals… that’s why i added mxs extension for this
I know all about the sdk methods thats why i mentioned MNMesh::GetTriangles() in the original post. The task has nothing to do with the sdk given a set of diagonals and the number of verts in the polygon generate the triangles that the diagonal describe.
in this case how do you know that ccw is correct but cw is not (or vice versa) ? as i understand the pair of corners (doublets) has to determine direction of triangle (triplets)
Be aware that the polygons vertices are not always ordered and things can easily go wrong.
For example:
(
delete objects
obj = converttopoly (donut radius1:10 radius2:20 isselected:on steps:0)
completeredraw()
for j = 1 to 7 do obj.editablepoly.turndiagonal 1 j
)