Archived

This topic is now archived and is closed to further replies.

tuning a bunch of points to a bunch of triangles

This topic is 5324 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

basically i had bunch of faces which formed a convex object and i did intersection tests with these faces to get the points where they join not i want to make triangles from these points and make sure that all tiangles dont overlap and all normals from the triangles are pointing outwards, im having trouble trying to figure this one out any help would be gratefull. thanks

Share on other sites
At the bottom of this page is a paper about Surface reconstruction from unorganized points, which sounds like what you may be looking for. Be warned, it's not really a trivial problem.

I don't know if that's really what you're looking for, but I hope it helps.

Golem
Blender--The Gimp--Python--Lua--SDL

[edited by - VertexNormal on March 24, 2004 2:11:13 AM]

Share on other sites
thanks for the reply, im sorry but i should of written what exacly what i was trying to do im trying to turn a convex brush made from faces/planes into a set of usable triangle i dont know if im going about it the correct way.

thanks

Share on other sites
Ive done this just a few weeks ago.

If youve already gotten the points from the intersecing planes, your off to a good start. Did you keep the points that came from separate planes separate? For example, if you were working on a cube (6 sided) brush, then you should have extracted 4*6 = 24 points (although some of these will be the same).

So take your 4 points which make up one of the cube''s side. Here is how you can sort out the vertices to make sure that they are not just in ''random'' order:

Pick any 2 verts, a ''head'' and a ''tail'' and create a vector out of them.
while num verts in sorted list is less than num verts to sort
For each vert except for the tail, create
another vector out of the tail and this new vert.
find the angle between the two vectors created, keeping track of biggest angle
the new vector that caused the biggest angle is definetly an edge. (its two verts)
let the HEAD be the next vert in the sorted list.
reverse the vector''s direction
if resulting polygon normal is opposite sign as plane normal
reverse order of vertices in polygon

Once youve got the vertices for the polygons sorted out, then you can go about splitting them into triangles. This is pretty simple. You pick any vertex, and then cycle around the outside of the polygon, 2 (more) vertices at a time. Every 3 vertices makes a triangle.

Share on other sites
thanks i will try this straight away

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 104
• 11
• Forum Statistics

• Total Topics
632977
• Total Posts
3009677
• Who's Online (See full list)

There are no registered users currently online

×