public override System.Drawing.Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
 {
     int width = FAP.Width,height=FAP.Height;
     Bitmap Result = new Bitmap(width,height);
     double[][] dm = FAP.Get2DRatioMatrix();
     BitmapData ResultData = Result.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
     unsafe
     {
         double dmi;
         int param = 255 << 24,x,y;
         int* ptr = (int*)ResultData.Scan0.ToPointer();
         for ( y = 0; y < height; ++y)
         {
             for ( x = 0; x < width; ++x)
             {
                 dmi = dm[x][y] / 4D;
                 *(ptr++) = param|
                  (get_cos_color(dmi, _red, _red_scale) << 16)|
                  (get_cos_color(dmi,_green,_green_scale)<<8)|
                  (get_cos_color(dmi,_blue,_blue_scale));
             }
         }
     }
     Result.UnlockBits(ResultData);
     return Result;
 }
        public override System.Drawing.Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
        {
            int    width = FAP.Width, height = FAP.Height;
            Bitmap Result = new Bitmap(width, height);

            double[][] dm         = FAP.Get2DRatioMatrix();
            BitmapData ResultData = Result.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);

            unsafe
            {
                double dmi;
                int    param = 255 << 24, x, y;
                int *  ptr = (int *)ResultData.Scan0.ToPointer();
                for (y = 0; y < height; ++y)
                {
                    for (x = 0; x < width; ++x)
                    {
                        dmi      = dm[x][y] / 4D;
                        *(ptr++) = param |
                                   (get_cos_color(dmi, _red, _red_scale) << 16) |
                                   (get_cos_color(dmi, _green, _green_scale) << 8) |
                                   (get_cos_color(dmi, _blue, _blue_scale));
                    }
                }
            }
            Result.UnlockBits(ResultData);
            return(Result);
        }
        public override Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
        {
            check_all_functions();
            int    width = FAP.Width, height = FAP.Height;
            Bitmap Result = new Bitmap(width, height);

            ulong[][] Iter_matrix = FAP.Get2DOriginalIterationsMatrix();
            //double maxiters=
            double[][] Ratio_matrix  = FAP.Get2DRatioMatrix();
            double[][] Radian_Matrix = ((RadianMatrix)FAP.GetUniqueParameter(typeof(RadianMatrix))).Matrix;
            BitmapData ResultData    = Result.LockBits(new Rectangle(new Point(), Result.Size), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);

            unsafe
            {
                double[] arg = new double[8];
                int      Parameter = -1;
                byte *   blue = (byte *)&Parameter, green = blue + 1, red = green + 1;
                int *    ptr = (int *)ResultData.Scan0.ToPointer();
                int      x, y;
                double * iter, ratio, radian, maxofiter, xloc, yloc;
                fixed(double *iterator = arg)
                {
                    iter      = iterator;
                    ratio     = iter + 1;
                    radian    = ratio + 1;
                    maxofiter = radian + 1;
                    xloc      = maxofiter + 1;
                    yloc      = xloc + 1;
                    arg[7]    = height;
                    arg[6]    = width;
                    *maxofiter = FAP.ItersCount;
                    for (y = 0; y < height; ++y)
                    {
                        for (x = 0; x < width; ++x)
                        {
                            *iter   = Iter_matrix[x][y];
                            *ratio  = Ratio_matrix[x][y];
                            *radian = Radian_Matrix[x][y];
                            *xloc   = x;
                            *yloc   = y;
                            *red    = (byte)(_m_red_func(arg) % 256D);
                            *green  = (byte)(_m_green_func(arg) % 256D);
                            *blue   = (byte)(_m_blue_func(arg) % 256D);
                            *(ptr++) = Parameter;
                        }
                    }
                }
            }
            Result.UnlockBits(ResultData);
            return(Result);
        }
 public override Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
 {
     check_all_functions();
     int width=FAP.Width, height=FAP.Height;
     Bitmap Result = new Bitmap(width, height);
     ulong[][] Iter_matrix = FAP.Get2DOriginalIterationsMatrix();
     //double maxiters=
     double[][] Ratio_matrix = FAP.Get2DRatioMatrix();
     double[][] Radian_Matrix = ((RadianMatrix)FAP.GetUniqueParameter(typeof(RadianMatrix))).Matrix;
     BitmapData ResultData=Result.LockBits(new Rectangle(new Point(),Result.Size),ImageLockMode.WriteOnly,PixelFormat.Format32bppArgb);
     unsafe
     {
         double[] arg = new double[8];
         int Parameter=-1;
         byte* blue = (byte*)&Parameter, green = blue + 1, red = green + 1;
         int* ptr = (int*)ResultData.Scan0.ToPointer();
         int x, y;
         double* iter, ratio, radian,maxofiter,xloc,yloc;
         fixed(double* iterator = arg)
         {
             iter = iterator;
             ratio = iter + 1;
             radian = ratio + 1;
             maxofiter = radian + 1;
             xloc = maxofiter + 1;
             yloc = xloc + 1;
             arg[7] = height;
             arg[6] = width;
             *maxofiter = FAP.ItersCount;
             for (y = 0; y < height; ++y)
             {
                 for (x = 0; x < width; ++x)
                 {
                     *iter = Iter_matrix[x][y];
                     *ratio = Ratio_matrix[x][y];
                     *radian = Radian_Matrix[x][y];
                     *xloc = x;
                     *yloc = y;
                     *red = (byte)(_m_red_func(arg)%256D);
                     *green = (byte)(_m_green_func(arg) % 256D);
                     *blue = (byte)(_m_blue_func(arg) % 256D);
                     *(ptr++) = Parameter;
                 }
             }
         }
     }
     Result.UnlockBits(ResultData);
     return Result;
 }
 public override System.Drawing.Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
 {
     int width = FAP.Width, height = FAP.Height;
     Bitmap bmp = new Bitmap(width, height);
     double[][] dm = (double[][])FAP.Get2DRatioMatrix();
     double[][][] trio_matrix = (double[][][])FAP.GetUniqueParameter(typeof(double[][][]));
     for (int x = 0; x < width; x++)
     {
         for (int y = 0; y < height; y++)
         {
             bmp.SetPixel(x, y, Color.FromArgb(get_cos_color(trio_matrix[x][y][0],_red, _red_scale), get_cos_color(trio_matrix[x][y][1], _green, _green_scale), get_cos_color(trio_matrix[x][y][2], _blue, _blue_scale)));
         }
     }
     return bmp;
 }
