# Thread: problem of triangles inside each other

1. ## problem of triangles inside each other

Hello guys,

Maybe this seems so easy but I attach a picture which shows the situation.
I need to know, how can I calculate the position for triangles, so I can decide which triangle is inside of which one. I mean, how can set a position for a triangle?

Thank you in advance

2. Originally Posted by Narek
I need to know, how can I calculate the position for triangles, so I can decide which triangle is inside of which one. I
I'm not entirely certain what you are asking, but the best way to begin any geometrical analysis of a given object is to impose coordinate axes.

Put the thing in the plane however you think is most conveinient.

3. The simple (but not the most efficient) solution I can think about is to define function of edges of triangles and check that they do not have intersections.

The inner triangle will be one with the smallest area.

Maybe this link will help you Intersection of Rays/Segments with Triangles.