Exemplo n.º 1
0
        public LittleShape2(LittleShape2 obj)
        {
            var size = obj.pathFigures.Length / 2;

            pathFigures = new double[2, size];
            for (int i = 0; i < size; i++)
            {
                pathFigures[0, i] = obj.pathFigures[0, i];
                pathFigures[1, i] = obj.pathFigures[1, i];
            }

/////////////////////
            List <Line> pathNew = new List <Line>();

            counter = obj.counter;
            foreach (var item in obj.path)
            {
                Line l = new Line();
                l.X1              = item.X1;
                l.X2              = item.X2;
                l.Y1              = item.Y1;
                l.Y2              = item.Y2;
                l.Stroke          = item.Stroke;
                l.StrokeThickness = item.StrokeThickness;
                pathNew.Add(l);
            }
            path = pathNew;
            Mass = obj.Mass;
        }
Exemplo n.º 2
0
        public List <Line> LittleShape2ToLine()
        {
            LittleShape2 temp = new LittleShape2();
            List <Line>  res2 = new List <Line>();

            if (pathFigures == null)
            {
                return(path);
            }
            double[,] d = pathFigures;
            // pointColection все что с d[0, - x  a d[1, y
            //for (int i = 0; i < rank; i++)
            int v = d.Length / 2;

            for (int i = 0; i < v; i++)
            {
                Line l = new Line();
                l.Stroke          = System.Windows.Media.Brushes.Black;
                l.StrokeThickness = 3;
                l.X1 = d[0, i];
                l.Y1 = d[1, i];
                l.X2 = d[0, i < v - 1 ? i + 1 : 0];
                l.Y2 = d[1, i < v - 1 ? i + 1 : 0];
                res2.Add(l);
            }
            return(res2);
        }
Exemplo n.º 3
0
        /// следующая фигура
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void but4_Click(object sender, RoutedEventArgs e)
        {
            if (curentindex == curentList.Count - 1 || curentindex > curentList.Count || curentindex < 0)
            {
                return;
            }

            LittleShape2 temp2 = new LittleShape2();

            pic.Children.Clear();
            temp2 = curentList[++curentindex].Clone() as LittleShape2;
            //{
            //  curentindex = 0; curentList.Count != 0 ? curentList[curentindex].Clone() as LittleShape2 : null;
            //}
            //else
            //temp2 = curentList.Count != 0 ? curentList[++curentindex].Clone() as LittleShape2 : null;


            //LittleShape2 temp2 = new LittleShape2();
            //if (curentindex == curentList.Count-1 || curentindex > curentList.Count) {
            //    curentindex = 0; temp2 = curentList.Count != 0 ? curentList[curentindex].Clone() as LittleShape2 : null; }
            //else  temp2 = curentList.Count != 0 ? curentList[++curentindex].Clone() as LittleShape2 : null;

            if (temp2 == null)
            {
                String       str2     = "Нету фигур для отображение";
                FlowDocument flowDoc2 = new FlowDocument(new Paragraph(new Run(str2)));
                textik.Document = flowDoc2;

                return;
            }

            myMatrixTransformScale(ref temp2);
            // cмещаеть все линия по ху и добавлятеься в canvac
            // cледующий клик все чистит и утечки памяти нету, проверено.
            // дефолтное значение

            List <System.Windows.Point> arrpoint = new List <System.Windows.Point>();

            ////////////////////////
            foreach (var item in temp2.path)
            {
                LineGeometry blackLineGeometry = new LineGeometry();


                Line l = moveLine(item);
                arrpoint.Add(new System.Windows.Point(l.X1, l.Y1));
                arrpoint.Add(new System.Windows.Point(l.X2, l.Y2));
            }
            StreamGeometryTriangleExample(arrpoint);



            // инфо про фигурку
            figureInfo(temp2);
        }
