Sorting points by x to draw a horizon. Using RaphaelJS for the drawing.