Hp 50g Math question: Intersection of 2 triangulars
|
12-21-2013, 04:29 AM
Post: #3
|
|||
|
|||
RE: Math question: Intersection of 2 triangulars
(12-20-2013 04:37 PM)peacecalc Wrote: Hello all, There are several cases: 1) They do not intersect 2) They are not coplanar and intersect on a line 3) They are coplanar and intersect to create a plane 4) They are coplanar and intersect on an edge to create a line segment For each triangle, you can determine the normal by taking the cross product of the two vectors defined by the three points. If the normals are identical, that means that the planes are parallel. If they are parallel and coplanar, they do not intersect; if they are parallel and non-coplanar, they might intersect to create an area. If the normals are not identical, then they might intersect on a line. For each of the possible intersection cases you will probably need to do a separate algorithm. For the non-coplanar test, simply find the line that is defined by the intersection of the two planes defined by the triangles. Then test to see if that line intersects each triangle. The segment of the line that intersects both triangles defines the intersection of the two triangles. The coplanar test is the most complex because the intersection area is polygon whose vertices are defined by either the intersection of the triangle edges, or by the vertices of one triangle that fall inside the other. You need to construct that polygon. Poke around the internet and you will find a variety of approaches. All that said, it is a tricky problem because it is sensitive to numerical precision if the triangles are of odd shapes, disparate sizes, far apart, small angles, etc. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)