Exemplo n.º 4
0
 /// <summary>
 /// фун для матричного преобразования в даном случае увеличения
 /// </summary>
 /// <param name="temp"></param>
 public void myMatrixTransformScale(ref LittleShape2 temp)
 {
     System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix();
     System.Drawing.Drawing2D.Matrix test   = new System.Drawing.Drawing2D.Matrix(1, 0, 0, 1, 0, 0);
     // трансформация  из double[,] в pointF[]
     PointF[] arr = temp.getPointF(rank);
     // увеличение
     matrix.Scale(50, 50);
     // применение увеличения
     matrix.TransformPoints(arr);
     // уже увеличеная фигура (точки)
     temp.setPointF(arr);
 }
Exemplo n.º 5
0
        /// <summary>
        ///  предыдущая фигура
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void but3_Click(object sender, RoutedEventArgs e)
        {
            // смотрим где указатель на текущюю фигуру из curentList

            if (curentindex <= 0 || curentList.Count == 0)
            {
                return;
            }
            //    очистка екрана
            pic.Children.Clear();
            ///// одна фигура для рисования будет братmся из curentList
            LittleShape2 temp2 = new LittleShape2();

            temp2 = curentList[--curentindex].Clone() as LittleShape2;



            if (temp2 == null)
            {
                String       str2     = "Нету фигур для отображение";
                FlowDocument flowDoc2 = new FlowDocument(new Paragraph(new Run(str2)));
                textik.Document = flowDoc2;
                return;
            }

            //увеличиваю фигуру
            myMatrixTransformScale(ref temp2);
            // cмещаеть все линия по ху и добавлятеься в canvac
            // cледующий клик все чистит и утечки памяти нету, проверено.
            // дефолтное значение
            // массив точок увеличеной  фигуры
            List <System.Windows.Point> arrpoint = new List <System.Windows.Point>();

            ////////////////////////
            foreach (var item in temp2.path)
            {
                LineGeometry blackLineGeometry = new LineGeometry();
                // смещение линии по ху
                Line l = moveLine(item);
                arrpoint.Add(new System.Windows.Point(l.X1, l.Y1));
                arrpoint.Add(new System.Windows.Point(l.X2, l.Y2));
            }

            StreamGeometryTriangleExample(arrpoint);
            // инфо про фигурку
            figureInfo(temp2);
        }
Exemplo n.º 6
0
        public void figureInfo(LittleShape2 temp2)
        {
            String str  = "";
            String str3 = "";

            temp2.setAngleList();
            if (temp2.anglesArr != null)
            {
                foreach (var item in temp2.anglesArr)
                {
                    str3 += item.ToString() + "° ";
                }
            }

            str = "Maccа фигуры: " + temp2.Mass + "\nТекущый индекс: " + curentindex.ToString() + "\n Количество фигур: " + curentList.Count.ToString() +
                  "\nУглы: " + str3 + "Status :" + thredValues.ThreadState.ToString();
            ;

            FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run(str)));

            textik.Document = flowDoc;
        }
Exemplo n.º 7
0
        public List <LittleShape2> draw()
        {
            List <LittleShape2> f = new List <LittleShape2>();
            List <Point>        p = new List <Point>();
            int c = 1;

            p.Add(new Point());
            foreach (var item in temp)
            {
                Point pr = new Point(item.X * c, item.Y * c);
                p.Add(pr);
                shiftList(ref p, pr);
            }

            //  shiftList(ref p, new Point(0, 0));
            List <Point> lp = new List <Point>();

            LittleShape2 ls = new LittleShape2();

            ls.setPoint(p.ToArray());
            f.Add(ls);

            return(f);
        }
