public void DisplaySort()
        {
            if (Reversed)
            {
                numbers.Reverse();
            }

            try
            {
                if (Type != VisualTypes.Bars)
                {
                    bmp = new Bitmap(mainForm.pbox_sorts.Width * 2, mainForm.pbox_sorts.Height * 2);
                }
                else
                {
                    bmp = new Bitmap(1100, 1100);
                }
                Graphics g = Graphics.FromImage(bmp);
                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low;
                g.Clear(Color.White);
                float space = 1;
                Int16 drawn = 0;
                switch (Type)
                {
                case VisualTypes.Bars:
                    space = (float)bmp.Size.Width / size;
                    break;

                case VisualTypes.Spiral:
                    space = (float)360 / size;
                    break;

                case VisualTypes.Pyramid:
                    space = (float)bmp.Size.Height / size;
                    break;
                }
                SolidBrush brsh = new SolidBrush(Color.Blue);
                for (int j = 0; j < numbers.Count; j++)
                {
                    Int16 i = numbers[j];
                    if (numbers.isSelected(j))
                    {
                        brsh.Color = Color.Red;
                    }
                    else if (Colored)
                    {
                        int value = (int)ExtraMath.MapNumberToRange <float>((float)i, (float)0, (float)maxValue, (float)0, (float)255);
                        brsh.Color = Color.FromArgb(0, 0, 255 - value);
                    }
                    else
                    {
                        brsh.Color = Color.Blue;
                    }
                    float      mapped;
                    RectangleF rect;
                    switch (Type)
                    {
                    case VisualTypes.Bars:
                        mapped = ExtraMath.MapNumberToRange <float>((float)i, (float)0, (float)maxValue, (float)0, (float)bmp.Height);
                        rect   = new RectangleF((float)space * drawn, bmp.Height - mapped, (float)space - 0, mapped);
                        g.FillRectangle(brsh, rect);
                        break;

                    case VisualTypes.Spiral:
                        mapped = ExtraMath.MapNumberToRange <float>((float)i, (float)minValue, (float)maxValue, (float)0, (float)Math.Min(bmp.Width / 2, bmp.Height / 2));
                        PointF   Point1 = ExtraMath.GetPointAlongTrajectory(new PointF(bmp.Width / 2, bmp.Height / 2), ExtraMath.ToRadians(drawn * space), 10);
                        PointF   Point2 = ExtraMath.GetPointAlongTrajectory(new PointF(bmp.Width / 2, bmp.Height / 2), ExtraMath.ToRadians(drawn * (space)), mapped + 10);
                        PointF   Point3 = ExtraMath.GetPointAlongTrajectory(new PointF(bmp.Width / 2, bmp.Height / 2), ExtraMath.ToRadians((drawn + 1) * (space) - 0.1), mapped + 10);
                        PointF[] Points = { Point1, Point2, Point3 };
                        g.FillPolygon(brsh, Points);
                        break;

                    case VisualTypes.Pyramid:
                        mapped = ExtraMath.MapNumberToRange <float>((float)i, (float)0, (float)maxValue, (float)0, (float)bmp.Width / 2);
                        rect   = new RectangleF(mapped, (drawn + 1) * space, bmp.Width - mapped - mapped, space);
                        g.FillRectangle(brsh, rect);
                        break;
                    }

                    drawn++;
                }
                try
                {
                    mainForm.pbox_sorts.Image = bmp;
                    mainForm.pbox_sorts.Update();
                }
                catch
                { }
                System.Threading.Thread.Sleep(20);
            }
            catch { }
            if (Reversed)
            {
                numbers.Reverse();
            }
            GC.Collect();
        }