I am trying to calculate the top most intersection of an arbitrary number of planes, with no joy! I am using actionscript, but just need find an algorithm that i can implement.
Problem:
- consider 3 vertical axis.
- The user enters 3 points for each triangle/plane such that the points of the triangle lie on one of the axis.
- The user can enter an arbitrary number of triangles
- I need to find the topmost layer of these triangles and display it on the screen as well as the coordinates of interection.
Here is a picture to clarify what I mean with 2 triangles:

However, when we allow for more than 2 triangles, I get awkward lines of intersection.