Exemplo n.º 8
0
        public List <LittleShape2> draw2()
        {
            List <LittleShape2> f = new List <LittleShape2>();
            int ccc = 0;

            foreach (var item in mainLL)
            {
                if (ccc++ == 1000)
                {
                    return(f);
                }
                List <Point> p = new List <Point>();
                int          c = 1;
                p.Add(new Point());
                foreach (var i in item)
                {
                    Point pr = new Point(i.X * c, i.Y * c);
                    p.Add(pr);
                    shiftList(ref p, pr);
                    //  shiftList(ref p, new Point(0, 0));
                    List <Point> lp = new List <Point>();

                    LittleShape2 ls = new LittleShape2();
                    ls.setPoint(p.ToArray());
                    f.Add(ls);
                }
            }
            //foreach (var item in temp)
            //{

            //}



            return(f);
        }
Exemplo n.º 9
0
        private void dispatcherTimer2_Tick(object sender, EventArgs e)
        {
            int total = 0;

            lock (Filler.locker)
            {
                total = Filler.mainListFigures.Count;
            }
            if (total == 0 || total == miniindex + 1)
            {
                return;
            }

            LittleShape2 lp = selectOneShape(++miniindex);
            var          a  = lp.anglesArr;

            List <System.Windows.Point> arrpoint = new List <System.Windows.Point>();

            ////////////////////////
            foreach (var item in lp.path)
            {
                LineGeometry blackLineGeometry = new LineGeometry();
                //    cмещение по канвасу
                //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                Line l = moveLine(item, 40, 50);
                arrpoint.Add(new System.Windows.Point(l.X1, l.Y1));
                arrpoint.Add(new System.Windows.Point(l.X2, l.Y2));
            }

            Canvas myCanvas = StreamGeometryTriangleLitle(arrpoint);

            //       myCanvas.Background = System.Windows.Media.Brushes.LightBlue;
            myCanvas.Width  = 170;
            myCanvas.Height = 120;
            wrapP.Children.Add(myCanvas);
        }
Exemplo n.º 10
0
        private void tabControl1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.Source is TabControl) //if this event fired from TabControl then enter
            {
                if (t1.IsSelected)
                {
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(1);
                    curentindex = 0;
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T1");
                    // инфо про фигурку

                    // curentList = selectfun(1);
                }
                if (t2.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T2");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(2);
                    curentindex = 0;
                    //  drawCountShape(curentList.Count);
                }
                if (t3.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(3);
                    curentindex = 0;
                }
                if (t4.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(4);
                    curentindex = 0;
                }
                if (t5.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(5);
                    curentindex = 0;
                }
                if (t6.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(6);
                    curentindex = 0;
                }
                if (t7.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(7);
                    curentindex = 0;
                }
                if (t8.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(8);
                    curentindex = 0;
                }
                if (t9.IsSelected)
                {
                    //Do your job here
                    System.Diagnostics.Debug.WriteLine("Tab,change T3");
                    if (FillerX == null || Filler.mainListFigures.Count == 0)
                    {
                        return;
                    }
                    curentList  = selectfun(9);
                    curentindex = 0;
                }
            }

            pic.Children.Clear();
            LittleShape2 temp2 = new LittleShape2();

            if (curentindex == curentList.Count)
            {
                curentindex = 0;
            }
            temp2 = curentList.Count != 0 ? curentList[curentindex].Clone() as LittleShape2 : null;

            if (temp2 == null)
            {
                String       str2     = "Нету фигур для отображение";
                FlowDocument flowDoc2 = new FlowDocument(new Paragraph(new Run(str2)));
                textik.Document = flowDoc2;

                return;
            }

            myMatrixTransformScale(ref temp2);
            // cмещаеть все линия по ху и добавлятеься в canvac
            // cледующий клик все чистит и утечки памяти нету, проверено.
            // дефолтное значение

            List <System.Windows.Point> arrpoint = new List <System.Windows.Point>();

            ////////////////////////
            foreach (var item in temp2.path)
            {
                LineGeometry blackLineGeometry = new LineGeometry();


                Line l = moveLine(item);
                arrpoint.Add(new System.Windows.Point(l.X1, l.Y1));
                arrpoint.Add(new System.Windows.Point(l.X2, l.Y2));
            }
            StreamGeometryTriangleExample(arrpoint);



            // инфо про фигурку
            figureInfo(temp2);
        }
