コード例 #1
0
 public override void IterateExpansion(ref Expansion ex)
 {
     if (CorrectionOrder >= 4) ex.a4 = 2f * ex.a0 * ex.a4 + ex.a2 * ex.a2;
     if (CorrectionOrder >= 3) ex.a3 = 2f * ex.a0 * ex.a3 + 2f * ex.a1 * ex.a2;
     if (CorrectionOrder >= 2) ex.a2 = 2f * ex.a0 * ex.a2 + ex.a1 * ex.a1;
     if (CorrectionOrder >= 1) ex.a1 *= 2f * ex.a0;
 }
コード例 #2
0
 public override void IterateExpansion(ref Expansion ex)
 {
     if (CorrectionOrder >= 4) ex.a4 = (2f * ex.a0 + GoldenMean_rho) * ex.a4 + ex.a2 * ex.a2;
     if (CorrectionOrder >= 3) ex.a3 = (2f * ex.a0 + GoldenMean_rho) * ex.a3 + 2f * ex.a1 * ex.a2;
     if (CorrectionOrder >= 2) ex.a2 = (2f * ex.a0 + GoldenMean_rho) * ex.a2 + ex.a1 * ex.a1;
     if (CorrectionOrder >= 1) ex.a1  = (2f * ex.a0 + GoldenMean_rho) * ex.a1;
 }
コード例 #3
0
        public virtual Expansion InitializeExpansion(Complex CamPos, Complex Size)
        {
            Expansion expansion = new Expansion(c, Size);
            expansion.a1  = (Complex)0;
            expansion.a2 = (Complex)0;
            expansion.a3 = (Complex)0;
            expansion.a4 = (Complex)0;

            return expansion;
        }
コード例 #4
0
        public override void IterateExpansion(ref Expansion ex)
        {
            // For Mandelbrot
            //if (count == 1) Corner[j, count] = FractalFunc.Fractal(C, Corner[j, 0]);
            //else Corner[j, count] = FractalFunc.Fractal(Corner[j, count - 1], Corner[j, 0]);

            if (CorrectionOrder >= 4) ex.a4 = 2f * ex.a0 * ex.a4 + ex.a2 * ex.a2;
            if (CorrectionOrder >= 3) ex.a3 = 2f * ex.a0 * ex.a3 + 2f * ex.a1 * ex.a2;
            if (CorrectionOrder >= 2) ex.a2 = 2f * ex.a0 * ex.a2 + ex.a1 * ex.a1;
            if (CorrectionOrder >= 1) ex.a1  = 2f * ex.a0 * ex.a1  + (Complex)1;
        }
コード例 #5
0
        public virtual void SetGpuParameters(Texture2D ReferenceFractal,
											 Expansion ex,
											 Complex CamPos, double AspectRatio)
        {
            Fx.xTexture.SetValue(ReferenceFractal);

            Fx.c.SetValue(c.ToVector2());

            Fx.h1.SetValue(ex.a1.ToVector2());
            Fx.h2.SetValue(ex.a2.ToVector2());
            Fx.h3.SetValue(ex.a3.ToVector2());
            Fx.h4.SetValue(ex.a4.ToVector2());
            Fx.Center.SetValue(ex.a0.ToVector2());
            Fx.Count.SetValue(ex.IterationCount);

            Fx.CamPos.SetValue(CamPos.ToVector2());
            Fx.Set(Vector2.Zero, 1, (float)AspectRatio);
        }
コード例 #6
0
 public virtual void IterateExpansion(ref Expansion ex)
 {
 }