%@ include file="../../check-login.jsp" %>
Re: Subdivision at midpoint of a triangleIn Reply to: Subdivision at midpoint of a triangle posted by Pichur on March 31, 2005 at 03:07:58: : Anyone can point me to a class in java that subdivides a triangle at midpoints? I need to get from one triangle other four smaller. I have tried implementing it myself following schemes that I found online and storing it in an winged-edge structure. I think a winged-edge structure is overkill in this situation. All you need is a hash table. For each triangle {v1,v2,v3} look in the hash table for the edge {v1,v2} (orderless). If it's not there, allocate a new vertex and store its index in hash table with that key. If it is, just use the value stored in the hash table for the index of the vertex on that edge.
|