Exemplo n.º 11
0
        /// <summary>
        /// виборка одной фигуры по индексу
        /// </summary>
        /// <param name="mass"></param>
        public LittleShape2 selectOneShape(int m)
        {
            LittleShape2 query2 = null;

            lock (Filler.locker)
            {
                query2 = Filler.mainListFigures[m].Clone() as LittleShape2;
            }

            myMatrixTransformScaleMini(ref query2);

            query2.setAngleList(3);


            //List<LittleShape2> request = new List<LittleShape2>();
            //List<LittleShape2> tempRequest = new List<LittleShape2>();
            //проверка всех углов
            // checkbox
            //Две геометрические фигуры называются равными, если их можно совместить наложением.
            // как вариант будем одну фигуру вращать
            // надо длину, угол и порядок следования
            // сейчас есть 3 квадрата что позволяет думать что мы вроде делаем 3 лишних действия
            // ---------------------------------------------сразу искать не координаты а вектора фигур но  12в степени 12 еще никто не отменял
            //if (cb.IsChecked == true && query2.Count > 0)
            //{
            //    //фигуры из запроса надо теперь их обработать
            //    // для всех выставить  градусы
            //    foreach (var item in query2)
            //    {
            //        LittleShape2 fig2 = item.Clone() as LittleShape2;
            //        myMatrixTransformScale(ref fig2);
            //        fig2.setAngleList(3);
            //        request.Add(fig2);
            //    }

            //    List<int> index2 = new List<int>();
            //    // проход по всем фигурам кроме последней - будет сверяться две фигуры
            //    for (int i = 0; i < request.Count - 1; i++)
            //    {
            //        if (request[i] == null) continue;

            //        var x1 = request[i];   //фигура а


            //        for (int j = i + 1; j < request.Count; j++) //беру все остальные фиг поочереди поворачивая и проверяю на совпадения
            //        {
            //            if (request[j] == null) continue;
            //            var x2 = request[j];  // фигура следующая // временая фигура она будет или null или не будет
            //            double[] temp = x2.anglesArr.ToArray();


            //            for (int k = 0; k < x2.anglesArr.Count(); k++) //  здесь сравнение и поворот фигуры второй
            //            {
            //                //var a1 = x2.anglesArr.ToArray();
            //                bool resEual = equalFun(x1.anglesArr, temp);  //проверка

            //                if (resEual == true)//ok  okokokokokokokokokokokok
            //                {
            //                    request[j] = null; //                      1111111111111111111111111
            //                    break;
            //                }
            //                else
            //                {
            //                    temp = x2.nextAngle(k);
            //                }


            //            }

            //        }

            //        query2 = request.Where(x => x != null).ToList();

            //    }



            //}

            return(query2);
        }
