public Segment getIntersection(GeometricModel model) {

        /*if (centre.getBrutalLength(model.centre) > this.maxLength + model.maxLength)
            return null;*/

        float maxLength = this.maxLength + model.maxLength;
        maxLength *= maxLength;

        if (centre.getLengthSquared(model.centre) > maxLength)
            return null;


        for (int i = 0; i < model.getPointCount(); i++) {
            for (int j = 0; j < getPointCount(); j++) {
                Point p = Point.getIntersection(getPoint(j), getPoint(j + 1), model.getPoint(i), model.getPoint(i + 1));
                if (p != null) {

                    double d1 = p.getDistanceToPoint(model.getPoint(i)) + p.getDistanceToPoint(model.getPoint(i + 1));
                    double d2 = p.getDistanceToPoint(getPoint(j)) + p.getDistanceToPoint(getPoint(j + 1));
                    if (d1 < d2) {
                        return new Segment(p, Point.getNormal(model.getPoint(i), model.getPoint(i + 1)));
                    } else {
                        return new Segment(p, Point.getNormal(getPoint(j), getPoint(j + 1)));
                    }
                }

            }
        }

        /*
        for (int i=0; i<model.getPointCount(); i++)
            if (contains(model.getPoint(i))) {
                return model.getPoint(i);
            }

        for (int i=0; i<getPointCount(); i++)
            if (model.contains(getPoint(i))) {
                return getPoint(i);
            }
        */

        return null;
    }