Post Reply 
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,

it's my first post here:

1) It is a good idea to make a new kategory, labeled "mathematics"? In my opinion: yes.

2) My problem six points are given in 3D and three of this points define the trinangular ONE and the other three the triangular TWO. I want for my hp 50g an input of six vectors and as an output an empty list (no intersection set), a list with two vectors (if the two vectors have the same value, then the intersecting set is a point, if they are different then the set is a piece of a line), if the list contains more then two vectors the intersecting set is a aera.

That is the plan, my brutal force solution looks for me clumsy and fanciless. And it is a solution which is far from a "fast" solution.

Does anybody know more about that kind of problems?

sincerely
peacecalc

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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Math question: Intersection of 2 triangulars - Marcel Samek - 12-21-2013 04:29 AM



User(s) browsing this thread: 1 Guest(s)