public Orientation getOrientationAt(double s){
        Point current, next;
        int i = 0;
        current = data.get(i);
        next = data.get(1+i);

        double length = 0;
        while (length < s) {
            length += Math.sqrt((current.getX()-next.getX())*(current.getX()-next.getX()) + (current.getY()-next.getY())*(current.getY()-next.getY()));
            i++;
            current = data.get(i);
            next = data.get(1+i);
        }
        double dx = data.get(i+1).getX() - data.get(1).getX();
        double dy = data.get(i+1).getY() - data.get(1).getY();
        if (dx*dx > dy*dy) {
            if (dx > 0) {
                return Orientation.right;
            }
            else {
                return Orientation.left;
            }
        }
        else {
            if (dy < 0) {
                return Orientation.up;
            }
            else {
                return Orientation.down;
            }
        }
    }