Take the 2-minute tour ×
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. https://gist.github.com/4296692

Thanks for your advices

Jean-Pat

share|improve this question
1  
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 en.wikipedia.org/wiki/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: stackoverflow.com/questions/3838329/… –  Jean-Pat Dec 16 '12 at 1:15

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.