Exemplo n.º 1
0
 private void Draw()
 {
     Complex p = new Complex(0, 0, true);
     Complex q = new Complex(0, 0, true);
     double t = 2.0 * Math.PI / (fx / 1.25);
     Color pc, qc, c;
     int r = 0, g = 0, b = 0;
     for(int x = 0 ; x < fx ; x++) {
         p.cis(0.99, t * x);
         pc = Color.FromArgb(p.c);
         for(int y = 0 ; y < fy ; y++) {
             q.cis(0.99, t * y);
             qc = Color.FromArgb(q.c);
             //r = (int)(255.0 * ((pc.R / 255.0) * (qc.R / 255.0)));
             //g = (int)(255.0 * ((pc.G / 255.0) * (qc.G / 255.0)));
             //b = (int)(255.0 * ((pc.B / 255.0) * (qc.B / 255.0)));
             //r = (x > fx / 5 * 2) ? 0 : pc.R ^ qc.R;
             //g = (x < fx / 5 * 1 || x > fx / 5 * 4) ? 0 : pc.G ^ qc.G;
             //b = (x < fx / 5 * 3) ? 0 : pc.B ^ qc.B;
             r = pc.R ^ qc.R;
             g = pc.G ^ qc.G;
             b = pc.B ^ qc.B;
             c = Color.FromArgb(255, r, g, b);
             gi.SetPixel(x, y, c);
         }
         gf.DrawLine(new Pen(pc), x, 0, x, fy);
     }
     gf.DrawImage(gi, 0, 0);
 }