Esempio n. 6
0
        public override System.Drawing.Bitmap GetDrawnBitmap(FractalAssociationParametrs FAP, object Extra = null)
        {
            int    width = FAP.Width, height = FAP.Height;
            Bitmap bmp = new Bitmap(width, height);

            double[][]   dm          = (double[][])FAP.Get2DRatioMatrix();
            double[][][] trio_matrix = (double[][][])FAP.GetUniqueParameter(typeof(double[][][]));
            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    bmp.SetPixel(x, y, Color.FromArgb(get_cos_color(trio_matrix[x][y][0], _red, _red_scale), get_cos_color(trio_matrix[x][y][1], _green, _green_scale), get_cos_color(trio_matrix[x][y][2], _blue, _blue_scale)));
                }
            }
            return(bmp);
        }
 public override bool IsCompatible(FractalAssociationParametrs FAP)
 {
     return FAP.GetUniqueParameter(typeof(RadianMatrix)) != null && FAP.Get2DRatioMatrix() != null;
 }
 public override bool IsCompatible(FractalAssociationParametrs FAP)
 {
     return(FAP.Is2D && FAP.Get2DRatioMatrix() is double[][]);
 }
 public override bool IsCompatible(FractalAssociationParametrs FAP)
 {
     return FAP.Is2D && FAP.Get2DRatioMatrix() is double[][];
 }
 public override bool IsCompatible(FractalAssociationParametrs FAP)
 {
     return(FAP.GetUniqueParameter(typeof(RadianMatrix)) != null && FAP.Get2DRatioMatrix() != null);
 }