Bob Wagner Posted June 13, 2007 Share Posted June 13, 2007 Does anyone have in their collection of code an algorithm to triangulate a 3D polygon. In version 10.5, I did this by Converting to Nurbs then converting to 3Dpolys. This doesn't work in 12.5, not unless you choose each nurb surface and set its U and V value to 2. This I haven't worked out how to do in a plugin. At the moment I export as 3DS and re-import the 3Ds file. This might be ok for now but not what I really want. Why do this you ask? Well I have my unfolding working pretty well, but it all requires a model to be triangulated. Quote Link to comment
islandmon Posted June 13, 2007 Share Posted June 13, 2007 //calculate the number of vertexia & faces in symmetry triangle //This is based on the class type //First the polyhedron face... for(i=1; i<=frequency; i++){ if(i == 1) vertex = 3; else vertex += (i + 1); } faces = frequency * frequency; edges = (vertex + faces) - 1; { frequency is the number of edge subdivisions of the triangle } Quote Link to comment
Bob Wagner Posted June 19, 2007 Author Share Posted June 19, 2007 Thanks for this. However I already an cope with this, the problem is actually dividing the big polygon into the individual triangles. Number of sides -2, is how many triangles minimum needed. however you have to check for turns left and right and check it the triangle actually formed is in the original polygon etc. Bob Quote Link to comment
wezelboy Posted June 19, 2007 Share Posted June 19, 2007 (edited) Perhaps this will help you. http://www.cs.unc.edu/~dm/CODE/GEM/chapter.html This too.. http://en.wikipedia.org/wiki/Polygon_triangulation Edited June 19, 2007 by wezelboy Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.