simple 2d boolean operation

hello,

I’m searching a simple and elegant algorithm to solve this 2d problem :

-given a triangle A defined by 3 vertices in trigonometric order
-given a triangle B defined by 3 vertices in trigonometric order

->Find the polygon wich is the common part of A and B (vertices in trigonometric order).

So this polygon could have 0,3,4,5 or 6 vertices, depending on the kind of intersection.

Can you point me to methods/website about this ?

Hi Divide,

One way that comes to mind is to create hyper-planes from one of your triangle’s edges and simply clip the other to the interior.