Exemplo n.º 12
0
        /// <summary>
        ///  рекурсивная функция
        /// </summary>
        /// <param name="k"></param>
        static public void search2(Object ka)
        {
            int k = (int)ka;

            //    перврый раз
            if ((k == 2)) // две начальные точки мы поставили, от второй точки, строим третья, для второго отрезка многоугольника, бежим в 6! сторон
            {
                //int i = 0;
                // for (double a = 30; a <= 180; a += 30)
                // double a = 30;
                for (double a = 30; a <= 90; a += 30)
                {
                    // окружность круга
                    double x = Math.Sin(a * Math.PI / 180); // нахождение новых координат
                    double y = 1 - Math.Cos(a * Math.PI / 180);
                    //////////////////
                    pointColection[0, k] = x; // постановка координат
                    pointColection[1, k] = y;
                    //t2 = pointColection;

                    Thread newThread = new Thread(search2);

                    newThread.Start(k + 1);
                    //   search2(k + 1); //  вызов рекурсивной функции
                    // ///
                }
            }
            else
            {
                /// к=3
                for (double a = 0; a <= 330; a += 30) // бежим в 11 сторон
                {
                    //                   берем значения син и кос из готового массива
                    double x = pointColection[0, k - 1] + listSinCos[a];
                    double y = pointColection[1, k - 1] - listSinCos[a + 1];


                    // проверка на касание
                    bool Flag = false;

                    for (int i = 0; i < k - 1; i++)
                    {
                        if (Math.Abs(length(pointColection[0, i], pointColection[1, i], x, y)) < 0.001)
                        {
                            Flag = true; break;
                        }
                        if (i > 0 && equal(pointColection[0, i - 1], pointColection[1, i - 1], pointColection[0, i], pointColection[1, i], pointColection[0, k - 1], pointColection[1, k - 1], x, y))
                        {
                            Flag = true; break;
                        }
                    }
                    #region предыдущий код

                    #endregion
                    if (length(x, y, pointColection[0, 0], pointColection[1, 0]) > pointColection.GetLength(1) - k)
                    {
                        Flag = true;
                    }
                    if (!Flag)
                    {
                        pointColection[0, k] = x;
                        pointColection[1, k] = y;
                        //   var test = pointColection.GetLength(1) - 1;
                        if (k < pointColection.GetLength(1) - 1)
                        {
                            search2(k + 1);
                        }
                        else
                        if (Math.Abs(length(pointColection[0, k], pointColection[1, k], pointColection[0, 0], pointColection[1, 0]) - 1) < 0.01)
                        {
                            //????????
                            Flag = true;
                            for (int i = 1; i < k - 1; i++)
                            {
                                if (equal(pointColection[0, i], pointColection[1, i], pointColection[0, i + 1], pointColection[1, i + 1], pointColection[0, k], pointColection[1, k], pointColection[0, 0], pointColection[1, 0]))
                                {
                                    Flag = false;
                                    break;
                                }
                            }
                            if (Flag)
                            {
                                //****************************

                                double intarea = area(pointColection);
                                var    abs     = Math.Abs(Math.Round(intarea) - intarea);
                                couuntPlosh++;
                                //////************



                                if (abs < 0.00001)
                                {
                                    // xcouunt++;
                                    square[(int)Math.Round(intarea)]++;

                                    ////*********////////////////////////////////
                                    double[] tempAppay = new double[rank];


                                    List <double> temp = new List <double>();


                                    double[,] tempArr = new double[2, rank];
                                    // копирование в новый масс для сохранения
                                    for (int i = 0; i < rank; i++)
                                    {
                                        tempArr[0, i] = pointColection[0, i];
                                        tempArr[1, i] = pointColection[1, i];
                                    }

                                    // сохранение массива
                                    LittleShape2 ready = new LittleShape2();
                                    ready.add(tempArr, rank);
                                    //   установка масси
                                    //double areaF = area(pointColection);



                                    ready.Mass = (int)Math.Round(intarea);;
                                    lock (locker)
                                    {
                                        mainListFigures.Add(ready);
                                    }
                                }
                                count++;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 13
0
        /// <summary>
        ///  рекурсивная функция
        /// </summary>
        /// <param name="k"></param>
        static public void search(int k)
        {
            //    перврый раз
            if (k == 2)     // две начальные точки мы поставили, от второй точки, строим третья, для второго отрезка многоугольника, бежим в 6! сторон
            {
                for (double a = 30; a <= 90; a += 30)
                {
                    // окружность круга
                    double x = Math.Sin(a * Math.PI / 180);     // нахождение новых координат
                    double y = 1 - Math.Cos(a * Math.PI / 180);
                    //////////////////
                    pointColection[0, k] = x;     // постановка координат
                    pointColection[1, k] = y;
                    //t2 = pointColection;
                    search(k + 1);     //  вызов рекурсивной функции
                    // ///
                }
            }
            else
            {
                /// к=3
                for (double a = 0; a <= 330; a += 30)     // бежим в 11 сторон
                {
                    //                   берем значения син и кос из готового массива
                    double x = pointColection[0, k - 1] + listSinCos[a];
                    double y = pointColection[1, k - 1] - listSinCos[a + 1];


                    // проверка на касание
                    bool Flag = false;

                    for (int i = 0; i < k - 1; i++)
                    {
                        if (Math.Abs(length(pointColection[0, i], pointColection[1, i], x, y)) < 0.001)
                        {
                            Flag = true; break;
                        }
                        if (i > 0 && equal(pointColection[0, i - 1], pointColection[1, i - 1], pointColection[0, i], pointColection[1, i], pointColection[0, k - 1], pointColection[1, k - 1], x, y))
                        {
                            Flag = true; break;
                        }
                    }
                    #region предыдущий код
                    //for (int i = 0; i < k - 1; i++)
                    //{
                    //     double pp = length(pointColection[0, i], pointColection[1, i], x, y);
                    //    double absPP = Math.Abs(pp);
                    //    if (absPP < 0.001)
                    //    {
                    //        Flag = true;
                    //        break;
                    //    }
                    //    ///////      делал только с проверкой не пересечение результат нехватка памяти
                    //    if (i > 0 && equal(pointColection[0, i - 1], pointColection[1, i - 1], pointColection[0, i], pointColection[1, i], pointColection[0, k - 1], pointColection[1, k - 1], x, y))
                    //    {
                    //        Flag = true;
                    //        break;
                    //    }
                    //    // если (касаеться +)   делал только с проверкой не пересечение результат нехватка памяти надо включать этот кусок
                    //    // будут отсекаться фигуры с меньшей пл. но будут лищние проверки
                    //    //    пробую менять местами сначала на пересечение линий break потом на площадь тоже break

                    //   // return;
                    //}
                    // если нету касания го
                    #endregion

                    if (!Flag)
                    {
                        pointColection[0, k] = x;
                        pointColection[1, k] = y;
                        //   var test = pointColection.GetLength(1) - 1;
                        if (k < pointColection.GetLength(1) - 1)
                        {
                            search(k + 1);
                        }
                        else
                        if (Math.Abs(length(pointColection[0, k], pointColection[1, k], pointColection[0, 0], pointColection[1, 0]) - 1) < 0.01)
                        {
                            //????????
                            Flag = true;
                            for (int i = 1; i < k - 1; i++)
                            {
                                //  debug1 = pointColection;
                                if (equal(pointColection[0, i], pointColection[1, i], pointColection[0, i + 1], pointColection[1, i + 1], pointColection[0, k], pointColection[1, k], pointColection[0, 0], pointColection[1, 0]))
                                {
                                    Flag = false;
                                    break;
                                }
                            }
                            if (Flag)
                            {
                                //****************************

                                double intarea = area(pointColection);
                                var    abs     = Math.Abs(Math.Round(intarea) - intarea);
                                couuntPlosh++;
                                //////************



                                if (abs < 0.00001)
                                {
                                    //   xcouunt++;
                                    square[(int)Math.Round(intarea)]++;

                                    ////*********////////////////////////////////
                                    double[] tempAppay = new double[rank];


                                    List <double> temp = new List <double>();


                                    double [,] tempArr = new double[2, rank];
                                    // копирование в новый масс для сохранения
                                    for (int i = 0; i < rank; i++)
                                    {
                                        tempArr[0, i] = pointColection[0, i];
                                        tempArr[1, i] = pointColection[1, i];
                                    }

                                    // сохранение массива
                                    LittleShape2 ready = new LittleShape2();
                                    ready.add(tempArr, rank);
                                    //   установка масси
                                    //double areaF = area(pointColection);



                                    ready.Mass = (int)Math.Round(intarea);;
                                    lock (locker)
                                    {
                                        mainListFigures.Add(ready);
                                    }
                                }
                                count++;
                            }
                        }
                    }
                }
            }
        }