Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given four randomly chosen points with known coordinates, how to compute the area of a not self crossing quadrilateral? There is a formula if the points are ordered (direct or indirect). So the problem is to order the points . Does a known algorithm exist? Can a complete graph be used to search the shortest cycle?

A python implementation for pair of points and triangles is written but the aim is to take all the possible quadrilaterals in a set of points, and to sort the quadrilaterals according to their area.

Thanks for your advices


share|cite|improve this question
I don't understand your question...? If you have four points (say, A, B, C and D), and the line AB does not cross the line CD, then ABCD is an ordering of the points that forms a non-self-intersecting quadrilateral. Perhaps that's what you were asking? – Billy Dec 16 '12 at 0:05
So the intersection between the segments [AB] and [CD] must be checked before using the Shoelace formula – Jean-Pat Dec 16 '12 at 0:56
For example, It should be possible to compute the area with four points in that order: (1,1),(2,4),(6,5),(4,3) but not in this one : (1,1),(6,5),(4,3),(2,4). – Jean-Pat Dec 16 '12 at 0:57
segments intersection:… – Jean-Pat Dec 16 '12 at 1:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.