public static Position intersection(Polygon polygon, Line firstLine, Line secondLine, int distanceOfView) {
        CenterPosition centerPosition = locationCenter(firstLine, positionOfCenter(polygon));
        Line lineA = firstLine;
        if (!firstLine.isWheather() || firstLine.length() < distanceOfView * 2)
            if (!(firstLine.getA().getCountLine() == 1 && new Line(polygon.get(0), polygon.getTailPosition()).equals(firstLine)))
                lineA = parallelLine(firstLine, centerPosition, distanceOfView);

        centerPosition = locationCenter(secondLine, positionOfCenter(polygon));
        Line lineB = secondLine;
        if (!secondLine.isWheather() || secondLine.length() < distanceOfView * 2)
            lineB = parallelLine(secondLine, centerPosition, distanceOfView);

//        Graphics g = AreaOfaPolygon.frame.getGraphics();
//        Panel.drawPosition(g, intersectionLines(lineA, lineB));
        return intersectionLines(lineA, lineB);
    }