intersection of structures

I have two 2D structures(only their boundaries), that is two arrays of points in x,y. i want to find their intersection, how can i do that?